OLD | NEW |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 bool CustomElement::isValidName(const AtomicString& name, NameSet validNames) | 62 bool CustomElement::isValidName(const AtomicString& name, NameSet validNames) |
63 { | 63 { |
64 if ((validNames & EmbedderNames) && kNotFound != embedderCustomElementNames(
).find(name)) | 64 if ((validNames & EmbedderNames) && kNotFound != embedderCustomElementNames(
).find(name)) |
65 return Document::isValidName(name); | 65 return Document::isValidName(name); |
66 | 66 |
67 if ((validNames & StandardNames) && kNotFound != name.find('-')) { | 67 if ((validNames & StandardNames) && kNotFound != name.find('-')) { |
68 DEFINE_STATIC_LOCAL(Vector<AtomicString>, reservedNames, ()); | 68 DEFINE_STATIC_LOCAL(Vector<AtomicString>, reservedNames, ()); |
69 if (reservedNames.isEmpty()) { | 69 if (reservedNames.isEmpty()) { |
70 reservedNames.append(MathMLNames::annotation_xmlTag.localName()); | 70 reservedNames.append(MathMLNames::annotation_xmlTag.localName()); |
71 // In principle, "color-profile" should exist in the SVGNames | |
72 // namespace, but we don't implement the color-profile element. | |
73 reservedNames.append("color-profile"); | |
74 reservedNames.append(SVGNames::font_faceTag.localName()); | 71 reservedNames.append(SVGNames::font_faceTag.localName()); |
75 reservedNames.append(SVGNames::font_face_srcTag.localName()); | 72 reservedNames.append(SVGNames::font_face_srcTag.localName()); |
76 reservedNames.append(SVGNames::font_face_uriTag.localName()); | 73 reservedNames.append(SVGNames::font_face_uriTag.localName()); |
77 reservedNames.append(SVGNames::font_face_formatTag.localName()); | 74 reservedNames.append(SVGNames::font_face_formatTag.localName()); |
78 reservedNames.append(SVGNames::font_face_nameTag.localName()); | 75 reservedNames.append(SVGNames::font_face_nameTag.localName()); |
79 reservedNames.append(SVGNames::missing_glyphTag.localName()); | 76 reservedNames.append(SVGNames::missing_glyphTag.localName()); |
80 } | 77 } |
81 | 78 |
82 if (kNotFound == reservedNames.find(name)) | 79 if (kNotFound == reservedNames.find(name)) |
83 return Document::isValidName(name.string()); | 80 return Document::isValidName(name.string()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 break; | 130 break; |
134 | 131 |
135 case Element::WaitingForUpgrade: | 132 case Element::WaitingForUpgrade: |
136 case Element::Upgraded: | 133 case Element::Upgraded: |
137 CustomElementObserver::notifyElementWasDestroyed(element); | 134 CustomElementObserver::notifyElementWasDestroyed(element); |
138 break; | 135 break; |
139 } | 136 } |
140 } | 137 } |
141 | 138 |
142 } // namespace WebCore | 139 } // namespace WebCore |
OLD | NEW |