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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElement.cpp

Issue 2142513003: Use initializer_lists for static WTF::HashSets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
Index: third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
index bab2bec31f979861f122309a32330b8eedf6d6be..16d712fb87c71b60087305551540950dc4e5efc6 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
@@ -60,18 +60,16 @@ bool CustomElement::isValidName(const AtomicString& name)
return false;
// https://html.spec.whatwg.org/multipage/scripting.html#valid-custom-element-name
- DEFINE_STATIC_LOCAL(HashSet<AtomicString>, hyphenContainingElementNames, ());
- if (hyphenContainingElementNames.isEmpty()) {
- hyphenContainingElementNames.add("annotation-xml");
- hyphenContainingElementNames.add("color-profile");
- hyphenContainingElementNames.add("font-face");
- hyphenContainingElementNames.add("font-face-src");
- hyphenContainingElementNames.add("font-face-uri");
- hyphenContainingElementNames.add("font-face-format");
- hyphenContainingElementNames.add("font-face-name");
- hyphenContainingElementNames.add("missing-glyph");
- }
-
+ DEFINE_STATIC_LOCAL(HashSet<AtomicString>, hyphenContainingElementNames, ({
+ "annotation-xml",
+ "color-profile",
+ "font-face",
+ "font-face-src",
+ "font-face-uri",
+ "font-face-format",
+ "font-face-name",
+ "missing-glyph",
+ }));
return !hyphenContainingElementNames.contains(name);
}

Powered by Google App Engine
This is Rietveld 408576698