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

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

Issue 305833002: Main frame should remain scrollable if the fullscreen element is the document (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 6 years, 7 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 dd5459233f8db3b8a74d7e3dcdf3b9fa64af4f44..26291466a173e59bd53c3172d4fc6487e2d05445 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -159,8 +159,9 @@ void ScrollingCoordinator::updateAfterCompositingChange()
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.
- Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(*(m_page->mainFrame()->document()));
- if (fullscreenElement)
+ Document* mainFrameDocument = m_page->mainFrame()->document();
+ Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(*mainFrameDocument);
+ if (fullscreenElement && fullscreenElement != mainFrameDocument->documentElement())
scrollingWebLayer->setScrollClipLayer(0);
else
scrollingWebLayer->setScrollClipLayer(toWebLayer(frameView->layerForContainer()));
« 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