| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.nam
espaceURI() == SVGNames::svgNamespaceURI); | 86 ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.nam
espaceURI() == SVGNames::svgNamespaceURI); |
| 87 | 87 |
| 88 if (m_registeredTypeNames.contains(type)) { | 88 if (m_registeredTypeNames.contains(type)) { |
| 89 ec = InvalidStateError; | 89 ec = InvalidStateError; |
| 90 return 0; | 90 return 0; |
| 91 } | 91 } |
| 92 | 92 |
| 93 ASSERT(!observer.registrationContextWentAway()); | 93 ASSERT(!observer.registrationContextWentAway()); |
| 94 | 94 |
| 95 RefPtr<CustomElementLifecycleCallbacks> lifecycleCallbacks = constructorBuil
der->createCallbacks(document); | 95 RefPtr<CustomElementLifecycleCallbacks> lifecycleCallbacks = constructorBuil
der->createCallbacks(); |
| 96 | 96 |
| 97 // Consulting the constructor builder could execute script and | 97 // Consulting the constructor builder could execute script and |
| 98 // kill the document. | 98 // kill the document. |
| 99 if (observer.registrationContextWentAway()) { | 99 if (observer.registrationContextWentAway()) { |
| 100 ec = InvalidStateError; | 100 ec = InvalidStateError; |
| 101 return 0; | 101 return 0; |
| 102 } | 102 } |
| 103 | 103 |
| 104 const CustomElementDescriptor descriptor(type, tagName.namespaceURI(), tagNa
me.localName()); | 104 const CustomElementDescriptor descriptor(type, tagName.namespaceURI(), tagNa
me.localName()); |
| 105 RefPtr<CustomElementDefinition> definition = CustomElementDefinition::create
(descriptor, lifecycleCallbacks); | 105 RefPtr<CustomElementDefinition> definition = CustomElementDefinition::create
(descriptor, lifecycleCallbacks); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 119 | 119 |
| 120 return definition.get(); | 120 return definition.get(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescript
or& descriptor) const | 123 CustomElementDefinition* CustomElementRegistry::find(const CustomElementDescript
or& descriptor) const |
| 124 { | 124 { |
| 125 return m_definitions.get(descriptor); | 125 return m_definitions.get(descriptor); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace WebCore | 128 } // namespace WebCore |
| OLD | NEW |