OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 oldRoot->setPrev(0); | 67 oldRoot->setPrev(0); |
68 oldRoot->setNext(0); | 68 oldRoot->setNext(0); |
69 ChildNodeRemovalNotifier(shadowHost).notify(oldRoot.get()); | 69 ChildNodeRemovalNotifier(shadowHost).notify(oldRoot.get()); |
70 } | 70 } |
71 | 71 |
72 m_distributor.invalidateDistribution(shadowHost); | 72 m_distributor.invalidateDistribution(shadowHost); |
73 } | 73 } |
74 | 74 |
75 void ElementShadow::attach() | 75 void ElementShadow::attach() |
76 { | 76 { |
77 ContentDistributor::ensureDistribution(youngestShadowRoot()); | 77 ContentDistributor::ensureDistribution(host()); |
78 | 78 |
79 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) { | 79 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) { |
80 if (!root->attached()) | 80 if (!root->attached()) |
81 root->attach(); | 81 root->attach(); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 void ElementShadow::detach() | 85 void ElementShadow::detach() |
86 { | 86 { |
87 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) { | 87 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 info.addMember(m_shadowRoots, "shadowRoots"); | 130 info.addMember(m_shadowRoots, "shadowRoots"); |
131 ShadowRoot* shadowRoot = m_shadowRoots.head(); | 131 ShadowRoot* shadowRoot = m_shadowRoots.head(); |
132 while (shadowRoot) { | 132 while (shadowRoot) { |
133 info.addMember(shadowRoot, "shadowRoot"); | 133 info.addMember(shadowRoot, "shadowRoot"); |
134 shadowRoot = shadowRoot->next(); | 134 shadowRoot = shadowRoot->next(); |
135 } | 135 } |
136 info.addMember(m_distributor, "distributor"); | 136 info.addMember(m_distributor, "distributor"); |
137 } | 137 } |
138 | 138 |
139 } // namespace | 139 } // namespace |
OLD | NEW |