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

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

Issue 898873002: CL for perf tryjob (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/svg/SVGMaskElement.h ('k') | Source/core/svg/SVGPatternElement.h » ('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 c26ebfe9c5dcf9a057437a9c935996352eaec80a..5c2ab483f4f37aed6ec7a4e323afd304b1a31193 100644
--- a/Source/core/svg/SVGMaskElement.cpp
+++ b/Source/core/svg/SVGMaskElement.cpp
@@ -85,6 +85,24 @@ bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName)
return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
}
+bool SVGMaskElement::isPresentationAttribute(const QualifiedName& attrName) const
+{
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr)
+ return true;
+ return SVGElement::isPresentationAttribute(attrName);
+}
+
+void SVGMaskElement::collectStyleForPresentationAttribute(const QualifiedName& name, const AtomicString& value, MutableStylePropertySet* style)
+{
+ RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> property = propertyFromAttribute(name);
+ if (property == m_x)
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyX, m_x->currentValue()->valueInSpecifiedUnits(), m_x->currentValue()->cssUnitTypeQuirk());
+ else if (property == m_y)
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyY, m_y->currentValue()->valueInSpecifiedUnits(), m_y->currentValue()->cssUnitTypeQuirk());
+ else
+ SVGElement::collectStyleForPresentationAttribute(name, value, style);
+}
+
void SVGMaskElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
parseAttributeNew(name, value);
@@ -100,6 +118,13 @@ void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName)
SVGElement::InvalidationGuard invalidationGuard(this);
if (attrName == SVGNames::xAttr
+ || attrName == SVGNames::yAttr) {
+ invalidateSVGPresentationAttributeStyle();
+ setNeedsStyleRecalc(LocalStyleChange,
+ StyleChangeReasonForTracing::fromAttribute(attrName));
+ }
+
+ if (attrName == SVGNames::xAttr
|| attrName == SVGNames::yAttr
|| attrName == SVGNames::widthAttr
|| attrName == SVGNames::heightAttr)
« no previous file with comments | « Source/core/svg/SVGMaskElement.h ('k') | Source/core/svg/SVGPatternElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698