| Index: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
|
| index 7d44ebb130e1be97065a02cb9979dcc48c801c58..627aae9435e73412af1b30fb59df5c25c0d24ce8 100644
|
| --- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp
|
| @@ -171,8 +171,13 @@ void SVGTextLayoutEngine::beginTextPathLayout(SVGInlineFlowBox* flowBox)
|
| lineLayout.layoutCharactersInTextBoxes(flowBox);
|
|
|
| m_inPathLayout = true;
|
| + // Do we need to add a LineLayoutSVGTextPath class to handle this logic?
|
| + // I'd imagine it'd only have 2 methods, startOffset() and layoutPath().
|
| LayoutSVGTextPath* textPath = &toLayoutSVGTextPath(flowBox->layoutObject());
|
|
|
| + // Actually, what would I do with Path here? Would we have to add a LineLayoutPath
|
| + // class too? And then what would we do about PositionCalculator?
|
| + // Does this pattern bring to mind any examples I can look at?
|
| Path path = textPath->layoutPath();
|
| if (path.isEmpty())
|
| return;
|
| @@ -192,7 +197,7 @@ void SVGTextLayoutEngine::beginTextPathLayout(SVGInlineFlowBox* flowBox)
|
| SVGLengthAdjustType lengthAdjust = SVGLengthAdjustUnknown;
|
| float desiredTextLength = 0;
|
|
|
| - if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(textPath)) {
|
| + if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(flowBox->lineLayoutItem())) {
|
| SVGLengthContext lengthContext(textContentElement);
|
| lengthAdjust = textContentElement->lengthAdjust()->currentValue()->enumValue();
|
| if (textContentElement->textLengthIsSpecifiedByUser())
|
| @@ -246,7 +251,7 @@ void SVGTextLayoutEngine::layoutInlineTextBox(SVGInlineTextBox* textBox)
|
|
|
| static bool definesTextLengthWithSpacing(const InlineFlowBox* start)
|
| {
|
| - SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(&start->layoutObject());
|
| + SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(start->lineLayoutItem());
|
| return textContentElement
|
| && textContentElement->lengthAdjust()->currentValue()->enumValue() == SVGLengthAdjustSpacing
|
| && textContentElement->textLengthIsSpecifiedByUser();
|
|
|