| 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()));
|
|
|