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

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

Issue 2392483002: Prune createVisibleSelectionDeprecated from svg (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const_cast<SVGTextContentElement*>(this)); 218 const_cast<SVGTextContentElement*>(this));
219 for (unsigned i = 0; i < charnum; ++i) 219 for (unsigned i = 0; i < charnum; ++i)
220 start = nextPositionOf(start); 220 start = nextPositionOf(start);
221 221
222 // Find selection end 222 // Find selection end
223 VisiblePosition end(start); 223 VisiblePosition end(start);
224 for (unsigned i = 0; i < nchars; ++i) 224 for (unsigned i = 0; i < nchars; ++i)
225 end = nextPositionOf(end); 225 end = nextPositionOf(end);
226 226
227 document().frame()->selection().setSelection( 227 document().frame()->selection().setSelection(
228 createVisibleSelectionDeprecated(start, end)); 228 createVisibleSelection(start, end));
229 } 229 }
230 230
231 bool SVGTextContentElement::isPresentationAttribute( 231 bool SVGTextContentElement::isPresentationAttribute(
232 const QualifiedName& name) const { 232 const QualifiedName& name) const {
233 if (name.matches(XMLNames::spaceAttr)) 233 if (name.matches(XMLNames::spaceAttr))
234 return true; 234 return true;
235 return SVGGraphicsElement::isPresentationAttribute(name); 235 return SVGGraphicsElement::isPresentationAttribute(name);
236 } 236 }
237 237
238 void SVGTextContentElement::collectStyleForPresentationAttribute( 238 void SVGTextContentElement::collectStyleForPresentationAttribute(
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 (!lineLayoutItem.isSVGText() && !lineLayoutItem.isSVGInline())) 288 (!lineLayoutItem.isSVGText() && !lineLayoutItem.isSVGInline()))
289 return nullptr; 289 return nullptr;
290 290
291 SVGElement* element = toSVGElement(lineLayoutItem.node()); 291 SVGElement* element = toSVGElement(lineLayoutItem.node());
292 ASSERT(element); 292 ASSERT(element);
293 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element) 293 return isSVGTextContentElement(*element) ? toSVGTextContentElement(element)
294 : 0; 294 : 0;
295 } 295 }
296 296
297 } // namespace blink 297 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698