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

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

Issue 2794633002: [SPv2] Fix logic for blending effect nodes due to non-isolated children of SVG. (Closed)
Patch Set: none Created 3 years, 8 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 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 <memory> 7 #include <memory>
8 #include "core/dom/DOMNodeIds.h" 8 #include "core/dom/DOMNodeIds.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 // TODO(trchen): Can't omit effect node if we have 3D children. 477 // TODO(trchen): Can't omit effect node if we have 3D children.
478 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { 478 if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
479 const ClipPaintPropertyNode* outputClip = context.inputClipOfCurrentEffect; 479 const ClipPaintPropertyNode* outputClip = context.inputClipOfCurrentEffect;
480 480
481 bool effectNodeNeeded = false; 481 bool effectNodeNeeded = false;
482 482
483 // Can't omit effect node if we have paint children with exotic blending. 483 // Can't omit effect node if we have paint children with exotic blending.
484 if (object.isSVG()) { 484 if (object.isSVG()) {
485 // Yes, including LayoutSVGRoot, because SVG layout objects don't create 485 // This handles SVGRoot objects which have PaintLayers.
486 // PaintLayer so PaintLayer::hasNonIsolatedDescendantWithBlendMode() 486 if (object.isSVGRoot() && object.hasNonIsolatedBlendingDescendants())
trchen 2017/03/31 21:33:35 if (isCSSIsolatedGroup && object.hasNonIsolatedBle
487 // doesn't catch SVG descendants. 487 effectNodeNeeded = true;
488 if (SVGLayoutSupport::isIsolationRequired(&object)) 488 else if (SVGLayoutSupport::isIsolationRequired(&object))
489 effectNodeNeeded = true; 489 effectNodeNeeded = true;
490 } else if (PaintLayer* layer = toLayoutBoxModelObject(object).layer()) { 490 } else if (PaintLayer* layer = toLayoutBoxModelObject(object).layer()) {
491 if (layer->hasNonIsolatedDescendantWithBlendMode()) 491 if (layer->hasNonIsolatedDescendantWithBlendMode())
492 effectNodeNeeded = true; 492 effectNodeNeeded = true;
493 } 493 }
494 494
495 SkBlendMode blendMode = object.isBlendingAllowed() 495 SkBlendMode blendMode = object.isBlendingAllowed()
496 ? WebCoreCompositeToSkiaComposite( 496 ? WebCoreCompositeToSkiaComposite(
497 CompositeSourceOver, style.blendMode()) 497 CompositeSourceOver, style.blendMode())
498 : SkBlendMode::kSrcOver; 498 : SkBlendMode::kSrcOver;
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 updateOverflowClip(object, context); 1132 updateOverflowClip(object, context);
1133 updatePerspective(object, context); 1133 updatePerspective(object, context);
1134 updateSvgLocalToBorderBoxTransform(object, context); 1134 updateSvgLocalToBorderBoxTransform(object, context);
1135 updateScrollAndScrollTranslation(object, context); 1135 updateScrollAndScrollTranslation(object, context);
1136 updateOutOfFlowContext(object, context); 1136 updateOutOfFlowContext(object, context);
1137 1137
1138 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); 1138 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate();
1139 } 1139 }
1140 1140
1141 } // namespace blink 1141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698