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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2258523006: Convert Settings::rootLayerScrolls to RuntimeEnabledFeatures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index 2f593681d52b1b5ffa22afdc60132198ca0c6d9a..86df0c5e5b1728485a516a664630e260221b76e0 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -406,11 +406,9 @@ void PaintLayerCompositor::updateIfNeeded()
if (updateType != CompositingUpdateNone) {
if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) {
- LocalFrame* frame = m_layoutView.document().frame();
- Settings* settings = frame ? frame->settings() : nullptr;
// If rootLayerScrolls is enabled, these properties are applied in
// CompositedLayerMapping::updateElementIdAndCompositorMutableProperties.
- if (!settings || !settings->rootLayerScrolls()) {
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
if (Element* scrollingElement = m_layoutView.document().scrollingElement()) {
uint32_t mutableProperties = CompositorMutableProperty::kNone;
if (scrollingElement->hasCompositorProxy())
@@ -1019,7 +1017,6 @@ void PaintLayerCompositor::ensureRootLayer()
if (expectedAttachment == m_rootLayerAttachment)
return;
- Settings* settings = m_layoutView.document().settings();
if (!m_rootContentLayer) {
m_rootContentLayer = GraphicsLayer::create(this);
IntRect overflowRect = m_layoutView.pixelSnappedLayoutOverflowRect();
@@ -1028,7 +1025,7 @@ void PaintLayerCompositor::ensureRootLayer()
m_rootContentLayer->setOwnerNodeId(DOMNodeIds::idForNode(m_layoutView.node()));
// FIXME: with rootLayerScrolls, we probably don't even need m_rootContentLayer?
- if (!(settings && settings->rootLayerScrolls())) {
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
// Need to clip to prevent transformed content showing outside this frame
m_rootContentLayer->setMasksToBounds(true);
}

Powered by Google App Engine
This is Rietveld 408576698