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

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

Issue 662393003: Revert 183623 "Fix fullscreen elements in pinch viewport mode." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2194/
Patch Set: Created 6 years, 2 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 | « Source/core/frame/PinchViewport.h ('k') | Source/core/rendering/RenderFullScreen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
===================================================================
--- Source/core/page/scrolling/ScrollingCoordinator.cpp (revision 183995)
+++ Source/core/page/scrolling/ScrollingCoordinator.cpp (working copy)
@@ -155,25 +155,16 @@
}
m_wasFrameScrollable = frameIsScrollable;
+ // 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) {
- // If there is a non-root fullscreen element, prevent the main frame
- // from scrolling.
+ // 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()) {
- if (m_page->settings().pinchVirtualViewportEnabled()) {
- toWebLayer(m_page->frameHost().pinchViewport().scrollLayer())->setUserScrollable(false, false);
- } else {
- scrollingWebLayer->setBounds(IntSize());
- }
- } else {
- if (m_page->settings().pinchVirtualViewportEnabled()) {
- toWebLayer(m_page->frameHost().pinchViewport().scrollLayer())->setUserScrollable(true, true);
- } else {
- scrollingWebLayer->setBounds(frameView->contentsSize());
- }
- }
- scrollingWebLayer->setUserScrollable(frameView->userInputScrollable(HorizontalScrollbar), frameView->userInputScrollable(VerticalScrollbar));
+ if (fullscreenElement && fullscreenElement != mainFrameDocument->documentElement())
+ scrollingWebLayer->setBounds(IntSize());
+ else
+ scrollingWebLayer->setBounds(frameView->contentsSize());
}
const FrameTree& tree = m_page->mainFrame()->tree();
« no previous file with comments | « Source/core/frame/PinchViewport.h ('k') | Source/core/rendering/RenderFullScreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698