| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 document().updateLayoutIgnorePendingStylesheets(); | 127 document().updateLayoutIgnorePendingStylesheets(); |
| 128 | 128 |
| 129 if (charnum > getNumberOfChars()) { | 129 if (charnum > getNumberOfChars()) { |
| 130 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); | 130 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); |
| 131 return FloatPoint(); | 131 return FloatPoint(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 return SVGTextQuery(renderer()).endPositionOfCharacter(charnum); | 134 return SVGTextQuery(renderer()).endPositionOfCharacter(charnum); |
| 135 } | 135 } |
| 136 | 136 |
| 137 SVGRect SVGTextContentElement::getExtentOfChar(unsigned charnum, ExceptionState&
exceptionState) | 137 PassRefPtr<SVGRectTearOff> SVGTextContentElement::getExtentOfChar(unsigned charn
um, ExceptionState& exceptionState) |
| 138 { | 138 { |
| 139 document().updateLayoutIgnorePendingStylesheets(); | 139 document().updateLayoutIgnorePendingStylesheets(); |
| 140 | 140 |
| 141 if (charnum > getNumberOfChars()) { | 141 if (charnum > getNumberOfChars()) { |
| 142 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); | 142 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); |
| 143 return SVGRect(); | 143 return 0; |
| 144 } | 144 } |
| 145 | 145 |
| 146 return SVGTextQuery(renderer()).extentOfCharacter(charnum); | 146 FloatRect rect = SVGTextQuery(renderer()).extentOfCharacter(charnum); |
| 147 return SVGRectTearOff::create(SVGRect::create(rect), 0, PropertyIsNotAnimVal
); |
| 147 } | 148 } |
| 148 | 149 |
| 149 float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState&
exceptionState) | 150 float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState&
exceptionState) |
| 150 { | 151 { |
| 151 document().updateLayoutIgnorePendingStylesheets(); | 152 document().updateLayoutIgnorePendingStylesheets(); |
| 152 | 153 |
| 153 if (charnum > getNumberOfChars()) { | 154 if (charnum > getNumberOfChars()) { |
| 154 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); | 155 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError); |
| 155 return 0.0f; | 156 return 0.0f; |
| 156 } | 157 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 SVGElement* element = toSVGElement(renderer->node()); | 277 SVGElement* element = toSVGElement(renderer->node()); |
| 277 ASSERT(element); | 278 ASSERT(element); |
| 278 | 279 |
| 279 if (!element->isTextContent()) | 280 if (!element->isTextContent()) |
| 280 return 0; | 281 return 0; |
| 281 | 282 |
| 282 return toSVGTextContentElement(element); | 283 return toSVGTextContentElement(element); |
| 283 } | 284 } |
| 284 | 285 |
| 285 } | 286 } |
| OLD | NEW |