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

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

Issue 2695493003: Ensure FrameView scrollbars are updated when changing device emulation modes (Closed)
Patch Set: address comments Created 3 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: 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 5585ea1d3d4f0a34b20b0eacda600d6e4948f973..a107295d05f2a2590d11c08cd009f60af2f26bda 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -424,6 +424,13 @@ void VisualViewport::initializeScrollbars() {
setupScrollbar(WebScrollbar::Horizontal);
setupScrollbar(WebScrollbar::Vertical);
+
+ // Ensure existing FrameView scrollbars are removed if the visual viewport
+ // scrollbars are now supplied, or created if the visual viewport no longer
+ // supplies scrollbars.
+ LocalFrame* frame = mainFrame();
+ if (frame && frame->view())
+ frame->view()->visualViewportScrollbarsChanged();
}
void VisualViewport::setupScrollbar(WebScrollbar::Orientation orientation) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698