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

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: Add RAII-style helper to toggle REF. Rebase. 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 70029aa07a59e3429df8a6af3282ffdc8f1ea122..6ec56ae219e45641cc2236ae067ceed775daf0b3 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -407,11 +407,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())
@@ -1020,7 +1018,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();
@@ -1029,7 +1026,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