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

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

Issue 656913006: Remove SVG fonts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests for landing Created 6 years, 2 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
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 bool CustomElement::isValidName(const AtomicString& name, NameSet validNames) 69 bool CustomElement::isValidName(const AtomicString& name, NameSet validNames)
70 { 70 {
71 if ((validNames & EmbedderNames) && kNotFound != embedderCustomElementNames( ).find(name)) 71 if ((validNames & EmbedderNames) && kNotFound != embedderCustomElementNames( ).find(name))
72 return Document::isValidName(name); 72 return Document::isValidName(name);
73 73
74 if ((validNames & StandardNames) && kNotFound != name.find('-')) { 74 if ((validNames & StandardNames) && kNotFound != name.find('-')) {
75 DEFINE_STATIC_LOCAL(Vector<AtomicString>, reservedNames, ()); 75 DEFINE_STATIC_LOCAL(Vector<AtomicString>, reservedNames, ());
76 if (reservedNames.isEmpty()) { 76 if (reservedNames.isEmpty()) {
77 // FIXME(crbug.com/426605): We should be able to remove this.
77 reservedNames.append(MathMLNames::annotation_xmlTag.localName()); 78 reservedNames.append(MathMLNames::annotation_xmlTag.localName());
78 #if ENABLE(SVG_FONTS)
79 reservedNames.append(SVGNames::font_faceTag.localName());
80 reservedNames.append(SVGNames::font_face_srcTag.localName());
81 reservedNames.append(SVGNames::font_face_uriTag.localName());
82 reservedNames.append(SVGNames::font_face_formatTag.localName());
83 reservedNames.append(SVGNames::font_face_nameTag.localName());
84 reservedNames.append(SVGNames::missing_glyphTag.localName());
85 #endif
86 } 79 }
87 80
88 if (kNotFound == reservedNames.find(name)) 81 if (kNotFound == reservedNames.find(name))
89 return Document::isValidName(name.string()); 82 return Document::isValidName(name.string());
90 } 83 }
91 84
92 return false; 85 return false;
93 } 86 }
94 87
95 void CustomElement::define(Element* element, PassRefPtr<CustomElementDefinition> passDefinition) 88 void CustomElement::define(Element* element, PassRefPtr<CustomElementDefinition> passDefinition)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 break; 132 break;
140 133
141 case Element::WaitingForUpgrade: 134 case Element::WaitingForUpgrade:
142 case Element::Upgraded: 135 case Element::Upgraded:
143 CustomElementObserver::notifyElementWasDestroyed(element); 136 CustomElementObserver::notifyElementWasDestroyed(element);
144 break; 137 break;
145 } 138 }
146 } 139 }
147 140
148 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698