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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2570223002: [SPv2] Associate effect property nodes for SVG paint chunks (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilder.h" 5 #include "core/paint/PaintPropertyTreeBuilder.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
11 #include "core/layout/LayoutView.h" 11 #include "core/layout/LayoutView.h"
12 #include "core/layout/svg/LayoutSVGRoot.h" 12 #include "core/layout/svg/LayoutSVGRoot.h"
13 #include "core/layout/svg/SVGLayoutSupport.h"
13 #include "core/paint/FindPropertiesNeedingUpdate.h" 14 #include "core/paint/FindPropertiesNeedingUpdate.h"
14 #include "core/paint/ObjectPaintProperties.h" 15 #include "core/paint/ObjectPaintProperties.h"
15 #include "core/paint/PaintLayer.h" 16 #include "core/paint/PaintLayer.h"
16 #include "core/paint/SVGRootPainter.h" 17 #include "core/paint/SVGRootPainter.h"
17 #include "platform/transforms/TransformationMatrix.h" 18 #include "platform/transforms/TransformationMatrix.h"
18 #include "wtf/PtrUtil.h" 19 #include "wtf/PtrUtil.h"
19 #include <memory> 20 #include <memory>
20 21
21 namespace blink { 22 namespace blink {
22 23
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 context.current.shouldFlattenInheritedTransform = true; 358 context.current.shouldFlattenInheritedTransform = true;
358 } 359 }
359 } 360 }
360 } 361 }
361 362
362 void PaintPropertyTreeBuilder::updateEffect( 363 void PaintPropertyTreeBuilder::updateEffect(
363 const LayoutObject& object, 364 const LayoutObject& object,
364 PaintPropertyTreeBuilderContext& context) { 365 PaintPropertyTreeBuilderContext& context) {
365 const ComputedStyle& style = object.styleRef(); 366 const ComputedStyle& style = object.styleRef();
366 367
367 // TODO(crbug.com/673500): style.isStackingContext() is only meaningful for 368 const bool isIsolatedGroup =
368 // HTML elements. What we really want to ask is whether the element starts 369 (object.isBoxModelObject() && style.isStackingContext()) ||
369 // an isolated group, and SVGs use a different rule. 370 (object.isSVG() && !object.isSVGRoot() && SVGLayoutSupport::willIsolateBlend ingDescendantsForObject(&object));
370 if (!style.isStackingContext()) { 371 if (!isIsolatedGroup) {
371 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 372 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
372 if (auto* properties = object.getMutableForPainting().paintProperties()) 373 if (auto* properties = object.getMutableForPainting().paintProperties())
373 context.forceSubtreeUpdate |= properties->clearEffect(); 374 context.forceSubtreeUpdate |= properties->clearEffect();
374 } 375 }
375 return; 376 return;
376 } 377 }
377 378
378 // TODO(trchen): Can't omit effect node if we have 3D children. 379 // TODO(trchen): Can't omit effect node if we have 3D children.
379 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 380 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
380 bool effectNodeNeeded = false; 381 bool effectNodeNeeded = false;
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 #endif 927 #endif
927 928
928 updateOverflowClip(object, context); 929 updateOverflowClip(object, context);
929 updatePerspective(object, context); 930 updatePerspective(object, context);
930 updateSvgLocalToBorderBoxTransform(object, context); 931 updateSvgLocalToBorderBoxTransform(object, context);
931 updateScrollAndScrollTranslation(object, context); 932 updateScrollAndScrollTranslation(object, context);
932 updateOutOfFlowContext(object, context); 933 updateOutOfFlowContext(object, context);
933 } 934 }
934 935
935 } // namespace blink 936 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698