| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 virtual void dispose() OVERRIDE; | 150 virtual void dispose() OVERRIDE; |
| 151 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node*
afterChange, int childCountDelta) OVERRIDE; | 151 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node*
afterChange, int childCountDelta) OVERRIDE; |
| 152 | 152 |
| 153 ShadowRootRareData* ensureShadowRootRareData(); | 153 ShadowRootRareData* ensureShadowRootRareData(); |
| 154 | 154 |
| 155 void addChildShadowRoot(); | 155 void addChildShadowRoot(); |
| 156 void removeChildShadowRoot(); | 156 void removeChildShadowRoot(); |
| 157 void invalidateDescendantInsertionPoints(); | 157 void invalidateDescendantInsertionPoints(); |
| 158 | 158 |
| 159 // ShadowRoots should never be cloned. | 159 // ShadowRoots should never be cloned. |
| 160 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return 0; } | 160 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return nullptr; } |
| 161 | 161 |
| 162 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888
34 | 162 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888
34 |
| 163 bool isOrphan() const { return !host(); } | 163 bool isOrphan() const { return !host(); } |
| 164 | 164 |
| 165 ShadowRoot* m_prev; | 165 ShadowRoot* m_prev; |
| 166 ShadowRoot* m_next; | 166 ShadowRoot* m_next; |
| 167 OwnPtr<ShadowRootRareData> m_shadowRootRareData; | 167 OwnPtr<ShadowRootRareData> m_shadowRootRareData; |
| 168 unsigned m_numberOfStyles : 27; | 168 unsigned m_numberOfStyles : 27; |
| 169 unsigned m_applyAuthorStyles : 1; | 169 unsigned m_applyAuthorStyles : 1; |
| 170 unsigned m_resetStyleInheritance : 1; | 170 unsigned m_resetStyleInheritance : 1; |
| 171 unsigned m_type : 1; | 171 unsigned m_type : 1; |
| 172 unsigned m_registeredWithParentShadowRoot : 1; | 172 unsigned m_registeredWithParentShadowRoot : 1; |
| 173 unsigned m_descendantInsertionPointsIsValid : 1; | 173 unsigned m_descendantInsertionPointsIsValid : 1; |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 inline Element* ShadowRoot::activeElement() const | 176 inline Element* ShadowRoot::activeElement() const |
| 177 { | 177 { |
| 178 return adjustedFocusedElement(); | 178 return adjustedFocusedElement(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 181 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
| 182 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); | 182 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); |
| 183 | 183 |
| 184 } // namespace | 184 } // namespace |
| 185 | 185 |
| 186 #endif | 186 #endif |
| OLD | NEW |