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

Unified Diff: Source/core/rendering/svg/SVGResources.cpp

Issue 203193008: Make supportsMarkers non virtual (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/svg/SVGResources.h ('k') | Source/core/svg/SVGElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGResources.cpp
diff --git a/Source/core/rendering/svg/SVGResources.cpp b/Source/core/rendering/svg/SVGResources.cpp
index afc99eea6fe38c3aac2e1f6d503820cdd58d28b2..fa086a2ebfa82ac2ce48fb5cbf071ea415e999c9 100644
--- a/Source/core/rendering/svg/SVGResources.cpp
+++ b/Source/core/rendering/svg/SVGResources.cpp
@@ -91,7 +91,7 @@ static HashSet<AtomicString>& clipperFilterMaskerTags()
return s_tagList;
}
-static HashSet<AtomicString>& markerTags()
+bool SVGResources::supportsMarkers(const SVGElement& element)
{
DEFINE_STATIC_LOCAL(HashSet<AtomicString>, s_tagList, ());
if (s_tagList.isEmpty()) {
@@ -101,7 +101,7 @@ static HashSet<AtomicString>& markerTags()
s_tagList.add(SVGNames::polylineTag.localName());
}
- return s_tagList;
+ return s_tagList.contains(element.localName());
}
static HashSet<AtomicString>& fillAndStrokeTags()
@@ -250,7 +250,7 @@ PassOwnPtr<SVGResources> SVGResources::buildResources(const RenderObject* object
}
}
- if (markerTags().contains(tagName) && style->hasMarkers()) {
+ if (style->hasMarkers() && supportsMarkers(*element)) {
const AtomicString& markerStartId = style->markerStartResource();
if (!ensureResources(resources)->setMarkerStart(getRenderSVGResourceById<RenderSVGResourceMarker>(document, markerStartId)))
registerPendingResource(extensions, markerStartId, element);
« no previous file with comments | « Source/core/rendering/svg/SVGResources.h ('k') | Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698