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

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

Issue 203193008: Make supportsMarkers non virtual (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compile error Created 6 years, 9 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
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // If we aren't an instance in a <use> or the <use> title was not found, the n find the first 253 // If we aren't an instance in a <use> or the <use> title was not found, the n find the first
254 // <title> child of this element. 254 // <title> child of this element.
255 // If a title child was found, return the text contents. 255 // If a title child was found, return the text contents.
256 if (Element* titleElement = Traversal<SVGTitleElement>::firstChild(*this)) 256 if (Element* titleElement = Traversal<SVGTitleElement>::firstChild(*this))
257 return titleElement->innerText(); 257 return titleElement->innerText();
258 258
259 // Otherwise return a null/empty string. 259 // Otherwise return a null/empty string.
260 return String(); 260 return String();
261 } 261 }
262 262
263 bool SVGElement::supportsMarkers() const
264 {
265 DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ());
266 if (s_tagList.isEmpty()) {
267 s_tagList.add(SVGNames::lineTag.localName());
268 s_tagList.add(SVGNames::pathTag.localName());
269 s_tagList.add(SVGNames::polygonTag.localName());
270 s_tagList.add(SVGNames::polylineTag.localName());
271 }
272
273 return s_tagList.contains(localName());
f(malita) 2014/03/19 14:58:55 We're replacing a virtual call with a hashset look
274 }
275
263 PassRefPtrWillBeRawPtr<CSSValue> SVGElement::getPresentationAttribute(const Atom icString& name) 276 PassRefPtrWillBeRawPtr<CSSValue> SVGElement::getPresentationAttribute(const Atom icString& name)
264 { 277 {
265 if (!hasAttributesWithoutUpdate()) 278 if (!hasAttributesWithoutUpdate())
266 return nullptr; 279 return nullptr;
267 280
268 QualifiedName attributeName(nullAtom, name, nullAtom); 281 QualifiedName attributeName(nullAtom, name, nullAtom);
269 const Attribute* attr = getAttributeItem(attributeName); 282 const Attribute* attr = getAttributeItem(attributeName);
270 if (!attr) 283 if (!attr)
271 return nullptr; 284 return nullptr;
272 285
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 animatableAttributes.add(SVGNames::zAttr); 1146 animatableAttributes.add(SVGNames::zAttr);
1134 } 1147 }
1135 1148
1136 if (name == classAttr) 1149 if (name == classAttr)
1137 return true; 1150 return true;
1138 1151
1139 return animatableAttributes.contains(name); 1152 return animatableAttributes.contains(name);
1140 } 1153 }
1141 #endif 1154 #endif
1142 } 1155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698