OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 10 matching lines...) Expand all Loading... |
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #ifndef ShadowRoot_h | 27 #ifndef ShadowRoot_h |
28 #define ShadowRoot_h | 28 #define ShadowRoot_h |
29 | 29 |
30 #include "core/dom/ContainerNode.h" | 30 #include "core/dom/ContainerNode.h" |
31 #include "core/dom/Document.h" | |
32 #include "core/dom/DocumentFragment.h" | 31 #include "core/dom/DocumentFragment.h" |
33 #include "core/dom/Element.h" | 32 #include "core/dom/Element.h" |
34 #include "core/dom/TreeScope.h" | 33 #include "core/dom/TreeScope.h" |
35 #include "wtf/DoublyLinkedList.h" | 34 #include "wtf/DoublyLinkedList.h" |
36 | 35 |
37 namespace WebCore { | 36 namespace WebCore { |
38 | 37 |
| 38 class Document; |
39 class ElementShadow; | 39 class ElementShadow; |
40 class ExceptionState; | 40 class ExceptionState; |
41 class HTMLShadowElement; | 41 class HTMLShadowElement; |
42 class InsertionPoint; | 42 class InsertionPoint; |
43 class ShadowRootRareData; | 43 class ShadowRootRareData; |
| 44 class StyleSheetList; |
44 | 45 |
45 class ShadowRoot FINAL : public DocumentFragment, public TreeScope, public Doubl
yLinkedListNode<ShadowRoot> { | 46 class ShadowRoot FINAL : public DocumentFragment, public TreeScope, public Doubl
yLinkedListNode<ShadowRoot> { |
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ShadowRoot); | 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ShadowRoot); |
47 friend class WTF::DoublyLinkedListNode<ShadowRoot>; | 48 friend class WTF::DoublyLinkedListNode<ShadowRoot>; |
48 public: | 49 public: |
49 // FIXME: We will support multiple shadow subtrees, however current implemen
tation does not work well | 50 // FIXME: We will support multiple shadow subtrees, however current implemen
tation does not work well |
50 // if a shadow root is dynamically created. So we prohibit multiple shadow s
ubtrees | 51 // if a shadow root is dynamically created. So we prohibit multiple shadow s
ubtrees |
51 // in several elements for a while. | 52 // in several elements for a while. |
52 // See https://bugs.webkit.org/show_bug.cgi?id=77503 and related bugs. | 53 // See https://bugs.webkit.org/show_bug.cgi?id=77503 and related bugs. |
53 enum ShadowRootType { | 54 enum ShadowRootType { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 { | 161 { |
161 return adjustedFocusedElement(); | 162 return adjustedFocusedElement(); |
162 } | 163 } |
163 | 164 |
164 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 165 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
165 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); | 166 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); |
166 | 167 |
167 } // namespace | 168 } // namespace |
168 | 169 |
169 #endif | 170 #endif |
OLD | NEW |