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

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

Issue 68173014: Have ElementTraversal::firstWithin() take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « Source/core/page/FocusController.cpp ('k') | Source/core/svg/SVGUseElement.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, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 // If the <use> title is not empty we found the title to use. 258 // If the <use> title is not empty we found the title to use.
259 String useTitle(useElement->title()); 259 String useTitle(useElement->title());
260 if (!useTitle.isEmpty()) 260 if (!useTitle.isEmpty())
261 return useTitle; 261 return useTitle;
262 } 262 }
263 } 263 }
264 264
265 // If we aren't an instance in a <use> or the <use> title was not found, the n find the first 265 // If we aren't an instance in a <use> or the <use> title was not found, the n find the first
266 // <title> child of this element. 266 // <title> child of this element.
267 Element* titleElement = ElementTraversal::firstWithin(this); 267 Element* titleElement = ElementTraversal::firstWithin(*this);
268 for (; titleElement; titleElement = ElementTraversal::nextSkippingChildren(* titleElement, this)) { 268 for (; titleElement; titleElement = ElementTraversal::nextSkippingChildren(* titleElement, this)) {
269 if (titleElement->hasTagName(SVGNames::titleTag) && titleElement->isSVGE lement()) 269 if (titleElement->hasTagName(SVGNames::titleTag) && titleElement->isSVGE lement())
270 break; 270 break;
271 } 271 }
272 272
273 // If a title child was found, return the text contents. 273 // If a title child was found, return the text contents.
274 if (titleElement) 274 if (titleElement)
275 return titleElement->innerText(); 275 return titleElement->innerText();
276 276
277 // Otherwise return a null/empty string. 277 // Otherwise return a null/empty string.
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 } 1185 }
1186 1186
1187 if (name == classAttr) 1187 if (name == classAttr)
1188 return true; 1188 return true;
1189 1189
1190 return animatableAttributes.contains(name); 1190 return animatableAttributes.contains(name);
1191 } 1191 }
1192 #endif 1192 #endif
1193 1193
1194 } 1194 }
OLDNEW
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698