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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 public: | 72 public: |
73 CallbackDeliveryScope() { } | 73 CallbackDeliveryScope() { } |
74 ~CallbackDeliveryScope() { CustomElementRegistry::deliverAllLifecycleCal
lbacksIfNeeded(); } | 74 ~CallbackDeliveryScope() { CustomElementRegistry::deliverAllLifecycleCal
lbacksIfNeeded(); } |
75 }; | 75 }; |
76 | 76 |
77 explicit CustomElementRegistry(Document*); | 77 explicit CustomElementRegistry(Document*); |
78 ~CustomElementRegistry(); | 78 ~CustomElementRegistry(); |
79 | 79 |
80 PassRefPtr<CustomElementConstructor> registerElement(WebCore::ScriptState*,
const AtomicString& name, const Dictionary& options, ExceptionCode&); | 80 PassRefPtr<CustomElementConstructor> registerElement(WebCore::ScriptState*,
const AtomicString& name, const Dictionary& options, ExceptionCode&); |
81 | 81 |
82 // FIXME: findFor is dangerous since it consults the "is" | |
83 // attribute; that should only be consulted at element creation | |
84 // time. | |
85 PassRefPtr<CustomElementDefinition> findFor(Element*) const; | 82 PassRefPtr<CustomElementDefinition> findFor(Element*) const; |
86 PassRefPtr<CustomElementDefinition> findAndCheckNamespace(const AtomicString
& type, const AtomicString& namespaceURI) const; | 83 PassRefPtr<CustomElementDefinition> findAndCheckNamespace(const AtomicString
& type, const AtomicString& namespaceURI) const; |
87 | 84 |
88 PassRefPtr<Element> createCustomTagElement(const QualifiedName& localName); | 85 PassRefPtr<Element> createCustomTagElement(const QualifiedName& localName); |
89 | 86 |
90 Document* document() const; | 87 Document* document() const; |
91 | 88 |
92 void didGiveTypeExtension(Element*); | 89 void didGiveTypeExtension(Element*); |
93 | 90 |
94 static bool isCustomTagName(const AtomicString& name) { return isValidName(n
ame); } | 91 static bool isCustomTagName(const AtomicString& name) { return isValidName(n
ame); } |
(...skipping 29 matching lines...) Expand all Loading... |
124 inline CustomElementRegistry::InstanceSet& CustomElementRegistry::activeCustomEl
ementRegistries() | 121 inline CustomElementRegistry::InstanceSet& CustomElementRegistry::activeCustomEl
ementRegistries() |
125 { | 122 { |
126 DEFINE_STATIC_LOCAL(InstanceSet, activeInstances, ()); | 123 DEFINE_STATIC_LOCAL(InstanceSet, activeInstances, ()); |
127 return activeInstances; | 124 return activeInstances; |
128 } | 125 } |
129 | 126 |
130 | 127 |
131 } // namespace WebCore | 128 } // namespace WebCore |
132 | 129 |
133 #endif | 130 #endif |
OLD | NEW |