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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 ShadowRoot* youngerShadowRoot() const { return prev(); } | 75 ShadowRoot* youngerShadowRoot() const { return prev(); } |
76 | 76 |
77 ShadowRoot* olderShadowRootForBindings() const; | 77 ShadowRoot* olderShadowRootForBindings() const; |
78 bool shouldExposeToBindings() const { return type() == OpenShadowRoot; } | 78 bool shouldExposeToBindings() const { return type() == OpenShadowRoot; } |
79 | 79 |
80 bool isYoungest() const { return !youngerShadowRoot(); } | 80 bool isYoungest() const { return !youngerShadowRoot(); } |
81 bool isOldest() const { return !olderShadowRoot(); } | 81 bool isOldest() const { return !olderShadowRoot(); } |
82 | 82 |
83 virtual void attach(const AttachContext& = AttachContext()) override; | 83 virtual void attach(const AttachContext& = AttachContext()) override; |
| 84 virtual void detach(const AttachContext& = AttachContext()) override; |
84 | 85 |
85 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; | 86 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
86 virtual void removedFrom(ContainerNode*) override; | 87 virtual void removedFrom(ContainerNode*) override; |
87 | 88 |
88 void registerScopedHTMLStyleChild(); | 89 void registerScopedHTMLStyleChild(); |
89 void unregisterScopedHTMLStyleChild(); | 90 void unregisterScopedHTMLStyleChild(); |
90 | 91 |
91 bool containsShadowElements() const; | 92 bool containsShadowElements() const; |
92 bool containsContentElements() const; | 93 bool containsContentElements() const; |
93 bool containsInsertionPoints() const { return containsShadowElements() || co
ntainsContentElements(); } | 94 bool containsInsertionPoints() const { return containsShadowElements() || co
ntainsContentElements(); } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return adjustedFocusedElement(); | 164 return adjustedFocusedElement(); |
164 } | 165 } |
165 | 166 |
166 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 167 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
167 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); | 168 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); |
168 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true); | 169 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true); |
169 | 170 |
170 } // namespace blink | 171 } // namespace blink |
171 | 172 |
172 #endif // ShadowRoot_h | 173 #endif // ShadowRoot_h |
OLD | NEW |