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(); |