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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 2202493002: NOT FOR REVIEW: Fullscreen WIP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 if (WebLayer* layoutViewportScrollLayer = 194 if (WebLayer* layoutViewportScrollLayer =
195 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) { 195 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) {
196 layoutViewportScrollLayer->setBounds(frameView->contentsSize()); 196 layoutViewportScrollLayer->setBounds(frameView->contentsSize());
197 197
198 // If there is a non-root fullscreen element, prevent the viewport from 198 // If there is a non-root fullscreen element, prevent the viewport from
199 // scrolling. 199 // scrolling.
200 Document* mainFrameDocument = 200 Document* mainFrameDocument =
201 m_page->deprecatedLocalMainFrame()->document(); 201 m_page->deprecatedLocalMainFrame()->document();
202 Element* fullscreenElement = 202 Element* fullscreenElement =
203 Fullscreen::fullscreenElementFrom(*mainFrameDocument); 203 Fullscreen::fullscreenElement(*mainFrameDocument);
204 WebLayer* visualViewportScrollLayer = 204 WebLayer* visualViewportScrollLayer =
205 toWebLayer(m_page->frameHost().visualViewport().scrollLayer()); 205 toWebLayer(m_page->frameHost().visualViewport().scrollLayer());
206 206
207 if (visualViewportScrollLayer) { 207 if (visualViewportScrollLayer) {
208 if (fullscreenElement && 208 if (fullscreenElement &&
209 fullscreenElement != mainFrameDocument->documentElement()) 209 fullscreenElement != mainFrameDocument->documentElement())
210 visualViewportScrollLayer->setUserScrollable(false, false); 210 visualViewportScrollLayer->setUserScrollable(false, false);
211 else 211 else
212 visualViewportScrollLayer->setUserScrollable(true, true); 212 visualViewportScrollLayer->setUserScrollable(true, true);
213 } 213 }
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 if (frameIsScrollable != m_wasFrameScrollable) 1229 if (frameIsScrollable != m_wasFrameScrollable)
1230 return true; 1230 return true;
1231 1231
1232 if (WebLayer* scrollLayer = 1232 if (WebLayer* scrollLayer =
1233 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) 1233 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr)
1234 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); 1234 return WebSize(frameView->contentsSize()) != scrollLayer->bounds();
1235 return false; 1235 return false;
1236 } 1236 }
1237 1237
1238 } // namespace blink 1238 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698