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

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

Issue 2912663002: Clean up creation of "detached" SVG* data type objects (Closed)
Patch Set: Created 3 years, 7 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: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index e2c60f615b88952ad973ac47169a0be428038a16..deaca43e294d122a90d189fa72983e1a5ba70cb4 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -130,7 +130,8 @@ class SVGCurrentTranslateTearOff : public SVGPointTearOff {
SVGCurrentTranslateTearOff(SVGSVGElement* context_element)
: SVGPointTearOff(context_element->translation_,
context_element,
- kPropertyIsNotAnimVal) {}
+ kPropertyIsNotAnimVal,
+ QualifiedName::Null()) {}
};
SVGPointTearOff* SVGSVGElement::currentTranslateFromJavascript() {
@@ -421,21 +422,19 @@ void SVGSVGElement::deselectAll() {
}
SVGNumberTearOff* SVGSVGElement::createSVGNumber() {
- return SVGNumberTearOff::Create(SVGNumber::Create(0.0f), 0,
- kPropertyIsNotAnimVal);
+ return SVGNumberTearOff::CreateDetached();
}
SVGLengthTearOff* SVGSVGElement::createSVGLength() {
- return SVGLengthTearOff::Create(SVGLength::Create(), 0,
- kPropertyIsNotAnimVal);
+ return SVGLengthTearOff::CreateDetached();
}
SVGAngleTearOff* SVGSVGElement::createSVGAngle() {
- return SVGAngleTearOff::Create(SVGAngle::Create(), 0, kPropertyIsNotAnimVal);
+ return SVGAngleTearOff::CreateDetached();
}
SVGPointTearOff* SVGSVGElement::createSVGPoint() {
- return SVGPointTearOff::Create(SVGPoint::Create(), 0, kPropertyIsNotAnimVal);
+ return SVGPointTearOff::CreateDetached(FloatPoint(0, 0));
}
SVGMatrixTearOff* SVGSVGElement::createSVGMatrix() {
@@ -443,12 +442,11 @@ SVGMatrixTearOff* SVGSVGElement::createSVGMatrix() {
}
SVGRectTearOff* SVGSVGElement::createSVGRect() {
- return SVGRectTearOff::Create(SVGRect::Create(), 0, kPropertyIsNotAnimVal);
+ return SVGRectTearOff::CreateDetached(FloatRect(0, 0, 0, 0));
}
SVGTransformTearOff* SVGSVGElement::createSVGTransform() {
- return SVGTransformTearOff::Create(SVGTransform::Create(kSvgTransformMatrix),
- 0, kPropertyIsNotAnimVal);
+ return SVGTransformTearOff::CreateDetached();
}
SVGTransformTearOff* SVGSVGElement::createSVGTransformFromMatrix(
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRectTearOff.cpp ('k') | third_party/WebKit/Source/core/svg/SVGStringListTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698