| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 } else if (type == ShadowRootType::Open || type == ShadowRootType::Closed) { | 164 } else if (type == ShadowRootType::Open || type == ShadowRootType::Closed) { |
| 165 shadowHost.willAddFirstAuthorShadowRoot(); | 165 shadowHost.willAddFirstAuthorShadowRoot(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 for (ShadowRoot* root = m_shadowRoots.head(); root; root = root->olderShadow
Root()) | 168 for (ShadowRoot* root = m_shadowRoots.head(); root; root = root->olderShadow
Root()) |
| 169 root->lazyReattachIfAttached(); | 169 root->lazyReattachIfAttached(); |
| 170 | 170 |
| 171 ShadowRoot* shadowRoot = ShadowRoot::create(shadowHost.document(), type); | 171 ShadowRoot* shadowRoot = ShadowRoot::create(shadowHost.document(), type); |
| 172 shadowRoot->setParentOrShadowHostNode(&shadowHost); | 172 shadowRoot->setParentOrShadowHostNode(&shadowHost); |
| 173 shadowRoot->setParentTreeScope(shadowHost.treeScope()); | 173 shadowRoot->setParentTreeScope(shadowHost.treeScopeOrDocument()); |
| 174 m_shadowRoots.push(shadowRoot); | 174 m_shadowRoots.push(shadowRoot); |
| 175 setNeedsDistributionRecalc(); | 175 setNeedsDistributionRecalc(); |
| 176 | 176 |
| 177 shadowRoot->insertedInto(&shadowHost); | 177 shadowRoot->insertedInto(&shadowHost); |
| 178 shadowHost.setChildNeedsStyleRecalc(); | 178 shadowHost.setChildNeedsStyleRecalc(); |
| 179 shadowHost.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci
ng::create(StyleChangeReason::Shadow)); | 179 shadowHost.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci
ng::create(StyleChangeReason::Shadow)); |
| 180 | 180 |
| 181 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot); | 181 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot); |
| 182 | 182 |
| 183 return *shadowRoot; | 183 return *shadowRoot; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 visitor->trace(m_nodeToInsertionPoints); | 405 visitor->trace(m_nodeToInsertionPoints); |
| 406 visitor->trace(m_selectFeatures); | 406 visitor->trace(m_selectFeatures); |
| 407 // Shadow roots are linked with previous and next pointers which are traced. | 407 // Shadow roots are linked with previous and next pointers which are traced. |
| 408 // It is therefore enough to trace one of the shadow roots here and the | 408 // It is therefore enough to trace one of the shadow roots here and the |
| 409 // rest will be traced from there. | 409 // rest will be traced from there. |
| 410 visitor->trace(m_shadowRoots.head()); | 410 visitor->trace(m_shadowRoots.head()); |
| 411 visitor->trace(m_slotAssignment); | 411 visitor->trace(m_slotAssignment); |
| 412 } | 412 } |
| 413 | 413 |
| 414 } // namespace blink | 414 } // namespace blink |
| OLD | NEW |