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

Unified Diff: Source/core/rendering/RenderImage.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/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderImage.cpp
diff --git a/Source/core/rendering/RenderImage.cpp b/Source/core/rendering/RenderImage.cpp
index 084e5b4310042892d6d73b5d4e7aa8b85e75a35e..898f05475a6f2d6de369a032c33902309815eb3b 100644
--- a/Source/core/rendering/RenderImage.cpp
+++ b/Source/core/rendering/RenderImage.cpp
@@ -172,7 +172,7 @@ void RenderImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
// Set image dimensions, taking into account the size of the alt text.
if (m_imageResource->errorOccurred() || !newImage) {
- if (!m_altText.isEmpty() && document()->hasPendingStyleRecalc()) {
+ if (!m_altText.isEmpty() && document().hasPendingStyleRecalc()) {
ASSERT(node());
if (node()) {
m_needsToSetSizeForAltText = true;
@@ -353,7 +353,7 @@ void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
}
if (!m_altText.isEmpty()) {
- String text = document()->displayStringModifiedByEncoding(m_altText);
+ String text = document().displayStringModifiedByEncoding(m_altText);
const Font& font = style()->font();
const FontMetrics& fontMetrics = font.fontMetrics();
LayoutUnit ascent = fontMetrics.ascent();
@@ -420,15 +420,15 @@ void RenderImage::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo)
{
- Document* document = this->document();
+ Document& document = this->document();
- if (document->printing() || !document->frame()->selection()->isFocusedAndActive())
+ if (document.printing() || !document.frame()->selection()->isFocusedAndActive())
return;
if (paintInfo.context->paintingDisabled() && !paintInfo.context->updatingControlTints())
return;
- Element* focusedElement = document->focusedElement();
+ Element* focusedElement = document.focusedElement();
if (!focusedElement || !isHTMLAreaElement(focusedElement))
return;
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698