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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2140173004: [SPv2] FrameView::synchronizedPaint should apply root property nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised Created 4 years, 5 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/paint/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index d0860a4a188193eaaaebbc0685d0f58a21805700..07abff8c33100098c0d552910bf2fbf7e1b3aa1e 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -21,19 +21,17 @@ namespace blink {
void PaintPropertyTreeBuilder::buildTreeRootNodes(FrameView& rootFrame, PaintPropertyTreeBuilderContext& context)
{
- // Only create extra root clip and transform nodes when RLS is enabled, because the main frame
- // unconditionally create frame translation / clip nodes otherwise.
- if (rootFrame.frame().settings() && rootFrame.frame().settings()->rootLayerScrolls()) {
- transformRoot = TransformPaintPropertyNode::create(TransformationMatrix(), FloatPoint3D(), nullptr);
- context.currentTransform = context.transformForAbsolutePosition = context.transformForFixedPosition = transformRoot.get();
-
- clipRoot = ClipPaintPropertyNode::create(transformRoot, FloatRoundedRect(LayoutRect::infiniteIntRect()), nullptr);
- context.currentClip = context.clipForAbsolutePosition = context.clipForFixedPosition = clipRoot.get();
- }
+ RefPtr<TransformPaintPropertyNode> transformRoot = TransformPaintPropertyNode::create(TransformationMatrix(), FloatPoint3D(), nullptr);
+ context.currentTransform = context.transformForAbsolutePosition = context.transformForFixedPosition = transformRoot.get();
+ rootFrame.setRootTransform(std::move(transformRoot));
+
+ RefPtr<ClipPaintPropertyNode> clipRoot = ClipPaintPropertyNode::create(transformRoot, FloatRoundedRect(LayoutRect::infiniteIntRect()), nullptr);
+ context.currentClip = context.clipForAbsolutePosition = context.clipForFixedPosition = clipRoot.get();
+ rootFrame.setRootClip(std::move(clipRoot));
- // The root frame never creates effect node so we unconditionally create a root node here.
- effectRoot = EffectPaintPropertyNode::create(1.0, nullptr);
+ RefPtr<EffectPaintPropertyNode> effectRoot = EffectPaintPropertyNode::create(1.0, nullptr);
context.currentEffect = effectRoot.get();
+ rootFrame.setRootEffect(std::move(effectRoot));
}
void PaintPropertyTreeBuilder::buildTreeNodes(FrameView& frameView, PaintPropertyTreeBuilderContext& context)

Powered by Google App Engine
This is Rietveld 408576698