Index: third_party/WebKit/Source/core/paint/FramePainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/FramePainter.cpp b/third_party/WebKit/Source/core/paint/FramePainter.cpp |
index 54124d2cd77f5f69725f715643354994784664de..01754c915322d82024509f588d713e85cee47855 100644 |
--- a/third_party/WebKit/Source/core/paint/FramePainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/FramePainter.cpp |
@@ -46,22 +46,12 @@ void FramePainter::paint(GraphicsContext& context, const GlobalPaintFlags global |
// TODO(pdr): Make this conditional on the rootLayerScrolls setting. |
Optional<ScopedPaintChunkProperties> scopedPaintChunkProperties; |
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
- TransformPaintPropertyNode* transform = m_frameView->scrollTranslation() ? m_frameView->scrollTranslation() : m_frameView->preTranslation(); |
- ClipPaintPropertyNode* clip = m_frameView->contentClip(); |
- ScrollPaintPropertyNode* scroll = m_frameView->scroll(); |
- PaintChunkProperties properties(context.getPaintController().currentPaintChunkProperties()); |
- if (frameView().frame().isLocalRoot()) { |
- properties.transform = frameView().rootTransform(); |
- properties.clip = frameView().rootClip(); |
- properties.effect = frameView().rootEffect(); |
- } |
- if (transform || clip || scroll) { |
- if (transform) |
- properties.transform = transform; |
- if (scroll) |
- properties.scroll = scroll; |
- if (clip) |
- properties.clip = clip; |
+ if (const PropertyTreeState* contentsState = m_frameView->totalPropertyTreeStateForContents()) { |
+ PaintChunkProperties properties(context.getPaintController().currentPaintChunkProperties()); |
+ properties.transform = contentsState->transform; |
+ properties.clip = contentsState->clip; |
+ properties.effect = contentsState->effect; |
+ properties.scroll = contentsState->scroll; |
scopedPaintChunkProperties.emplace(context.getPaintController(), *frameView().layoutView(), properties); |
} |
} |