| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 m_textPathStartOffset = 0; | 233 m_textPathStartOffset = 0; |
| 234 m_textPathCurrentOffset = 0; | 234 m_textPathCurrentOffset = 0; |
| 235 m_textPathSpacing = 0; | 235 m_textPathSpacing = 0; |
| 236 m_textPathScaling = 1; | 236 m_textPathScaling = 1; |
| 237 } | 237 } |
| 238 | 238 |
| 239 void SVGTextLayoutEngine::layoutInlineTextBox(SVGInlineTextBox* textBox) | 239 void SVGTextLayoutEngine::layoutInlineTextBox(SVGInlineTextBox* textBox) |
| 240 { | 240 { |
| 241 ASSERT(textBox); | 241 ASSERT(textBox); |
| 242 | 242 |
| 243 RenderSVGInlineText* text = toRenderSVGInlineText(textBox->textRenderer()); | 243 RenderSVGInlineText& text = toRenderSVGInlineText(textBox->textRenderer()); |
| 244 ASSERT(text); | 244 ASSERT(text.parent()); |
| 245 ASSERT(text->parent()); | 245 ASSERT(text.parent()->node()); |
| 246 ASSERT(text->parent()->node()); | 246 ASSERT(text.parent()->node()->isSVGElement()); |
| 247 ASSERT(text->parent()->node()->isSVGElement()); | |
| 248 | 247 |
| 249 const RenderStyle* style = text->style(); | 248 const RenderStyle* style = text.style(); |
| 250 ASSERT(style); | 249 ASSERT(style); |
| 251 | 250 |
| 252 textBox->clearTextFragments(); | 251 textBox->clearTextFragments(); |
| 253 m_isVerticalText = style->svgStyle()->isVerticalWritingMode(); | 252 m_isVerticalText = style->svgStyle()->isVerticalWritingMode(); |
| 254 layoutTextOnLineOrPath(textBox, text, style); | 253 layoutTextOnLineOrPath(textBox, &text, style); |
| 255 | 254 |
| 256 if (m_inPathLayout) { | 255 if (m_inPathLayout) { |
| 257 m_pathLayoutBoxes.append(textBox); | 256 m_pathLayoutBoxes.append(textBox); |
| 258 return; | 257 return; |
| 259 } | 258 } |
| 260 | 259 |
| 261 m_lineLayoutBoxes.append(textBox); | 260 m_lineLayoutBoxes.append(textBox); |
| 262 } | 261 } |
| 263 | 262 |
| 264 #if DUMP_TEXT_FRAGMENTS > 0 | 263 #if DUMP_TEXT_FRAGMENTS > 0 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 } | 645 } |
| 647 | 646 |
| 648 if (!didStartTextFragment) | 647 if (!didStartTextFragment) |
| 649 return; | 648 return; |
| 650 | 649 |
| 651 // Close last open fragment, if needed. | 650 // Close last open fragment, if needed. |
| 652 recordTextFragment(textBox, visualMetricsValues); | 651 recordTextFragment(textBox, visualMetricsValues); |
| 653 } | 652 } |
| 654 | 653 |
| 655 } | 654 } |
| OLD | NEW |