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

Unified Diff: Source/core/rendering/svg/SVGTextLayoutEngine.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline Created 6 years, 11 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: Source/core/rendering/svg/SVGTextLayoutEngine.cpp
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
index 0ade353f4a7988e8b1818f792697df9c945c065f..78da01d1d3a511382770119fa1e6e5e66cc9d1a8 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngine.cpp
@@ -148,7 +148,7 @@ bool SVGTextLayoutEngine::parentDefinesTextLength(RenderObject* parent) const
while (currentParent) {
if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromRenderer(currentParent)) {
SVGLengthContext lengthContext(textContentElement);
- if (textContentElement->lengthAdjustCurrentValue() == SVGLengthAdjustSpacing && textContentElement->specifiedTextLength().value(lengthContext) > 0)
+ if (textContentElement->lengthAdjustCurrentValue() == SVGLengthAdjustSpacing && textContentElement->textLengthIsSpecifiedByUser())
return true;
}
@@ -207,7 +207,10 @@ void SVGTextLayoutEngine::beginTextPathLayout(RenderObject* object, SVGTextLayou
if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromRenderer(textPath)) {
SVGLengthContext lengthContext(textContentElement);
lengthAdjust = textContentElement->lengthAdjustCurrentValue();
- desiredTextLength = textContentElement->specifiedTextLength().value(lengthContext);
+ if (textContentElement->textLengthIsSpecifiedByUser())
+ desiredTextLength = textContentElement->textLength()->currentValue()->value(lengthContext);
+ else
+ desiredTextLength = 0;
}
if (!desiredTextLength)

Powered by Google App Engine
This is Rietveld 408576698