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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void addChildShadowRoot(); | 136 void addChildShadowRoot(); |
137 void removeChildShadowRoot(); | 137 void removeChildShadowRoot(); |
138 void invalidateDescendantInsertionPoints(); | 138 void invalidateDescendantInsertionPoints(); |
139 | 139 |
140 // ShadowRoots should never be cloned. | 140 // ShadowRoots should never be cloned. |
141 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return nullptr; } | 141 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return nullptr; } |
142 | 142 |
143 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888
34 | 143 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888
34 |
144 bool isOrphan() const { return !host(); } | 144 bool isOrphan() const { return !host(); } |
145 | 145 |
146 ShadowRoot* m_prev; | 146 RawPtrWillBeMember<ShadowRoot> m_prev; |
147 ShadowRoot* m_next; | 147 RawPtrWillBeMember<ShadowRoot> m_next; |
148 OwnPtrWillBeMember<ShadowRootRareData> m_shadowRootRareData; | 148 OwnPtrWillBeMember<ShadowRootRareData> m_shadowRootRareData; |
149 unsigned m_numberOfStyles : 27; | 149 unsigned m_numberOfStyles : 27; |
150 unsigned m_type : 1; | 150 unsigned m_type : 1; |
151 unsigned m_registeredWithParentShadowRoot : 1; | 151 unsigned m_registeredWithParentShadowRoot : 1; |
152 unsigned m_descendantInsertionPointsIsValid : 1; | 152 unsigned m_descendantInsertionPointsIsValid : 1; |
153 }; | 153 }; |
154 | 154 |
155 inline Element* ShadowRoot::activeElement() const | 155 inline Element* ShadowRoot::activeElement() const |
156 { | 156 { |
157 return adjustedFocusedElement(); | 157 return adjustedFocusedElement(); |
158 } | 158 } |
159 | 159 |
160 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 160 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
161 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); | 161 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); |
162 | 162 |
163 } // namespace | 163 } // namespace |
164 | 164 |
165 #endif | 165 #endif |
OLD | NEW |