| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 textRun.setHorizontalGlyphStretch(narrowPrecisionToFloat(fragmentTransfo
rm.xScale())); | 93 textRun.setHorizontalGlyphStretch(narrowPrecisionToFloat(fragmentTransfo
rm.xScale())); |
| 94 } | 94 } |
| 95 | 95 |
| 96 return fragment.characterOffset - start() + lineLayoutItem.scaledFont().offs
etForPosition(textRun, position * scalingFactor, includePartialGlyphs); | 96 return fragment.characterOffset - start() + lineLayoutItem.scaledFont().offs
etForPosition(textRun, position * scalingFactor, includePartialGlyphs); |
| 97 } | 97 } |
| 98 | 98 |
| 99 LayoutUnit SVGInlineTextBox::positionForOffset(int) const | 99 LayoutUnit SVGInlineTextBox::positionForOffset(int) const |
| 100 { | 100 { |
| 101 // SVG doesn't use the offset <-> position selection system. | 101 // SVG doesn't use the offset <-> position selection system. |
| 102 ASSERT_NOT_REACHED(); | 102 ASSERT_NOT_REACHED(); |
| 103 return 0; | 103 return LayoutUnit(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment&
fragment, int startPosition, int endPosition, const ComputedStyle& style) const | 106 FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment&
fragment, int startPosition, int endPosition, const ComputedStyle& style) const |
| 107 { | 107 { |
| 108 ASSERT(startPosition < endPosition); | 108 ASSERT(startPosition < endPosition); |
| 109 | 109 |
| 110 LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->lineL
ayoutItem()); | 110 LineLayoutSVGInlineText lineLayoutItem = LineLayoutSVGInlineText(this->lineL
ayoutItem()); |
| 111 | 111 |
| 112 float scalingFactor = lineLayoutItem.scalingFactor(); | 112 float scalingFactor = lineLayoutItem.scalingFactor(); |
| 113 ASSERT(scalingFactor); | 113 ASSERT(scalingFactor); |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return true; | 270 return true; |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 return false; | 276 return false; |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace blink | 279 } // namespace blink |
| OLD | NEW |