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

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

Issue 651353004: SVGElement::parseAttribute resolves property via property map (Step 2.5) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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/SVGSVGElement.cpp ('k') | Source/core/svg/SVGViewElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTextPositioningElement.cpp
diff --git a/Source/core/svg/SVGTextPositioningElement.cpp b/Source/core/svg/SVGTextPositioningElement.cpp
index 9e89274c9c776abf6cd34a01648051f18d44d1c1..2dcf468c3a92c8a31b42ce5e666d2bb5891aa124 100644
--- a/Source/core/svg/SVGTextPositioningElement.cpp
+++ b/Source/core/svg/SVGTextPositioningElement.cpp
@@ -60,27 +60,7 @@ bool SVGTextPositioningElement::isSupportedAttribute(const QualifiedName& attrNa
void SVGTextPositioningElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
- if (!isSupportedAttribute(name)) {
- SVGTextContentElement::parseAttribute(name, value);
- return;
- }
-
- SVGParsingError parseError = NoError;
-
- if (name == SVGNames::xAttr)
- m_x->setBaseValueAsString(value, parseError);
- else if (name == SVGNames::yAttr)
- m_y->setBaseValueAsString(value, parseError);
- else if (name == SVGNames::dxAttr)
- m_dx->setBaseValueAsString(value, parseError);
- else if (name == SVGNames::dyAttr)
- m_dy->setBaseValueAsString(value, parseError);
- else if (name == SVGNames::rotateAttr)
- m_rotate->setBaseValueAsString(value, parseError);
- else
- ASSERT_NOT_REACHED();
-
- reportAttributeParsingError(parseError, name, value);
+ parseAttributeNew(name, value);
}
void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrName)
@@ -104,14 +84,11 @@ void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrNam
if (!renderer)
return;
- if (updateRelativeLengths || attrName == SVGNames::rotateAttr) {
- if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(renderer))
- textRenderer->setNeedsPositioningValuesUpdate();
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
- return;
- }
+ ASSERT(updateRelativeLengths || attrName == SVGNames::rotateAttr);
- ASSERT_NOT_REACHED();
+ if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(renderer))
+ textRenderer->setNeedsPositioningValuesUpdate();
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
SVGTextPositioningElement* SVGTextPositioningElement::elementFromRenderer(RenderObject* renderer)
« no previous file with comments | « Source/core/svg/SVGSVGElement.cpp ('k') | Source/core/svg/SVGViewElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698