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

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

Issue 1148323008: Eliminate SVGTextChunkBuilder::m_textBoxTransformations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/svg/SVGTextChunkBuilder.cpp ('k') | no next file » | 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 void SVGTextLayoutEngine::finishLayout() 263 void SVGTextLayoutEngine::finishLayout()
264 { 264 {
265 m_visualMetricsIterator = SVGInlineTextMetricsIterator(); 265 m_visualMetricsIterator = SVGInlineTextMetricsIterator();
266 266
267 // After all text fragments are stored in their correpsonding SVGInlineTextB oxes, we can layout individual text chunks. 267 // After all text fragments are stored in their correpsonding SVGInlineTextB oxes, we can layout individual text chunks.
268 // Chunk layouting is only performed for line layout boxes, not for path lay out, where it has already been done. 268 // Chunk layouting is only performed for line layout boxes, not for path lay out, where it has already been done.
269 SVGTextChunkBuilder chunkLayoutBuilder; 269 SVGTextChunkBuilder chunkLayoutBuilder;
270 chunkLayoutBuilder.processTextChunks(m_lineLayoutBoxes); 270 chunkLayoutBuilder.processTextChunks(m_lineLayoutBoxes);
271 271
272 // Finalize transform matrices, after the chunk layout corrections have been applied, and all fragment x/y positions are finalized. 272 m_lineLayoutBoxes.clear();
273 if (!m_lineLayoutBoxes.isEmpty()) {
274 chunkLayoutBuilder.finalizeTransformMatrices(m_lineLayoutBoxes);
275 m_lineLayoutBoxes.clear();
276 }
277 } 273 }
278 274
279 bool SVGTextLayoutEngine::currentLogicalCharacterAttributes(SVGTextLayoutAttribu tes*& logicalAttributes) 275 bool SVGTextLayoutEngine::currentLogicalCharacterAttributes(SVGTextLayoutAttribu tes*& logicalAttributes)
280 { 276 {
281 if (m_layoutAttributesPosition == m_layoutAttributes.size()) 277 if (m_layoutAttributesPosition == m_layoutAttributes.size())
282 return false; 278 return false;
283 279
284 logicalAttributes = m_layoutAttributes[m_layoutAttributesPosition]; 280 logicalAttributes = m_layoutAttributes[m_layoutAttributesPosition];
285 ASSERT(logicalAttributes); 281 ASSERT(logicalAttributes);
286 282
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 532 }
537 533
538 if (!didStartTextFragment) 534 if (!didStartTextFragment)
539 return; 535 return;
540 536
541 // Close last open fragment, if needed. 537 // Close last open fragment, if needed.
542 recordTextFragment(textBox); 538 recordTextFragment(textBox);
543 } 539 }
544 540
545 } 541 }
OLDNEW
« no previous file with comments | « Source/core/layout/svg/SVGTextChunkBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698