Chromium Code Reviews| Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
| diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
| index c09c01c5755f87eab0487d5af1a31e37ae6fe59b..332b6c088a2315a24536b2789bf309e9f2e27599 100644 |
| --- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
| +++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
| @@ -29,13 +29,19 @@ |
| #include "RuntimeEnabledFeatures.h" |
| #include "core/dom/Document.h" |
| +#include "core/dom/FullscreenElementStack.h" |
| #include "core/dom/Node.h" |
| #include "core/dom/WheelController.h" |
| #include "core/html/HTMLElement.h" |
| #include "core/frame/FrameView.h" |
| #include "core/frame/LocalFrame.h" |
| -#include "core/page/Page.h" |
| #include "core/frame/Settings.h" |
| +#include "core/page/Page.h" |
| +#include "core/plugins/PluginView.h" |
| +#include "core/rendering/RenderGeometryMap.h" |
| +#include "core/rendering/RenderView.h" |
| +#include "core/rendering/compositing/CompositedLayerMapping.h" |
| +#include "core/rendering/compositing/RenderLayerCompositor.h" |
| #include "platform/TraceEvent.h" |
| #include "platform/exported/WebScrollbarImpl.h" |
| #include "platform/exported/WebScrollbarThemeGeometryNative.h" |
| @@ -47,11 +53,6 @@ |
| #endif |
| #include "platform/scroll/ScrollAnimator.h" |
| #include "platform/scroll/ScrollbarTheme.h" |
| -#include "core/plugins/PluginView.h" |
| -#include "core/rendering/RenderGeometryMap.h" |
| -#include "core/rendering/RenderView.h" |
| -#include "core/rendering/compositing/CompositedLayerMapping.h" |
| -#include "core/rendering/compositing/RenderLayerCompositor.h" |
| #include "public/platform/Platform.h" |
| #include "public/platform/WebCompositorSupport.h" |
| #include "public/platform/WebLayerPositionConstraint.h" |
| @@ -160,8 +161,16 @@ void ScrollingCoordinator::updateAfterCompositingChange() |
| // 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 (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. |
| + // TODO(qinmin): find a better way to handle the fullscreen case. |
|
aelias_OOO_until_Jul13
2014/03/19 01:02:21
nit: please remove this TODO, it doesn't provide u
qinmin
2014/03/19 02:26:39
Done.
|
| + Element* fullscreenElement = FullscreenElementStack::fullscreenElementFrom(*(m_page->mainFrame()->document())); |
| + if (fullscreenElement) |
| + scrollingWebLayer->setScrollClipLayer(0); |
|
aelias_OOO_until_Jul13
2014/03/19 01:02:21
Blink style is to use "nullptr".
qinmin
2014/03/19 02:26:39
I think nullptr was used for smart pointers, not f
|
| + else |
| + scrollingWebLayer->setScrollClipLayer(toWebLayer(frameView->layerForContainer())); |
| + } |
| const FrameTree& tree = m_page->mainFrame()->tree(); |
| for (const LocalFrame* child = tree.firstChild(); child; child = child->tree().nextSibling()) { |