| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 , m_walkerData(data) | 236 , m_walkerData(data) |
| 237 , m_walkerCallback(callback) | 237 , m_walkerCallback(callback) |
| 238 , m_walkerMissingGlyphCallback(missingGlyphCallback) | 238 , m_walkerMissingGlyphCallback(missingGlyphCallback) |
| 239 { | 239 { |
| 240 } | 240 } |
| 241 | 241 |
| 242 void walk(const TextRun& run, bool isVerticalText, const String& language, i
nt from, int to) | 242 void walk(const TextRun& run, bool isVerticalText, const String& language, i
nt from, int to) |
| 243 { | 243 { |
| 244 ASSERT(0 <= from && from <= to && to - from <= run.length()); | 244 ASSERT(0 <= from && from <= to && to - from <= run.length()); |
| 245 | 245 |
| 246 const String text = Font::normalizeSpaces(String(run.data(from), run.len
gth())); | 246 const String text = Font::normalizeSpaces(String(run.data(from), to - fr
om)); |
| 247 Vector<SVGGlyphIdentifier::ArabicForm> chars(charactersWithArabicForm(te
xt, run.rtl())); | 247 Vector<SVGGlyphIdentifier::ArabicForm> chars(charactersWithArabicForm(te
xt, run.rtl())); |
| 248 | 248 |
| 249 SVGGlyphIdentifier identifier; | 249 SVGGlyphIdentifier identifier; |
| 250 bool foundGlyph = false; | 250 bool foundGlyph = false; |
| 251 int characterLookupRange; | 251 int characterLookupRange; |
| 252 int endOfScanRange = to + m_walkerData.extraCharsAvailable; | 252 int endOfScanRange = to + m_walkerData.extraCharsAvailable; |
| 253 | 253 |
| 254 bool haveAltGlyph = false; | 254 bool haveAltGlyph = false; |
| 255 SVGGlyphIdentifier altGlyphIdentifier; | 255 SVGGlyphIdentifier altGlyphIdentifier; |
| 256 if (RenderObject* renderObject = run.referencingRenderObject()) { | 256 if (RenderObject* renderObject = run.referencingRenderObject()) { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 { | 582 { |
| 583 // TODO: Fix text selection when HTML text is drawn using a SVG Font | 583 // TODO: Fix text selection when HTML text is drawn using a SVG Font |
| 584 // We need to integrate the SVG text selection code in the offsetForPosition
() framework. | 584 // We need to integrate the SVG text selection code in the offsetForPosition
() framework. |
| 585 // This will also fix a major issue, that SVG Text code can't select arabic
strings properly. | 585 // This will also fix a major issue, that SVG Text code can't select arabic
strings properly. |
| 586 return 0; | 586 return 0; |
| 587 } | 587 } |
| 588 | 588 |
| 589 } | 589 } |
| 590 | 590 |
| 591 #endif | 591 #endif |
| OLD | NEW |