| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 using TreeScope::setParentTreeScope; | 73 using TreeScope::setParentTreeScope; |
| 74 | 74 |
| 75 Element& host() const { DCHECK(parentOrShadowHostNode()); return *toElement(
parentOrShadowHostNode()); } | 75 Element& host() const { DCHECK(parentOrShadowHostNode()); return *toElement(
parentOrShadowHostNode()); } |
| 76 ElementShadow* owner() const { return host().shadow(); } | 76 ElementShadow* owner() const { return host().shadow(); } |
| 77 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } | 77 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } |
| 78 String mode() const { return (type() == ShadowRootType::V0 || type() == Shad
owRootType::Open) ? "open" : "closed"; }; | 78 String mode() const { return (type() == ShadowRootType::V0 || type() == Shad
owRootType::Open) ? "open" : "closed"; }; |
| 79 | 79 |
| 80 bool isOpenOrV0() const { return type() == ShadowRootType::V0 || type() == S
hadowRootType::Open; } | 80 bool isOpenOrV0() const { return type() == ShadowRootType::V0 || type() == S
hadowRootType::Open; } |
| 81 bool isV1() const { return type() == ShadowRootType::Open || type() == Shado
wRootType::Closed; } | 81 bool isV1() const { return type() == ShadowRootType::Open || type() == Shado
wRootType::Closed; } |
| 82 | 82 |
| 83 void attach(const AttachContext& = AttachContext()) override; | 83 void attachLayoutTree(const AttachContext& = AttachContext()) override; |
| 84 void detach(const AttachContext& = AttachContext()) override; | 84 void detach(const AttachContext& = AttachContext()) override; |
| 85 | 85 |
| 86 InsertionNotificationRequest insertedInto(ContainerNode*) override; | 86 InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 87 void removedFrom(ContainerNode*) override; | 87 void removedFrom(ContainerNode*) override; |
| 88 | 88 |
| 89 // For V0 | 89 // For V0 |
| 90 ShadowRoot* youngerShadowRoot() const; | 90 ShadowRoot* youngerShadowRoot() const; |
| 91 ShadowRoot* olderShadowRoot() const; | 91 ShadowRoot* olderShadowRoot() const; |
| 92 ShadowRoot* olderShadowRootForBindings() const; | 92 ShadowRoot* olderShadowRootForBindings() const; |
| 93 void setYoungerShadowRoot(ShadowRoot&); | 93 void setYoungerShadowRoot(ShadowRoot&); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 178 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
| 179 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); | 179 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); |
| 180 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true); | 180 DEFINE_TYPE_CASTS(TreeScope, ShadowRoot, shadowRoot, true, true); |
| 181 | 181 |
| 182 CORE_EXPORT std::ostream& operator<<(std::ostream&, const ShadowRootType&); | 182 CORE_EXPORT std::ostream& operator<<(std::ostream&, const ShadowRootType&); |
| 183 | 183 |
| 184 } // namespace blink | 184 } // namespace blink |
| 185 | 185 |
| 186 #endif // ShadowRoot_h | 186 #endif // ShadowRoot_h |
| OLD | NEW |