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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); WTF_MAKE_FAST_ALLOCATED; | 54 WTF_MAKE_NONCOPYABLE(CustomElementRegistry); WTF_MAKE_FAST_ALLOCATED; |
55 public: | 55 public: |
56 explicit CustomElementRegistry(Document*); | 56 explicit CustomElementRegistry(Document*); |
57 virtual ~CustomElementRegistry() { } | 57 virtual ~CustomElementRegistry() { } |
58 | 58 |
59 void registerElement(CustomElementConstructorBuilder*, const AtomicString& n ame, ExceptionCode&); | 59 void registerElement(CustomElementConstructorBuilder*, const AtomicString& n ame, ExceptionCode&); |
60 | 60 |
61 bool isUnresolved(Element*) const; | 61 bool isUnresolved(Element*) const; |
62 PassRefPtr<CustomElementDefinition> findFor(Element*) const; | 62 PassRefPtr<CustomElementDefinition> findFor(Element*) const; |
63 | 63 |
64 PassRefPtr<Element> createCustomTagElement(const QualifiedName& localName); | 64 PassRefPtr<Element> createCustomTagElement(const QualifiedName& localName, b ool createdByParser); |
dglazkov
2013/06/25 18:04:31
Can we use enum here and elsewhere instead of a bo
| |
65 | |
66 void didGiveTypeExtension(Element*, const AtomicString&, bool byParser); | |
67 | |
68 void customElementWasInsertedIntoDocument(Element*); | |
69 void customElementWasRemovedFromDocument(Element*); | |
70 void customElementWasDestroyed(Element*); | |
65 | 71 |
66 Document* document() const; | 72 Document* document() const; |
67 | 73 |
68 void didGiveTypeExtension(Element*, const AtomicString&); | |
69 void customElementWasDestroyed(Element*); | |
70 | |
71 static bool isCustomTagName(const AtomicString& name) { return isValidName(n ame); } | 74 static bool isCustomTagName(const AtomicString& name) { return isValidName(n ame); } |
72 | 75 |
73 private: | 76 private: |
74 typedef HashMap<AtomicString, RefPtr<CustomElementDefinition> > DefinitionMa p; | 77 typedef HashMap<AtomicString, RefPtr<CustomElementDefinition> > DefinitionMa p; |
75 static bool isValidName(const AtomicString&); | 78 static bool isValidName(const AtomicString&); |
76 | 79 |
77 PassRefPtr<CustomElementDefinition> findAndCheckNamespace(const AtomicString & type, const AtomicString& namespaceURI) const; | 80 PassRefPtr<CustomElementDefinition> findAndCheckNamespace(const AtomicString & type, const AtomicString& namespaceURI) const; |
78 | 81 |
79 void didCreateCustomTagElement(CustomElementDefinition*, Element*); | 82 void didCreateCustomTagElement(CustomElementDefinition*, Element*, bool crea tedByParser); |
80 void didCreateUnresolvedElement(CustomElementDefinition::CustomElementKind, const AtomicString& type, Element*); | 83 void didCreateUnresolvedElement(CustomElementDefinition::CustomElementKind, const AtomicString& type, Element*); |
81 | 84 |
82 DefinitionMap m_definitions; | 85 DefinitionMap m_definitions; |
83 CustomElementUpgradeCandidateMap m_candidates; | 86 CustomElementUpgradeCandidateMap m_candidates; |
84 }; | 87 }; |
85 | 88 |
86 } // namespace WebCore | 89 } // namespace WebCore |
87 | 90 |
88 #endif | 91 #endif |
OLD | NEW |