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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 bool foundFirstFragment = false; | 232 bool foundFirstFragment = false; |
233 for (auto boxIter = boxStart; boxIter != boxEnd; ++boxIter) { | 233 for (auto boxIter = boxStart; boxIter != boxEnd; ++boxIter) { |
234 SVGInlineTextBox* textBox = *boxIter; | 234 SVGInlineTextBox* textBox = *boxIter; |
235 Vector<SVGTextFragment>& fragments = textBox->textFragments(); | 235 Vector<SVGTextFragment>& fragments = textBox->textFragments(); |
236 if (fragments.isEmpty()) | 236 if (fragments.isEmpty()) |
237 continue; | 237 continue; |
238 | 238 |
239 if (!foundFirstFragment) { | 239 if (!foundFirstFragment) { |
240 foundFirstFragment = true; | 240 foundFirstFragment = true; |
241 textLengthBias = | 241 textLengthBias = |
242 computeTextLengthBias(fragments.first(), textLengthScale); | 242 computeTextLengthBias(fragments.front(), textLengthScale); |
243 } | 243 } |
244 | 244 |
245 applyTextLengthScaleAdjustment(textLengthScale, textLengthBias, | 245 applyTextLengthScaleAdjustment(textLengthScale, textLengthBias, |
246 fragments); | 246 fragments); |
247 } | 247 } |
248 } | 248 } |
249 } | 249 } |
250 | 250 |
251 if (!processTextAnchor) | 251 if (!processTextAnchor) |
252 return; | 252 return; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 Vector<SVGTextFragment>& fragments) { | 293 Vector<SVGTextFragment>& fragments) { |
294 for (SVGTextFragment& fragment : fragments) { | 294 for (SVGTextFragment& fragment : fragments) { |
295 if (isVerticalText) | 295 if (isVerticalText) |
296 fragment.y += textAnchorShift; | 296 fragment.y += textAnchorShift; |
297 else | 297 else |
298 fragment.x += textAnchorShift; | 298 fragment.x += textAnchorShift; |
299 } | 299 } |
300 } | 300 } |
301 | 301 |
302 } // namespace blink | 302 } // namespace blink |
OLD | NEW |