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

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

Issue 2549563002: Only communicate CSSPrimitiveValue references from SVGLength (Closed)
Patch Set: Created 4 years 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/SVGMaskElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGMaskElement.cpp b/third_party/WebKit/Source/core/svg/SVGMaskElement.cpp
index 95b071a515e7c9dfb776368bb5e60446f8febe11..eadc802a5be4bdf41daaa42ffc5c33a91a2afc2f 100644
--- a/third_party/WebKit/Source/core/svg/SVGMaskElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGMaskElement.cpp
@@ -93,22 +93,21 @@ void SVGMaskElement::collectStyleForPresentationAttribute(
const AtomicString& value,
MutableStylePropertySet* style) {
SVGAnimatedPropertyBase* property = propertyFromAttribute(name);
- if (property == m_x)
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyX, m_x->currentValue()->asCSSPrimitiveValue());
- else if (property == m_y)
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyY, m_y->currentValue()->asCSSPrimitiveValue());
- else if (property == m_width)
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyWidth,
- m_width->currentValue()->asCSSPrimitiveValue());
- else if (property == m_height)
- addPropertyToPresentationAttributeStyle(
- style, CSSPropertyHeight,
- m_height->currentValue()->asCSSPrimitiveValue());
- else
+ if (property == m_x) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyX,
+ m_x->cssValue());
+ } else if (property == m_y) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyY,
+ m_y->cssValue());
+ } else if (property == m_width) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyWidth,
+ m_width->cssValue());
+ } else if (property == m_height) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyHeight,
+ m_height->cssValue());
+ } else {
SVGElement::collectStyleForPresentationAttribute(name, value, style);
+ }
}
void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) {
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLength.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