Chromium Code Reviews| 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 f746385496ae0a2289962a75afd1548e35181379..d8b3a66a73aa676ec94efc5d53faed9f17d75b5d 100644 |
| --- a/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp |
| +++ b/third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp |
| @@ -19,8 +19,9 @@ |
| #include "core/layout/svg/SVGTextLayoutEngine.h" |
| +#include "core/layout/api/LineLayoutAPIShim.h" |
| +#include "core/layout/api/LineLayoutSVGTextPath.h" |
| #include "core/layout/svg/LayoutSVGInlineText.h" |
| -#include "core/layout/svg/LayoutSVGTextPath.h" |
| #include "core/layout/svg/SVGTextChunkBuilder.h" |
| #include "core/layout/svg/SVGTextLayoutEngineBaseline.h" |
| #include "core/layout/svg/SVGTextLayoutEngineSpacing.h" |
| @@ -171,14 +172,14 @@ void SVGTextLayoutEngine::beginTextPathLayout(SVGInlineFlowBox* flowBox) |
| lineLayout.layoutCharactersInTextBoxes(flowBox); |
| m_inPathLayout = true; |
| - LayoutSVGTextPath* textPath = &toLayoutSVGTextPath(flowBox->layoutObject()); |
| + LineLayoutSVGTextPath textPath = LineLayoutSVGTextPath(flowBox->lineLayoutItem()); |
| - Path path = textPath->layoutPath(); |
| + Path path = textPath.layoutPath(); |
| if (path.isEmpty()) |
| return; |
| m_textPathCalculator = new Path::PositionCalculator(path); |
| m_textPathLength = path.length(); |
| - m_textPathStartOffset = textPath->calculateStartOffset(m_textPathLength); |
| + m_textPathStartOffset = textPath.calculateStartOffset(m_textPathLength); |
| SVGTextPathChunkBuilder textPathChunkLayoutBuilder; |
| textPathChunkLayoutBuilder.processTextChunks(lineLayout.m_lineLayoutBoxes); |
| @@ -190,7 +191,7 @@ void SVGTextLayoutEngine::beginTextPathLayout(SVGInlineFlowBox* flowBox) |
| SVGLengthAdjustType lengthAdjust = SVGLengthAdjustUnknown; |
| float desiredTextLength = 0; |
| - if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(textPath)) { |
| + if (SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(LineLayoutAPIShim::layoutObjectFrom(textPath))) { |
|
leviw_travelin_and_unemployed
2016/02/08 08:09:48
It'd be good to push this down and rename SVGTextC
|
| SVGLengthContext lengthContext(textContentElement); |
| lengthAdjust = textContentElement->lengthAdjust()->currentValue()->enumValue(); |
| if (textContentElement->textLengthIsSpecifiedByUser()) |