OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * Copyright (C) 2006 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer Inc. |
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. | 6 * Copyright (C) 2011 Torch Mobile (Beijing) CO. Ltd. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 SVGRenderSupport::finishRenderSVGContent(boxRenderer, childPaintInfo, paintI
nfo.context); | 71 SVGRenderSupport::finishRenderSVGContent(boxRenderer, childPaintInfo, paintI
nfo.context); |
72 } | 72 } |
73 | 73 |
74 void SVGRootInlineBox::computePerCharacterLayoutInformation() | 74 void SVGRootInlineBox::computePerCharacterLayoutInformation() |
75 { | 75 { |
76 RenderSVGText* parentBlock = toRenderSVGText(block()); | 76 RenderSVGText* parentBlock = toRenderSVGText(block()); |
77 ASSERT(parentBlock); | 77 ASSERT(parentBlock); |
78 | 78 |
79 Vector<SVGTextLayoutAttributes>& attributes = parentBlock->layoutAttributes(
); | 79 Vector<SVGTextLayoutAttributes>& attributes = parentBlock->layoutAttributes(
); |
| 80 if (attributes.isEmpty()) |
| 81 return; |
| 82 |
80 if (parentBlock->needsReordering()) | 83 if (parentBlock->needsReordering()) |
81 reorderValueLists(attributes); | 84 reorderValueLists(attributes); |
82 | 85 |
83 // Perform SVG text layout phase two (see SVGTextLayoutEngine for details). | 86 // Perform SVG text layout phase two (see SVGTextLayoutEngine for details). |
84 SVGTextLayoutEngine characterLayout(attributes); | 87 SVGTextLayoutEngine characterLayout(attributes); |
85 layoutCharactersInTextBoxes(this, characterLayout); | 88 layoutCharactersInTextBoxes(this, characterLayout); |
86 | 89 |
87 // Perform SVG text layout phase three (see SVGTextChunkBuilder for details)
. | 90 // Perform SVG text layout phase three (see SVGTextChunkBuilder for details)
. |
88 characterLayout.finishLayout(); | 91 characterLayout.finishLayout(); |
89 | 92 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 311 |
309 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes>& attrib
utes) | 312 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes>& attrib
utes) |
310 { | 313 { |
311 Vector<InlineBox*> leafBoxesInLogicalOrder; | 314 Vector<InlineBox*> leafBoxesInLogicalOrder; |
312 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); | 315 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); |
313 } | 316 } |
314 | 317 |
315 } // namespace WebCore | 318 } // namespace WebCore |
316 | 319 |
317 #endif // ENABLE(SVG) | 320 #endif // ENABLE(SVG) |
OLD | NEW |