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

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

Issue 329143007: Fix some SVGFonts compilation errors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT Created 6 years, 6 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
« no previous file with comments | « Source/core/css/CSSFontFace.cpp ('k') | Source/core/rendering/svg/SVGResources.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #if ENABLE(SVG_FONTS)
71 reservedNames.append(SVGNames::font_faceTag.localName()); 72 reservedNames.append(SVGNames::font_faceTag.localName());
72 reservedNames.append(SVGNames::font_face_srcTag.localName()); 73 reservedNames.append(SVGNames::font_face_srcTag.localName());
73 reservedNames.append(SVGNames::font_face_uriTag.localName()); 74 reservedNames.append(SVGNames::font_face_uriTag.localName());
74 reservedNames.append(SVGNames::font_face_formatTag.localName()); 75 reservedNames.append(SVGNames::font_face_formatTag.localName());
75 reservedNames.append(SVGNames::font_face_nameTag.localName()); 76 reservedNames.append(SVGNames::font_face_nameTag.localName());
76 reservedNames.append(SVGNames::missing_glyphTag.localName()); 77 reservedNames.append(SVGNames::missing_glyphTag.localName());
78 #endif
77 } 79 }
78 80
79 if (kNotFound == reservedNames.find(name)) 81 if (kNotFound == reservedNames.find(name))
80 return Document::isValidName(name.string()); 82 return Document::isValidName(name.string());
81 } 83 }
82 84
83 return false; 85 return false;
84 } 86 }
85 87
86 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
130 break; 132 break;
131 133
132 case Element::WaitingForUpgrade: 134 case Element::WaitingForUpgrade:
133 case Element::Upgraded: 135 case Element::Upgraded:
134 CustomElementObserver::notifyElementWasDestroyed(element); 136 CustomElementObserver::notifyElementWasDestroyed(element);
135 break; 137 break;
136 } 138 }
137 } 139 }
138 140
139 } // namespace WebCore 141 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontFace.cpp ('k') | Source/core/rendering/svg/SVGResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698