| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned pos
ition, unsigned length) | 59 TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned pos
ition, unsigned length) |
| 60 { | 60 { |
| 61 ASSERT(text->style()); | 61 ASSERT(text->style()); |
| 62 return constructTextRun(text, position, length, text->style()->direction()); | 62 return constructTextRun(text, position, length, text->style()->direction()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned pos
ition, unsigned length, TextDirection textDirection) | 65 TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText* text, unsigned pos
ition, unsigned length, TextDirection textDirection) |
| 66 { | 66 { |
| 67 RenderStyle* style = text->style(); | 67 const RenderStyle* style = text->style(); |
| 68 ASSERT(style); | 68 ASSERT(style); |
| 69 | 69 |
| 70 TextRun run(static_cast<const LChar*>(0) // characters, will be set below if
non-zero. | 70 TextRun run(static_cast<const LChar*>(0) // characters, will be set below if
non-zero. |
| 71 , 0 // length, will be set below if non-zero. | 71 , 0 // length, will be set below if non-zero. |
| 72 , 0 // xPos, only relevant with allowTabs=true | 72 , 0 // xPos, only relevant with allowTabs=true |
| 73 , 0 // padding, only relevant for justified text, not relevant f
or SVG | 73 , 0 // padding, only relevant for justified text, not relevant f
or SVG |
| 74 , TextRun::AllowTrailingExpansion | 74 , TextRun::AllowTrailingExpansion |
| 75 , textDirection | 75 , textDirection |
| 76 , isOverride(style->unicodeBidi()) /* directionalOverride */); | 76 , isOverride(style->unicodeBidi()) /* directionalOverride */); |
| 77 | 77 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 float scalingFactor = text->scalingFactor(); | 110 float scalingFactor = text->scalingFactor(); |
| 111 ASSERT(scalingFactor); | 111 ASSERT(scalingFactor); |
| 112 | 112 |
| 113 m_width = width / scalingFactor; | 113 m_width = width / scalingFactor; |
| 114 m_height = text->scaledFont().fontMetrics().floatHeight() / scalingFactor; | 114 m_height = text->scaledFont().fontMetrics().floatHeight() / scalingFactor; |
| 115 | 115 |
| 116 m_length = length; | 116 m_length = length; |
| 117 } | 117 } |
| 118 | 118 |
| 119 } | 119 } |
| OLD | NEW |