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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 if (m_registeredWithParentShadowRoot) { | 183 if (m_registeredWithParentShadowRoot) { |
184 ShadowRoot* root = host()->containingShadowRoot(); | 184 ShadowRoot* root = host()->containingShadowRoot(); |
185 if (!root) | 185 if (!root) |
186 root = insertionPoint->containingShadowRoot(); | 186 root = insertionPoint->containingShadowRoot(); |
187 if (root) | 187 if (root) |
188 root->removeChildShadowRoot(); | 188 root->removeChildShadowRoot(); |
189 m_registeredWithParentShadowRoot = false; | 189 m_registeredWithParentShadowRoot = false; |
190 } | 190 } |
191 } | 191 } |
192 | 192 |
| 193 if (selfOrDescendantsHaveActiveStyleSheets()) |
| 194 clearSelfOrDescendantsHaveActiveStyleSheets(); |
| 195 |
193 DocumentFragment::removedFrom(insertionPoint); | 196 DocumentFragment::removedFrom(insertionPoint); |
194 } | 197 } |
195 | 198 |
196 void ShadowRoot::childrenChanged(const ChildrenChange& change) | 199 void ShadowRoot::childrenChanged(const ChildrenChange& change) |
197 { | 200 { |
198 ContainerNode::childrenChanged(change); | 201 ContainerNode::childrenChanged(change); |
199 | 202 |
200 if (change.isChildElementChange()) | 203 if (change.isChildElementChange()) |
201 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme
ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf
terChange); | 204 checkForSiblingStyleChanges(change.type == ElementRemoved ? SiblingEleme
ntRemoved : SiblingElementInserted, change.siblingBeforeChange, change.siblingAf
terChange); |
202 | 205 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 DEFINE_TRACE(ShadowRoot) | 328 DEFINE_TRACE(ShadowRoot) |
326 { | 329 { |
327 visitor->trace(m_prev); | 330 visitor->trace(m_prev); |
328 visitor->trace(m_next); | 331 visitor->trace(m_next); |
329 visitor->trace(m_shadowRootRareData); | 332 visitor->trace(m_shadowRootRareData); |
330 TreeScope::trace(visitor); | 333 TreeScope::trace(visitor); |
331 DocumentFragment::trace(visitor); | 334 DocumentFragment::trace(visitor); |
332 } | 335 } |
333 | 336 |
334 } | 337 } |
OLD | NEW |