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

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

Issue 2570223002: [SPv2] Associate effect property nodes for SVG paint chunks (Closed)
Patch Set: fix isolation & apply effects to SVG graphics elements 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 d6842c36767e7f3e29447ce388f2d69f520308a7..1bccbd2e8b91ef7ac89bac0beeec33e3aafdd03b 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"
@@ -368,10 +369,13 @@ 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.isSVG() && !object.isSVGRoot())
+ ? SVGLayoutSupport::willIsolateBlendingDescendantsForObject(&object)
+ : (object.isBoxModelObject() && style.isStackingContext());
+ const bool isSVGGraphicsElement =
chrishtr 2016/12/15 19:21:23 Why skip SVG graphics elements?
trchen 2016/12/15 23:49:46 It is to include SVG graphics elements. SVGLayoutS
+ object.isSVGShape() || object.isSVGImage() || object.isSVGText();
+ if (!isIsolatedGroup && !isSVGGraphicsElement) {
if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
if (auto* properties = object.getMutableForPainting().paintProperties())
context.forceSubtreeUpdate |= properties->clearEffect();

Powered by Google App Engine
This is Rietveld 408576698