OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (m_isVertical) | 106 if (m_isVertical) |
107 m_length += fragment.y - (lastFragment->y + lastFragment->height
); | 107 m_length += fragment.y - (lastFragment->y + lastFragment->height
); |
108 else | 108 else |
109 m_length += fragment.x - (lastFragment->x + lastFragment->width)
; | 109 m_length += fragment.x - (lastFragment->x + lastFragment->width)
; |
110 | 110 |
111 lastFragment = &fragment; | 111 lastFragment = &fragment; |
112 } | 112 } |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 } | 116 } // namespace |
117 | 117 |
118 SVGTextChunkBuilder::SVGTextChunkBuilder() | 118 SVGTextChunkBuilder::SVGTextChunkBuilder() |
119 { | 119 { |
120 } | 120 } |
121 | 121 |
122 void SVGTextChunkBuilder::processTextChunks(const Vector<SVGInlineTextBox*>& lin
eLayoutBoxes) | 122 void SVGTextChunkBuilder::processTextChunks(const Vector<SVGInlineTextBox*>& lin
eLayoutBoxes) |
123 { | 123 { |
124 if (lineLayoutBoxes.isEmpty()) | 124 if (lineLayoutBoxes.isEmpty()) |
125 return; | 125 return; |
126 | 126 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 void SVGTextChunkBuilder::processTextAnchorCorrection(bool isVerticalText, float
textAnchorShift, Vector<SVGTextFragment>& fragments) | 283 void SVGTextChunkBuilder::processTextAnchorCorrection(bool isVerticalText, float
textAnchorShift, Vector<SVGTextFragment>& fragments) |
284 { | 284 { |
285 for (SVGTextFragment& fragment : fragments) { | 285 for (SVGTextFragment& fragment : fragments) { |
286 if (isVerticalText) | 286 if (isVerticalText) |
287 fragment.y += textAnchorShift; | 287 fragment.y += textAnchorShift; |
288 else | 288 else |
289 fragment.x += textAnchorShift; | 289 fragment.x += textAnchorShift; |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 } | 293 } // namespace blink |
OLD | NEW |