Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
index f4e95cddf6821a06dfddb47f966c923a26c34bdc..98c3b767859b51fafa812deac8139546fc45173a 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -2437,6 +2437,9 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases, cons |
updateCompositedSelectionIfNeeded(); |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
+ calculatePaintProperties(); |
+ |
if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) { |
synchronizedPaint(interestRect); |
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
@@ -2453,6 +2456,19 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases, cons |
} |
} |
+void FrameView::calculatePaintProperties() |
+{ |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
+ |
+ // Detached frames can have no root graphics layer so skip even calculating paint properties. |
+ if (!layoutView()->layer()->graphicsLayerBacking()) |
+ return; |
+ |
+ lifecycle().advanceTo(DocumentLifecycle::InCalcPaintProps); |
+ // TODO(pdr): Calculate the paint properties by walking the layout tree. |
+ lifecycle().advanceTo(DocumentLifecycle::CalcPaintPropsClean); |
+} |
+ |
void FrameView::synchronizedPaint(const LayoutRect& interestRect) |
{ |
ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |