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

Unified Diff: Source/core/layout/svg/line/SVGRootInlineBox.cpp

Issue 1158033006: Track if textLength spacing is in effect while walking the line box tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/layout/svg/line/SVGRootInlineBox.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/line/SVGRootInlineBox.cpp
diff --git a/Source/core/layout/svg/line/SVGRootInlineBox.cpp b/Source/core/layout/svg/line/SVGRootInlineBox.cpp
index 7fe47c452113c1db7c2ccf6cd4c0d7210346d93f..c532e01c6df70851759f2001b94bcde705283060 100644
--- a/Source/core/layout/svg/line/SVGRootInlineBox.cpp
+++ b/Source/core/layout/svg/line/SVGRootInlineBox.cpp
@@ -58,7 +58,7 @@ void SVGRootInlineBox::computePerCharacterLayoutInformation()
// Perform SVG text layout phase two (see SVGTextLayoutEngine for details).
SVGTextLayoutEngine characterLayout(layoutAttributes);
- layoutCharactersInTextBoxes(this, characterLayout);
+ characterLayout.layoutCharactersInTextBoxes(this);
// Perform SVG text layout phase three (see SVGTextChunkBuilder for details).
characterLayout.finishLayout();
@@ -70,37 +70,6 @@ void SVGRootInlineBox::computePerCharacterLayoutInformation()
layoutRootBox(childRect);
}
-void SVGRootInlineBox::layoutCharactersInTextBoxes(InlineFlowBox* start, SVGTextLayoutEngine& characterLayout)
-{
- for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
- if (child->isSVGInlineTextBox()) {
- ASSERT(child->layoutObject().isSVGInlineText());
- characterLayout.layoutInlineTextBox(toSVGInlineTextBox(child));
- } else {
- // Skip generated content.
- Node* node = child->layoutObject().node();
- if (!node)
- continue;
-
- SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
- bool isTextPath = isSVGTextPathElement(*node);
- if (isTextPath) {
- // Build text chunks for all <textPath> children, using the line layout algorithm.
- // This is needeed as text-anchor is just an additional startOffset for text paths.
- SVGTextLayoutEngine lineLayout(characterLayout.layoutAttributes());
- layoutCharactersInTextBoxes(flowBox, lineLayout);
-
- characterLayout.beginTextPathLayout(&child->layoutObject(), lineLayout);
- }
-
- layoutCharactersInTextBoxes(flowBox, characterLayout);
-
- if (isTextPath)
- characterLayout.endTextPathLayout();
- }
- }
-}
-
void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, FloatRectWillBeLayoutRect* childRect)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
« no previous file with comments | « Source/core/layout/svg/line/SVGRootInlineBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698