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

Unified Diff: Source/core/html/ImageDocument.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/HTMLVideoElement.cpp ('k') | Source/core/html/ImageInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageDocument.cpp
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp
index 57a97d0e703fc75fc28df85d3a9e7cf22a28dfbd..70c13611a6dcfd6310a75e3735e53eb34adf8112 100644
--- a/Source/core/html/ImageDocument.cpp
+++ b/Source/core/html/ImageDocument.cpp
@@ -202,7 +202,7 @@ void ImageDocument::createDocumentStructure()
float ImageDocument::scale() const
{
- if (!m_imageElement || m_imageElement->document() != this)
+ if (!m_imageElement || &m_imageElement->document() != this)
return 1.0f;
FrameView* view = frame()->view();
@@ -220,7 +220,7 @@ float ImageDocument::scale() const
void ImageDocument::resizeImageToFit()
{
- if (!m_imageElement || m_imageElement->document() != this || pageZoomFactor(this) > 1)
+ if (!m_imageElement || &m_imageElement->document() != this || pageZoomFactor(this) > 1)
return;
LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
@@ -275,7 +275,7 @@ void ImageDocument::imageUpdated()
void ImageDocument::restoreImageSize()
{
- if (!m_imageElement || !m_imageSizeIsKnown || m_imageElement->document() != this || pageZoomFactor(this) < 1)
+ if (!m_imageElement || !m_imageSizeIsKnown || &m_imageElement->document() != this || pageZoomFactor(this) < 1)
return;
LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), 1.0f);
@@ -292,7 +292,7 @@ void ImageDocument::restoreImageSize()
bool ImageDocument::imageFitsInWindow() const
{
- if (!m_imageElement || m_imageElement->document() != this)
+ if (!m_imageElement || &m_imageElement->document() != this)
return true;
FrameView* view = frame()->view();
@@ -307,7 +307,7 @@ bool ImageDocument::imageFitsInWindow() const
void ImageDocument::windowSizeChanged()
{
- if (!m_imageElement || !m_imageSizeIsKnown || m_imageElement->document() != this)
+ if (!m_imageElement || !m_imageSizeIsKnown || &m_imageElement->document() != this)
return;
bool fitsInWindow = imageFitsInWindow();
« no previous file with comments | « Source/core/html/HTMLVideoElement.cpp ('k') | Source/core/html/ImageInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698