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

Unified 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 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 165538ff94d47c1aaa21db5523ae1217814c8971..efda5e49c017d5fcbb9f16095b5d641dd0a3208c 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -10,6 +10,7 @@
#include "core/layout/LayoutInline.h"
#include "core/layout/LayoutView.h"
#include "core/layout/svg/LayoutSVGRoot.h"
+#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/paint/FindPropertiesNeedingUpdate.h"
#include "core/paint/ObjectPaintProperties.h"
#include "core/paint/PaintLayer.h"
@@ -364,10 +365,10 @@ void PaintPropertyTreeBuilder::updateEffect(
PaintPropertyTreeBuilderContext& context) {
const ComputedStyle& style = object.styleRef();
- // TODO(crbug.com/673500): style.isStackingContext() is only meaningful for
- // HTML elements. What we really want to ask is whether the element starts
- // an isolated group, and SVGs use a different rule.
- if (!style.isStackingContext()) {
+ const bool isIsolatedGroup =
+ (object.isBoxModelObject() && style.isStackingContext()) ||
+ (object.isSVG() && !object.isSVGRoot() && SVGLayoutSupport::willIsolateBlendingDescendantsForObject(&object));
+ if (!isIsolatedGroup) {
if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
if (auto* properties = object.getMutableForPainting().paintProperties())
context.forceSubtreeUpdate |= properties->clearEffect();

Powered by Google App Engine
This is Rietveld 408576698