diff options
author | Iain Merrick <husky@google.com> | 2010-09-13 16:35:48 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-09-16 12:10:42 +0100 |
commit | 5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch) | |
tree | ddce1aa5e3b6967a69691892e500897558ff8ab6 /WebCore/html/HTMLImageElement.cpp | |
parent | 12bec63ec71e46baba27f0bd9bd9d8067683690a (diff) | |
download | external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2 |
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebCore/html/HTMLImageElement.cpp')
-rw-r--r-- | WebCore/html/HTMLImageElement.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/WebCore/html/HTMLImageElement.cpp b/WebCore/html/HTMLImageElement.cpp index b7ece78..d223b1e 100644 --- a/WebCore/html/HTMLImageElement.cpp +++ b/WebCore/html/HTMLImageElement.cpp @@ -267,10 +267,8 @@ int HTMLImageElement::width(bool ignorePendingStylesheets) const return width; // if the image is available, use its width - if (m_imageLoader.image()) { - float zoomFactor = document()->view() ? document()->view()->pageZoomFactor() : 1.0f; - return m_imageLoader.image()->imageSize(zoomFactor).width(); - } + if (m_imageLoader.image()) + return m_imageLoader.image()->imageSize(1.0f).width(); } if (ignorePendingStylesheets) @@ -278,7 +276,8 @@ int HTMLImageElement::width(bool ignorePendingStylesheets) const else document()->updateLayout(); - return renderBox() ? renderBox()->contentWidth() : 0; + RenderBox* box = renderBox(); + return box ? adjustForAbsoluteZoom(box->contentWidth(), box) : 0; } int HTMLImageElement::height(bool ignorePendingStylesheets) const @@ -291,10 +290,8 @@ int HTMLImageElement::height(bool ignorePendingStylesheets) const return height; // if the image is available, use its height - if (m_imageLoader.image()) { - float zoomFactor = document()->view() ? document()->view()->pageZoomFactor() : 1.0f; - return m_imageLoader.image()->imageSize(zoomFactor).height(); - } + if (m_imageLoader.image()) + return m_imageLoader.image()->imageSize(1.0f).height(); } if (ignorePendingStylesheets) @@ -302,7 +299,8 @@ int HTMLImageElement::height(bool ignorePendingStylesheets) const else document()->updateLayout(); - return renderBox() ? renderBox()->contentHeight() : 0; + RenderBox* box = renderBox(); + return box ? adjustForAbsoluteZoom(box->contentHeight(), box) : 0; } int HTMLImageElement::naturalWidth() const |