Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: Source/core/svg/SVGTextContentElement.cpp

Issue 132233010: [SVG] SVGAnimatedRect migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebsaed Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGTextContentElement.h ('k') | Source/core/svg/SVGViewElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTextContentElement.h ('k') | Source/core/svg/SVGViewElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698