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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2226663003: window.visualViewport.clientWidth|Height shouldn't assume scaled scrollbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-exclude-scrollbars.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index d61236e70169dcb61a51dc89a9ade87c94667a65..d284fd7f4ef780feae8196d0a220d2e668a684ef 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -241,7 +241,7 @@ double VisualViewport::clientWidth()
updateStyleAndLayoutIgnorePendingStylesheets();
double width = adjustScrollForAbsoluteZoom(visibleSize().width(), mainFrame()->pageZoomFactor());
- return width - mainFrame()->view()->verticalScrollbarWidth();
+ return width - mainFrame()->view()->verticalScrollbarWidth() / m_scale;
}
double VisualViewport::clientHeight()
@@ -252,7 +252,7 @@ double VisualViewport::clientHeight()
updateStyleAndLayoutIgnorePendingStylesheets();
double height = adjustScrollForAbsoluteZoom(visibleSize().height(), mainFrame()->pageZoomFactor());
- return height - mainFrame()->view()->horizontalScrollbarHeight();
+ return height - mainFrame()->view()->horizontalScrollbarHeight() / m_scale;
}
double VisualViewport::pageScale()
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/viewport/viewport-dimensions-exclude-scrollbars.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698