| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 TextRun SVGInlineTextBox::constructTextRun( | 173 TextRun SVGInlineTextBox::constructTextRun( |
| 174 const ComputedStyle& style, | 174 const ComputedStyle& style, |
| 175 const SVGTextFragment& fragment) const { | 175 const SVGTextFragment& fragment) const { |
| 176 LineLayoutText text = getLineLayoutItem(); | 176 LineLayoutText text = getLineLayoutItem(); |
| 177 | 177 |
| 178 // FIXME(crbug.com/264211): This should not be necessary but can occur if we | 178 // FIXME(crbug.com/264211): This should not be necessary but can occur if we |
| 179 // layout during layout. Remove this when 264211 is f
ixed. | 179 // layout during layout. Remove this when 264211 is f
ixed. |
| 180 RELEASE_ASSERT(!text.needsLayout()); | 180 RELEASE_ASSERT(!text.needsLayout()); |
| 181 | 181 |
| 182 TextRun run( | 182 TextRun run( |
| 183 static_cast<const LChar*>( | 183 // characters, will be set below if non-zero. |
| 184 nullptr) // characters, will be set below if non-zero. | 184 static_cast<const LChar*>(nullptr), |
| 185 , | 185 0, // length, will be set below if non-zero. |
| 186 0 // length, will be set below if non-zero. | 186 0, // xPos, only relevant with allowTabs=true |
| 187 , | 187 0, // padding, only relevant for justified text, not relevant for SVG |
| 188 0 // xPos, only relevant with allowTabs=true | |
| 189 , | |
| 190 0 // padding, only relevant for justified text, not relevant for SVG | |
| 191 , | |
| 192 TextRun::AllowTrailingExpansion, direction(), | 188 TextRun::AllowTrailingExpansion, direction(), |
| 193 dirOverride() || | 189 dirOverride() || |
| 194 style.rtlOrdering() == VisualOrder /* directionalOverride */); | 190 style.rtlOrdering() == VisualOrder /* directionalOverride */); |
| 195 | 191 |
| 196 if (fragment.length) { | 192 if (fragment.length) { |
| 197 if (text.is8Bit()) | 193 if (text.is8Bit()) |
| 198 run.setText(text.characters8() + fragment.characterOffset, | 194 run.setText(text.characters8() + fragment.characterOffset, |
| 199 fragment.length); | 195 fragment.length); |
| 200 else | 196 else |
| 201 run.setText(text.characters16() + fragment.characterOffset, | 197 run.setText(text.characters16() + fragment.characterOffset, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 return true; | 314 return true; |
| 319 } | 315 } |
| 320 } | 316 } |
| 321 } | 317 } |
| 322 } | 318 } |
| 323 } | 319 } |
| 324 return false; | 320 return false; |
| 325 } | 321 } |
| 326 | 322 |
| 327 } // namespace blink | 323 } // namespace blink |
| OLD | NEW |