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

Side by Side Diff: Source/core/dom/CustomElement.cpp

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/dom/Document.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 static CustomElement::NameSet enabledNameSet() 58 static CustomElement::NameSet enabledNameSet()
59 { 59 {
60 return CustomElement::NameSet((RuntimeEnabledFeatures::customElementsEnabled () ? CustomElement::StandardNames : 0) | (RuntimeEnabledFeatures::embedderCustom ElementsEnabled() ? CustomElement::EmbedderNames : 0)); 60 return CustomElement::NameSet((RuntimeEnabledFeatures::customElementsEnabled () ? CustomElement::StandardNames : 0) | (RuntimeEnabledFeatures::embedderCustom ElementsEnabled() ? CustomElement::EmbedderNames : 0));
61 } 61 }
62 62
63 bool CustomElement::isValidName(const AtomicString& name, NameSet validNames) 63 bool CustomElement::isValidName(const AtomicString& name, NameSet validNames)
64 { 64 {
65 validNames = NameSet(validNames & enabledNameSet()); 65 validNames = NameSet(validNames & enabledNameSet());
66 66
67 if ((validNames & EmbedderNames) && notFound != embedderCustomElementNames() .find(name)) 67 if ((validNames & EmbedderNames) && kNotFound != embedderCustomElementNames( ).find(name))
68 return Document::isValidName(name); 68 return Document::isValidName(name);
69 69
70 if ((validNames & StandardNames) && notFound != name.find('-')) { 70 if ((validNames & StandardNames) && kNotFound != name.find('-')) {
71 DEFINE_STATIC_LOCAL(Vector<AtomicString>, reservedNames, ()); 71 DEFINE_STATIC_LOCAL(Vector<AtomicString>, reservedNames, ());
72 if (reservedNames.isEmpty()) { 72 if (reservedNames.isEmpty()) {
73 reservedNames.append(MathMLNames::annotation_xmlTag.localName()); 73 reservedNames.append(MathMLNames::annotation_xmlTag.localName());
74 reservedNames.append(SVGNames::color_profileTag.localName()); 74 reservedNames.append(SVGNames::color_profileTag.localName());
75 reservedNames.append(SVGNames::font_faceTag.localName()); 75 reservedNames.append(SVGNames::font_faceTag.localName());
76 reservedNames.append(SVGNames::font_face_srcTag.localName()); 76 reservedNames.append(SVGNames::font_face_srcTag.localName());
77 reservedNames.append(SVGNames::font_face_uriTag.localName()); 77 reservedNames.append(SVGNames::font_face_uriTag.localName());
78 reservedNames.append(SVGNames::font_face_formatTag.localName()); 78 reservedNames.append(SVGNames::font_face_formatTag.localName());
79 reservedNames.append(SVGNames::font_face_nameTag.localName()); 79 reservedNames.append(SVGNames::font_face_nameTag.localName());
80 reservedNames.append(SVGNames::missing_glyphTag.localName()); 80 reservedNames.append(SVGNames::missing_glyphTag.localName());
81 } 81 }
82 82
83 if (notFound == reservedNames.find(name)) 83 if (kNotFound == reservedNames.find(name))
84 return Document::isValidName(name.string()); 84 return Document::isValidName(name.string());
85 } 85 }
86 86
87 return false; 87 return false;
88 } 88 }
89 89
90 void CustomElement::define(Element* element, PassRefPtr<CustomElementDefinition> passDefinition) 90 void CustomElement::define(Element* element, PassRefPtr<CustomElementDefinition> passDefinition)
91 { 91 {
92 RefPtr<CustomElementDefinition> definition(passDefinition); 92 RefPtr<CustomElementDefinition> definition(passDefinition);
93 93
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 ASSERT(result.isNewEntry); 171 ASSERT(result.isNewEntry);
172 } 172 }
173 173
174 CustomElement::DefinitionMap& CustomElement::definitions() 174 CustomElement::DefinitionMap& CustomElement::definitions()
175 { 175 {
176 DEFINE_STATIC_LOCAL(DefinitionMap, map, ()); 176 DEFINE_STATIC_LOCAL(DefinitionMap, map, ());
177 return map; 177 return map;
178 } 178 }
179 179
180 } // namespace WebCore 180 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698