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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 if (child->isSVGInlineTextBox()) { | 97 if (child->isSVGInlineTextBox()) { |
98 ASSERT(child->renderer().isSVGInlineText()); | 98 ASSERT(child->renderer().isSVGInlineText()); |
99 characterLayout.layoutInlineTextBox(toSVGInlineTextBox(child)); | 99 characterLayout.layoutInlineTextBox(toSVGInlineTextBox(child)); |
100 } else { | 100 } else { |
101 // Skip generated content. | 101 // Skip generated content. |
102 Node* node = child->renderer().node(); | 102 Node* node = child->renderer().node(); |
103 if (!node) | 103 if (!node) |
104 continue; | 104 continue; |
105 | 105 |
106 SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child); | 106 SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child); |
107 bool isTextPath = node->hasTagName(SVGNames::textPathTag); | 107 bool isTextPath = isSVGTextPathElement(*node); |
108 if (isTextPath) { | 108 if (isTextPath) { |
109 // Build text chunks for all <textPath> children, using the line
layout algorithm. | 109 // Build text chunks for all <textPath> children, using the line
layout algorithm. |
110 // This is needeed as text-anchor is just an additional startOff
set for text paths. | 110 // This is needeed as text-anchor is just an additional startOff
set for text paths. |
111 SVGTextLayoutEngine lineLayout(characterLayout.layoutAttributes(
)); | 111 SVGTextLayoutEngine lineLayout(characterLayout.layoutAttributes(
)); |
112 layoutCharactersInTextBoxes(flowBox, lineLayout); | 112 layoutCharactersInTextBoxes(flowBox, lineLayout); |
113 | 113 |
114 characterLayout.beginTextPathLayout(&child->renderer(), lineLayo
ut); | 114 characterLayout.beginTextPathLayout(&child->renderer(), lineLayo
ut); |
115 } | 115 } |
116 | 116 |
117 layoutCharactersInTextBoxes(flowBox, characterLayout); | 117 layoutCharactersInTextBoxes(flowBox, characterLayout); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 278 } |
279 } | 279 } |
280 | 280 |
281 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri
butes) | 281 void SVGRootInlineBox::reorderValueLists(Vector<SVGTextLayoutAttributes*>& attri
butes) |
282 { | 282 { |
283 Vector<InlineBox*> leafBoxesInLogicalOrder; | 283 Vector<InlineBox*> leafBoxesInLogicalOrder; |
284 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); | 284 collectLeafBoxesInLogicalOrder(leafBoxesInLogicalOrder, reverseInlineBoxRang
eAndValueListsIfNeeded, &attributes); |
285 } | 285 } |
286 | 286 |
287 } // namespace WebCore | 287 } // namespace WebCore |
OLD | NEW |