diff options
author | Mangesh Ghiware <mghiware@google.com> | 2012-05-18 10:18:45 -0700 |
---|---|---|
committer | Mangesh Ghiware <mghiware@google.com> | 2012-05-18 17:48:12 -0700 |
commit | 541af8dff4d592277d0f835deafaf728dad8bc57 (patch) | |
tree | 2b271cb9a99f476c188d3192c5b9e02023af9e6c /Source/WebCore/page | |
parent | c6097fa86138b3dc74b91e12017cfab615fa0f38 (diff) | |
download | external_webkit-541af8dff4d592277d0f835deafaf728dad8bc57.zip external_webkit-541af8dff4d592277d0f835deafaf728dad8bc57.tar.gz external_webkit-541af8dff4d592277d0f835deafaf728dad8bc57.tar.bz2 |
Revert part of "Fix iframe, ..."
Fix DOMWindow innerWidth and innerHeight to report correct values even
after an orientation change. Uses platform-specific widget.
This reverts part of commit I588aa5709e7a3c2ced9479c3cf9c1827bf6f7733.
Bug: 6479900
Change-Id: Ic5c8785e35b14d6723eee4f4dfe1b0a3e1ec284a
Diffstat (limited to 'Source/WebCore/page')
-rw-r--r-- | Source/WebCore/page/DOMWindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp index ee2206b..c7f162a 100644 --- a/Source/WebCore/page/DOMWindow.cpp +++ b/Source/WebCore/page/DOMWindow.cpp @@ -1095,7 +1095,11 @@ int DOMWindow::innerHeight() const if (!view) return 0; +#if PLATFORM(ANDROID) + return static_cast<int>(view->actualHeight() / m_frame->pageZoomFactor()); +#else return static_cast<int>(view->height() / m_frame->pageZoomFactor()); +#endif } int DOMWindow::innerWidth() const @@ -1107,7 +1111,11 @@ int DOMWindow::innerWidth() const if (!view) return 0; +#if PLATFORM(ANDROID) + return static_cast<int>(view->actualWidth() / m_frame->pageZoomFactor()); +#else return static_cast<int>(view->width() / m_frame->pageZoomFactor()); +#endif } int DOMWindow::screenX() const @@ -1145,7 +1153,11 @@ int DOMWindow::scrollX() const m_frame->document()->updateLayoutIgnorePendingStylesheets(); +#if PLATFORM(ANDROID) + return static_cast<int>(view->actualScrollX() / m_frame->pageZoomFactor()); +#else return static_cast<int>(view->scrollX() / m_frame->pageZoomFactor()); +#endif } int DOMWindow::scrollY() const @@ -1159,7 +1171,11 @@ int DOMWindow::scrollY() const m_frame->document()->updateLayoutIgnorePendingStylesheets(); +#if PLATFORM(ANDROID) + return static_cast<int>(view->actualScrollY() / m_frame->pageZoomFactor()); +#else return static_cast<int>(view->scrollY() / m_frame->pageZoomFactor()); +#endif } bool DOMWindow::closed() const |