OLD | NEW |
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 ++m_logicalMetricsListOffset; | 350 ++m_logicalMetricsListOffset; |
351 m_logicalCharacterOffset += logicalMetrics.length(); | 351 m_logicalCharacterOffset += logicalMetrics.length(); |
352 } | 352 } |
353 | 353 |
354 void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, Line
LayoutSVGInlineText textLineLayout, const ComputedStyle& style) | 354 void SVGTextLayoutEngine::layoutTextOnLineOrPath(SVGInlineTextBox* textBox, Line
LayoutSVGInlineText textLineLayout, const ComputedStyle& style) |
355 { | 355 { |
356 if (m_inPathLayout && !m_textPathCalculator) | 356 if (m_inPathLayout && !m_textPathCalculator) |
357 return; | 357 return; |
358 | 358 |
359 // Find the start of the current text box in the metrics list. | 359 // Find the start of the current text box in the metrics list. |
360 m_visualMetricsIterator.advanceToTextStart(&textLineLayout, textBox->start()
); | 360 m_visualMetricsIterator.advanceToTextStart(textLineLayout, textBox->start())
; |
361 | 361 |
362 const Font& font = style.font(); | 362 const Font& font = style.font(); |
363 | 363 |
364 SVGTextLayoutEngineSpacing spacingLayout(font, style.effectiveZoom()); | 364 SVGTextLayoutEngineSpacing spacingLayout(font, style.effectiveZoom()); |
365 SVGTextLayoutEngineBaseline baselineLayout(font, style.effectiveZoom()); | 365 SVGTextLayoutEngineBaseline baselineLayout(font, style.effectiveZoom()); |
366 | 366 |
367 bool didStartTextFragment = false; | 367 bool didStartTextFragment = false; |
368 bool applySpacingToNextCharacter = false; | 368 bool applySpacingToNextCharacter = false; |
369 | 369 |
370 float lastAngle = 0; | 370 float lastAngle = 0; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 } | 557 } |
558 | 558 |
559 if (!didStartTextFragment) | 559 if (!didStartTextFragment) |
560 return; | 560 return; |
561 | 561 |
562 // Close last open fragment, if needed. | 562 // Close last open fragment, if needed. |
563 recordTextFragment(textBox); | 563 recordTextFragment(textBox); |
564 } | 564 } |
565 | 565 |
566 } | 566 } |
OLD | NEW |