OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (!constructorBuilder->isFeatureAllowed()) { | 74 if (!constructorBuilder->isFeatureAllowed()) { |
75 CustomElementException::throwException(CustomElementException::CannotReg
isterFromExtension, type, exceptionState); | 75 CustomElementException::throwException(CustomElementException::CannotReg
isterFromExtension, type, exceptionState); |
76 return 0; | 76 return 0; |
77 } | 77 } |
78 | 78 |
79 if (!CustomElement::isValidName(type, validNames)) { | 79 if (!CustomElement::isValidName(type, validNames)) { |
80 CustomElementException::throwException(CustomElementException::InvalidNa
me, type, exceptionState); | 80 CustomElementException::throwException(CustomElementException::InvalidNa
me, type, exceptionState); |
81 return 0; | 81 return 0; |
82 } | 82 } |
83 | 83 |
84 QualifiedName tagName = nullQName(); | 84 QualifiedName tagName = QualifiedName::null(); |
85 if (!constructorBuilder->validateOptions(type, tagName, exceptionState)) | 85 if (!constructorBuilder->validateOptions(type, tagName, exceptionState)) |
86 return 0; | 86 return 0; |
87 | 87 |
88 ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.nam
espaceURI() == SVGNames::svgNamespaceURI); | 88 ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.nam
espaceURI() == SVGNames::svgNamespaceURI); |
89 | 89 |
90 // FIXME: This should be done earlier in validateOptions. | 90 // FIXME: This should be done earlier in validateOptions. |
91 if (m_registeredTypeNames.contains(type)) { | 91 if (m_registeredTypeNames.contains(type)) { |
92 CustomElementException::throwException(CustomElementException::TypeAlrea
dyRegistered, type, exceptionState); | 92 CustomElementException::throwException(CustomElementException::TypeAlrea
dyRegistered, type, exceptionState); |
93 return 0; | 93 return 0; |
94 } | 94 } |
(...skipping 25 matching lines...) Expand all Loading... |
120 | 120 |
121 return definition.get(); | 121 return definition.get(); |
122 } | 122 } |
123 | 123 |
124 CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescript
or& descriptor) const | 124 CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescript
or& descriptor) const |
125 { | 125 { |
126 return m_definitions.get(descriptor); | 126 return m_definitions.get(descriptor); |
127 } | 127 } |
128 | 128 |
129 } // namespace WebCore | 129 } // namespace WebCore |
OLD | NEW |