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

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

Issue 2708923011: Avoid duplicating the CSS property mapping for SVG pres. attrs. (Closed)
Patch Set: Created 3 years, 10 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/SVGPathElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
index c2bd58a427f52c2760aadb2823a5ec30c3da4e04..481e10e40a08c9bf3f3709c9bf8973c35c416fd4 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp
@@ -20,7 +20,6 @@
#include "core/svg/SVGPathElement.h"
-#include "core/css/CSSIdentifierValue.h"
#include "core/dom/StyleChangeReason.h"
#include "core/layout/svg/LayoutSVGPath.h"
#include "core/svg/SVGMPathElement.h"
@@ -120,14 +119,8 @@ void SVGPathElement::collectStyleForPresentationAttribute(
// geometry sharing.
if (const SVGElement* element = correspondingElement())
path = toSVGPathElement(element)->path();
-
- CSSPathValue* pathValue = path->currentValue()->pathValue();
- if (pathValue->stylePath()->byteStream().isEmpty()) {
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyD, CSSIdentifierValue::create(CSSValueNone));
- return;
- }
- addPropertyToPresentationAttributeStyle(style, CSSPropertyD, pathValue);
+ addPropertyToPresentationAttributeStyle(style, property->cssPropertyId(),
+ path->cssValue());
return;
}
SVGGeometryElement::collectStyleForPresentationAttribute(name, value, style);
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGMaskElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698