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

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

Issue 963733002: [svg2] Make 'width' and 'height' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline some EX tests [Mac Win] Created 5 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 | « Source/core/svg/SVGLengthContext.cpp ('k') | Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGMaskElement.cpp
diff --git a/Source/core/svg/SVGMaskElement.cpp b/Source/core/svg/SVGMaskElement.cpp
index fbf18fa40003482ac63e5907cc5cad548a5a4448..7cb521308810de1a94a2d2f66764d25411b56e05 100644
--- a/Source/core/svg/SVGMaskElement.cpp
+++ b/Source/core/svg/SVGMaskElement.cpp
@@ -87,14 +87,16 @@ bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName)
bool SVGMaskElement::isPresentationAttribute(const QualifiedName& attrName) const
{
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
return true;
return SVGElement::isPresentationAttribute(attrName);
}
bool SVGMaskElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attrName) const
{
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr)
return true;
return SVGElement::isPresentationAttributeWithSVGDOM(attrName);
}
@@ -106,6 +108,10 @@ void SVGMaskElement::collectStyleForPresentationAttribute(const QualifiedName& n
addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyX, *m_x->currentValue());
else if (property == m_y)
addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyY, *m_y->currentValue());
+ else if (property == m_width)
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyWidth, *m_width->currentValue());
+ else if (property == m_height)
+ addSVGLengthPropertyToPresentationAttributeStyle(style, CSSPropertyHeight, *m_height->currentValue());
else
SVGElement::collectStyleForPresentationAttribute(name, value, style);
}
@@ -125,17 +131,14 @@ void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName)
SVGElement::InvalidationGuard invalidationGuard(this);
if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr) {
+ || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr
+ || attrName == SVGNames::heightAttr) {
invalidateSVGPresentationAttributeStyle();
setNeedsStyleRecalc(LocalStyleChange,
StyleChangeReasonForTracing::fromAttribute(attrName));
- }
-
- if (attrName == SVGNames::xAttr
- || attrName == SVGNames::yAttr
- || attrName == SVGNames::widthAttr
- || attrName == SVGNames::heightAttr)
updateRelativeLengthsInformation();
+ }
LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject());
if (renderer)
« no previous file with comments | « Source/core/svg/SVGLengthContext.cpp ('k') | Source/core/svg/SVGRectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698