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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/SVGStaticStringList.cpp ('k') | Source/core/svg/SVGTransform.cpp » ('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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 return SVGTextQuery(renderer()).subStringLength(charnum, nchars); 120 return SVGTextQuery(renderer()).subStringLength(charnum, nchars);
121 } 121 }
122 122
123 PassRefPtr<SVGPointTearOff> SVGTextContentElement::getStartPositionOfChar(unsign ed charnum, ExceptionState& exceptionState) 123 PassRefPtr<SVGPointTearOff> SVGTextContentElement::getStartPositionOfChar(unsign ed charnum, ExceptionState& exceptionState)
124 { 124 {
125 document().updateLayoutIgnorePendingStylesheets(); 125 document().updateLayoutIgnorePendingStylesheets();
126 126
127 if (charnum > getNumberOfChars()) { 127 if (charnum > getNumberOfChars()) {
128 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound("charnum", charnum, getNumberOfChars())); 128 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound("charnum", charnum, getNumberOfChars()));
129 return 0; 129 return nullptr;
130 } 130 }
131 131
132 FloatPoint point = SVGTextQuery(renderer()).startPositionOfCharacter(charnum ); 132 FloatPoint point = SVGTextQuery(renderer()).startPositionOfCharacter(charnum );
133 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim Val); 133 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim Val);
134 } 134 }
135 135
136 PassRefPtr<SVGPointTearOff> SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionState& exceptionState) 136 PassRefPtr<SVGPointTearOff> SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionState& exceptionState)
137 { 137 {
138 document().updateLayoutIgnorePendingStylesheets(); 138 document().updateLayoutIgnorePendingStylesheets();
139 139
140 if (charnum > getNumberOfChars()) { 140 if (charnum > getNumberOfChars()) {
141 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound("charnum", charnum, getNumberOfChars())); 141 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound("charnum", charnum, getNumberOfChars()));
142 return 0; 142 return nullptr;
143 } 143 }
144 144
145 FloatPoint point = SVGTextQuery(renderer()).endPositionOfCharacter(charnum); 145 FloatPoint point = SVGTextQuery(renderer()).endPositionOfCharacter(charnum);
146 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim Val); 146 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim Val);
147 } 147 }
148 148
149 PassRefPtr<SVGRectTearOff> SVGTextContentElement::getExtentOfChar(unsigned charn um, ExceptionState& exceptionState) 149 PassRefPtr<SVGRectTearOff> SVGTextContentElement::getExtentOfChar(unsigned charn um, ExceptionState& exceptionState)
150 { 150 {
151 document().updateLayoutIgnorePendingStylesheets(); 151 document().updateLayoutIgnorePendingStylesheets();
152 152
153 if (charnum > getNumberOfChars()) { 153 if (charnum > getNumberOfChars()) {
154 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound("charnum", charnum, getNumberOfChars())); 154 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xExceedsMaximumBound("charnum", charnum, getNumberOfChars()));
155 return 0; 155 return nullptr;
156 } 156 }
157 157
158 FloatRect rect = SVGTextQuery(renderer()).extentOfCharacter(charnum); 158 FloatRect rect = SVGTextQuery(renderer()).extentOfCharacter(charnum);
159 return SVGRectTearOff::create(SVGRect::create(rect), 0, PropertyIsNotAnimVal ); 159 return SVGRectTearOff::create(SVGRect::create(rect), 0, PropertyIsNotAnimVal );
160 } 160 }
161 161
162 float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState& exceptionState) 162 float SVGTextContentElement::getRotationOfChar(unsigned charnum, ExceptionState& exceptionState)
163 { 163 {
164 document().updateLayoutIgnorePendingStylesheets(); 164 document().updateLayoutIgnorePendingStylesheets();
165 165
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 SVGElement* element = toSVGElement(renderer->node()); 287 SVGElement* element = toSVGElement(renderer->node());
288 ASSERT(element); 288 ASSERT(element);
289 289
290 if (!element->isTextContent()) 290 if (!element->isTextContent())
291 return 0; 291 return 0;
292 292
293 return toSVGTextContentElement(element); 293 return toSVGTextContentElement(element);
294 } 294 }
295 295
296 } 296 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGStaticStringList.cpp ('k') | Source/core/svg/SVGTransform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698