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

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

Issue 2745053005: 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 4e39e7fb80f4d52fdcca3ce067860ca5b333f8d0..48e88cebce675312212b504c860fc2785fc537b9 100644
--- a/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGGraphicsElement.cpp
@@ -169,20 +169,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