| OLD | NEW |
| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Definitions | 56 // Definitions |
| 57 void registerElement(Document*, CustomElementConstructorBuilder*, const Atom
icString& type, CustomElement::NameSet validNames, ExceptionState&); | 57 void registerElement(Document*, CustomElementConstructorBuilder*, const Atom
icString& type, CustomElement::NameSet validNames, ExceptionState&); |
| 58 | 58 |
| 59 // Instance creation | 59 // Instance creation |
| 60 enum CreationMode { | 60 enum CreationMode { |
| 61 CreatedByParser, | 61 CreatedByParser, |
| 62 NotCreatedByParser | 62 NotCreatedByParser |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 PassRefPtr<Element> createCustomTagElement(Document*, const QualifiedName&,
CreationMode = NotCreatedByParser); | 65 PassRefPtr<Element> createCustomTagElement(Document&, const QualifiedName&,
CreationMode = NotCreatedByParser); |
| 66 static void setIsAttributeAndTypeExtension(Element*, const AtomicString& typ
e); | 66 static void setIsAttributeAndTypeExtension(Element*, const AtomicString& typ
e); |
| 67 static void setTypeExtension(Element*, const AtomicString& type, CreationMod
e = NotCreatedByParser); | 67 static void setTypeExtension(Element*, const AtomicString& type, CreationMod
e = NotCreatedByParser); |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 CustomElementRegistrationContext() { } | 70 CustomElementRegistrationContext() { } |
| 71 | 71 |
| 72 // Instance creation | 72 // Instance creation |
| 73 void didGiveTypeExtension(Element*, const AtomicString& type); | 73 void didGiveTypeExtension(Element*, const AtomicString& type); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 void resolve(Element*, const AtomicString& typeExtension); | 76 void resolve(Element*, const AtomicString& typeExtension); |
| 77 void didResolveElement(CustomElementDefinition*, Element*); | 77 void didResolveElement(CustomElementDefinition*, Element*); |
| 78 void didCreateUnresolvedElement(const CustomElementDescriptor&, Element*); | 78 void didCreateUnresolvedElement(const CustomElementDescriptor&, Element*); |
| 79 | 79 |
| 80 CustomElementRegistry m_registry; | 80 CustomElementRegistry m_registry; |
| 81 | 81 |
| 82 // Element creation | 82 // Element creation |
| 83 CustomElementUpgradeCandidateMap m_candidates; | 83 CustomElementUpgradeCandidateMap m_candidates; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } | 86 } |
| 87 | 87 |
| 88 #endif // CustomElementRegistrationContext_h | 88 #endif // CustomElementRegistrationContext_h |
| 89 | 89 |
| OLD | NEW |