Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(891)

Unified Diff: Source/core/html/HTMLImageElement.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLIFrameElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 4b96259134ed6cf79299a7733478d6f69e015d23..bf88109ed9ecad7b640245f02d5216edaa77a176 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -222,9 +222,9 @@ int HTMLImageElement::width(bool ignorePendingStylesheets)
}
if (ignorePendingStylesheets)
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
else
- document()->updateLayout();
+ document().updateLayout();
RenderBox* box = renderBox();
return box ? adjustForAbsoluteZoom(box->contentBoxRect().pixelSnappedWidth(), box) : 0;
@@ -245,9 +245,9 @@ int HTMLImageElement::height(bool ignorePendingStylesheets)
}
if (ignorePendingStylesheets)
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
else
- document()->updateLayout();
+ document().updateLayout();
RenderBox* box = renderBox();
return box ? adjustForAbsoluteZoom(box->contentBoxRect().pixelSnappedHeight(), box) : 0;
@@ -296,7 +296,7 @@ void HTMLImageElement::setHeight(int value)
KURL HTMLImageElement::src() const
{
- return document()->completeURL(getAttribute(srcAttr));
+ return document().completeURL(getAttribute(srcAttr));
}
void HTMLImageElement::setSrc(const String& value)
@@ -342,7 +342,7 @@ void HTMLImageElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons
addSubresourceURL(urls, src());
// FIXME: What about when the usemap attribute begins with "#"?
- addSubresourceURL(urls, document()->completeURL(getAttribute(usemapAttr)));
+ addSubresourceURL(urls, document().completeURL(getAttribute(usemapAttr)));
}
void HTMLImageElement::didMoveToNewDocument(Document* oldDocument)
@@ -362,7 +362,7 @@ bool HTMLImageElement::isServerMap() const
if (usemap.string()[0] == '#')
return false;
- return document()->completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isEmpty();
+ return document().completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isEmpty();
}
Image* HTMLImageElement::imageContents()
« no previous file with comments | « Source/core/html/HTMLIFrameElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698