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

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 558813003: Disable scrolling for fullscreen elements by changing scroll layer size. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index 515deb1ad16f439a94bc1fe23716169f3109b3a1..2db2e69dd0c8762232dcf3ca4f1d36631894f4f0 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -158,14 +158,13 @@ void ScrollingCoordinator::updateAfterCompositingChangeIfNeeded()
// The mainFrame view doesn't get included in the FrameTree below, so we
// update its size separately.
if (WebLayer* scrollingWebLayer = frameView ? toWebLayer(frameView->layerForScrolling()) : 0) {
- scrollingWebLayer->setBounds(frameView->contentsSize());
- // If there is a fullscreen element, set the scroll clip layer to 0 so main frame won't scroll.
+ // If there is a fullscreen element, set the scroll bounds to empty so the main frame won't scroll.
Document* mainFrameDocument = m_page->deprecatedLocalMainFrame()->document();
Element* fullscreenElement = Fullscreen::fullscreenElementFrom(*mainFrameDocument);
if (fullscreenElement && fullscreenElement != mainFrameDocument->documentElement())
- scrollingWebLayer->setScrollClipLayer(0);
+ scrollingWebLayer->setBounds(IntSize());
else
- scrollingWebLayer->setScrollClipLayer(toWebLayer(frameView->layerForContainer()));
+ scrollingWebLayer->setBounds(frameView->contentsSize());
}
const FrameTree& tree = m_page->mainFrame()->tree();
« no previous file with comments | « no previous file | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698