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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 years, 10 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
Index: Source/core/html/ImageDocument.cpp
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp
index 8dd3dbd6b76531a78d320e705d609e20f6e27498..573c9dd906d6637ea99f5830837947df0be1bc3e 100644
--- a/Source/core/html/ImageDocument.cpp
+++ b/Source/core/html/ImageDocument.cpp
@@ -149,7 +149,7 @@ void ImageDocumentParser::finish()
// Report the natural image size in the page title, regardless of zoom level.
// At a zoom level of 1 the image is guaranteed to have an integer size.
- IntSize size = flooredIntSize(cachedImage->imageSizeForRenderer(document()->imageElement()->renderer(), 1.0f));
+ IntSize size = flooredIntSize(cachedImage->imageSizeForRenderer(document()->imageElement()->layoutObject(), 1.0f));
if (size.width()) {
// Compute the title, we use the decoded filename of the resource, falling
// back on the (decoded) hostname if there is no path.
@@ -228,7 +228,7 @@ float ImageDocument::scale() const
if (!view)
return 1;
- LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
+ LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->layoutObject(), pageZoomFactor(this));
LayoutSize windowSize = LayoutSize(view->width(), view->height());
float widthScale = windowSize.width().toFloat() / imageSize.width().toFloat();
@@ -242,7 +242,7 @@ void ImageDocument::resizeImageToFit(ScaleType type)
if (!m_imageElement || m_imageElement->document() != this || (pageZoomFactor(this) > 1 && type == ScaleOnlyUnzoomedDocument))
return;
- LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
+ LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->layoutObject(), pageZoomFactor(this));
float scale = this->scale();
m_imageElement->setWidth(static_cast<int>(imageSize.width() * scale));
@@ -281,7 +281,7 @@ void ImageDocument::imageUpdated()
if (m_imageSizeIsKnown)
return;
- if (m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this)).isEmpty())
+ if (m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->layoutObject(), pageZoomFactor(this)).isEmpty())
return;
m_imageSizeIsKnown = true;
@@ -297,7 +297,7 @@ void ImageDocument::restoreImageSize(ScaleType type)
if (!m_imageElement || !m_imageSizeIsKnown || m_imageElement->document() != this || (pageZoomFactor(this) < 1 && type == ScaleOnlyUnzoomedDocument))
return;
- LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), 1.0f);
+ LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->layoutObject(), 1.0f);
m_imageElement->setWidth(imageSize.width());
m_imageElement->setHeight(imageSize.height());
@@ -318,7 +318,7 @@ bool ImageDocument::imageFitsInWindow() const
if (!view)
return true;
- LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
+ LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->layoutObject(), pageZoomFactor(this));
LayoutSize windowSize = LayoutSize(view->width(), view->height());
return imageSize.width() <= windowSize.width() && imageSize.height() <= windowSize.height();

Powered by Google App Engine
This is Rietveld 408576698