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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/SVGTextLayoutEngine.cpp

Issue 1629643002: [Line Layout API] Convert some SVG code to line layout API or shim (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_api_visible_units_test
Patch Set: layoutObjectFrom -> constLayoutObjectFrom Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/SVGRootInlineBoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 && textContentElement->textLengthIsSpecifiedByUser(); 252 && textContentElement->textLengthIsSpecifiedByUser();
253 } 253 }
254 254
255 void SVGTextLayoutEngine::layoutCharactersInTextBoxes(InlineFlowBox* start) 255 void SVGTextLayoutEngine::layoutCharactersInTextBoxes(InlineFlowBox* start)
256 { 256 {
257 bool textLengthSpacingInEffect = m_textLengthSpacingInEffect || definesTextL engthWithSpacing(start); 257 bool textLengthSpacingInEffect = m_textLengthSpacingInEffect || definesTextL engthWithSpacing(start);
258 TemporaryChange<bool> textLengthSpacingScope(m_textLengthSpacingInEffect, te xtLengthSpacingInEffect); 258 TemporaryChange<bool> textLengthSpacingScope(m_textLengthSpacingInEffect, te xtLengthSpacingInEffect);
259 259
260 for (InlineBox* child = start->firstChild(); child; child = child->nextOnLin e()) { 260 for (InlineBox* child = start->firstChild(); child; child = child->nextOnLin e()) {
261 if (child->isSVGInlineTextBox()) { 261 if (child->isSVGInlineTextBox()) {
262 ASSERT(child->layoutObject().isSVGInlineText()); 262 ASSERT(child->lineLayoutItem().isSVGInlineText());
263 layoutInlineTextBox(toSVGInlineTextBox(child)); 263 layoutInlineTextBox(toSVGInlineTextBox(child));
264 } else { 264 } else {
265 // Skip generated content. 265 // Skip generated content.
266 Node* node = child->layoutObject().node(); 266 Node* node = child->lineLayoutItem().node();
267 if (!node) 267 if (!node)
268 continue; 268 continue;
269 269
270 SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child); 270 SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
271 bool isTextPath = isSVGTextPathElement(*node); 271 bool isTextPath = isSVGTextPathElement(*node);
272 if (isTextPath) 272 if (isTextPath)
273 beginTextPathLayout(flowBox); 273 beginTextPathLayout(flowBox);
274 274
275 layoutCharactersInTextBoxes(flowBox); 275 layoutCharactersInTextBoxes(flowBox);
276 276
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 } 552 }
553 553
554 if (!didStartTextFragment) 554 if (!didStartTextFragment)
555 return; 555 return;
556 556
557 // Close last open fragment, if needed. 557 // Close last open fragment, if needed.
558 recordTextFragment(textBox); 558 recordTextFragment(textBox);
559 } 559 }
560 560
561 } 561 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/SVGRootInlineBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698