#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/dom/Document.h"
-#include "core/dom/FullscreenElementStack.h"
+#include "core/dom/Fullscreen.h"
#include "core/dom/Node.h"
#include "core/frame/EventHandlerRegistry.h"
#include "core/frame/FrameView.h"
// 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) {
- scrollingWebLayer->setBounds(frameView->contentsSize());
- // If there is a fullscreen element, set the scroll clip layer to 0 so main frame won't scroll.
+ // 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 = FullscreenElementStack::fullscreenElementFrom(*mainFrameDocument);
+ Element* fullscreenElement = Fullscreen::fullscreenElementFrom(*mainFrameDocument);
if (fullscreenElement && fullscreenElement != mainFrameDocument->documentElement())
- scrollingWebLayer->setScrollClipLayer(0);
+ scrollingWebLayer->setBounds(IntSize());
else
- scrollingWebLayer->setScrollClipLayer(toWebLayer(frameView->layerForContainer()));
+ scrollingWebLayer->setBounds(frameView->contentsSize());
}
const FrameTree& tree = m_page->mainFrame()->tree();
if (!node || !node->inDocument())
continue;
+ // If the document belongs to an invisible subframe it does not have a composited layer
+ // and should be skipped.
+ if (node->document().isInInvisibleSubframe())
+ continue;
+
if (node->isDocumentNode() && node != document) {
accumulateDocumentTouchEventTargetRects(rects, toDocument(node));
} else if (RenderObject* renderer = node->renderer()) {
}
}
}
-
}
void ScrollingCoordinator::computeTouchEventTargetRects(LayerHitTestRects& rects)
{
MainThreadScrollingReasons reasons = static_cast<MainThreadScrollingReasons>(0);
+ if (!m_page->settings().threadedScrollingEnabled())
+ reasons |= ThreadedScrollingDisabled;
+
if (!m_page->mainFrame()->isLocalFrame())
return reasons;
FrameView* frameView = m_page->deprecatedLocalMainFrame()->view();
StringBuilder stringBuilder;
if (reasons & ScrollingCoordinator::HasSlowRepaintObjects)
- stringBuilder.append("Has slow repaint objects, ");
+ stringBuilder.appendLiteral("Has slow repaint objects, ");
if (reasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
- stringBuilder.append("Has viewport constrained objects without supporting fixed layers, ");
+ stringBuilder.appendLiteral("Has viewport constrained objects without supporting fixed layers, ");
if (reasons & ScrollingCoordinator::HasNonLayerViewportConstrainedObjects)
- stringBuilder.append("Has non-layer viewport-constrained objects, ");
+ stringBuilder.appendLiteral("Has non-layer viewport-constrained objects, ");
+ if (reasons & ScrollingCoordinator::ThreadedScrollingDisabled)
+ stringBuilder.appendLiteral("Threaded scrolling is disabled, ");
if (stringBuilder.length())
stringBuilder.resize(stringBuilder.length() - 2);