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

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

Issue 21669006: Introduce toSVGMPathElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGMPathElement.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, 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 return String(); 243 return String();
244 244
245 // Walk up the tree, to find out whether we're inside a <use> shadow tree, t o find the right title. 245 // Walk up the tree, to find out whether we're inside a <use> shadow tree, t o find the right title.
246 if (isInShadowTree()) { 246 if (isInShadowTree()) {
247 Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host (); 247 Element* shadowHostElement = toShadowRoot(treeScope()->rootNode())->host ();
248 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so any shadow root we do 248 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so any shadow root we do
249 // have should be a use. The assert and following test is here to catch future shadow DOM changes 249 // have should be a use. The assert and following test is here to catch future shadow DOM changes
250 // that do enable SVG in a shadow tree. 250 // that do enable SVG in a shadow tree.
251 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::use Tag)); 251 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::use Tag));
252 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag) ) { 252 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag) ) {
253 SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowHostEl ement); 253 SVGUseElement* useElement = toSVGUseElement(shadowHostElement);
254 254
255 // If the <use> title is not empty we found the title to use. 255 // If the <use> title is not empty we found the title to use.
256 String useTitle(useElement->title()); 256 String useTitle(useElement->title());
257 if (!useTitle.isEmpty()) 257 if (!useTitle.isEmpty())
258 return useTitle; 258 return useTitle;
259 } 259 }
260 } 260 }
261 261
262 // If we aren't an instance in a <use> or the <use> title was not found, the n find the first 262 // If we aren't an instance in a <use> or the <use> title was not found, the n find the first
263 // <title> child of this element. 263 // <title> child of this element.
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 } 1142 }
1143 1143
1144 if (name == classAttr) 1144 if (name == classAttr)
1145 return true; 1145 return true;
1146 1146
1147 return animatableAttributes.contains(name); 1147 return animatableAttributes.contains(name);
1148 } 1148 }
1149 #endif 1149 #endif
1150 1150
1151 } 1151 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGMPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698