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

Unified Diff: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp

Issue 2755813004: Invalidate SVG 'transform' pres. attribute style even if not attached (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/transforms/svgdom-manipulation-before-attach-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
index ef6163ef7b2b9d0e1f6ad0e7b482d05612fe6a0b..f81bded9c0b4b05b1a3dddb95ee176194925049a 100644
--- a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
@@ -136,20 +136,16 @@ void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName) {
}
if (attrName == SVGNames::transformAttr) {
- LayoutObject* object = layoutObject();
- if (!object)
- return;
-
- invalidateSVGPresentationAttributeStyle();
-
SVGElement::InvalidationGuard invalidationGuard(this);
+ invalidateSVGPresentationAttributeStyle();
// TODO(fs): The InvalidationGuard will make sure all instances are
// invalidated, but the style recalc will propagate to instances too. So
// there is some redundant operations being performed here. Could we get
// away with removing the InvalidationGuard?
setNeedsStyleRecalc(LocalStyleChange,
StyleChangeReasonForTracing::fromAttribute(attrName));
- markForLayoutAndParentResourceInvalidation(object);
+ if (LayoutObject* object = layoutObject())
+ markForLayoutAndParentResourceInvalidation(object);
return;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/transforms/svgdom-manipulation-before-attach-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698