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

Unified Diff: Source/core/svg/SVGPathElement.cpp

Issue 669153002: Relocate markForLayoutAndParentResourceInvalidation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Dependency reduction/possibly clearer API. Created 6 years, 2 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
Index: Source/core/svg/SVGPathElement.cpp
diff --git a/Source/core/svg/SVGPathElement.cpp b/Source/core/svg/SVGPathElement.cpp
index 20ec252c46b97ae21b74dca1035a14dfdaca2fe7..9ee18373594aa24ea924aec9d5a598fac39e0b92 100644
--- a/Source/core/svg/SVGPathElement.cpp
+++ b/Source/core/svg/SVGPathElement.cpp
@@ -22,7 +22,6 @@
#include "core/svg/SVGPathElement.h"
#include "core/rendering/svg/RenderSVGPath.h"
-#include "core/rendering/svg/RenderSVGResource.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGMPathElement.h"
#include "core/svg/SVGPathSegArcAbs.h"
@@ -220,14 +219,17 @@ void SVGPathElement::svgAttributeChanged(const QualifiedName& attrName)
RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
if (attrName == SVGNames::dAttr) {
- if (renderer)
+ if (renderer) {
renderer->setNeedsShapeUpdate();
+ boundsChanged(renderer);
+ }
invalidateMPathDependencies();
+ } else {
+ // 'pathLength' changed.
+ if (renderer)
+ markForLayoutAndParentResourceInvalidation(renderer);
}
-
- if (renderer)
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
void SVGPathElement::invalidateMPathDependencies()
@@ -267,7 +269,7 @@ void SVGPathElement::pathSegListChanged(ListModification listModification)
return;
renderer->setNeedsShapeUpdate();
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+ boundsChanged(renderer);
}
FloatRect SVGPathElement::getBBox()

Powered by Google App Engine
This is Rietveld 408576698