| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) | 162 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow
Root()) |
| 163 root->lazyReattachIfAttached(); | 163 root->lazyReattachIfAttached(); |
| 164 | 164 |
| 165 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost.do
cument(), type); | 165 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost.do
cument(), type); |
| 166 shadowRoot->setParentOrShadowHostNode(&shadowHost); | 166 shadowRoot->setParentOrShadowHostNode(&shadowHost); |
| 167 shadowRoot->setParentTreeScope(shadowHost.treeScope()); | 167 shadowRoot->setParentTreeScope(shadowHost.treeScope()); |
| 168 m_shadowRoots.push(shadowRoot.get()); | 168 m_shadowRoots.push(shadowRoot.get()); |
| 169 setNeedsDistributionRecalc(); | 169 setNeedsDistributionRecalc(); |
| 170 | 170 |
| 171 shadowRoot->insertedInto(&shadowHost); | 171 shadowRoot->insertedInto(&shadowHost); |
| 172 shadowHost.setChildNeedsStyleRecalc(); |
| 173 shadowHost.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTraci
ng::create(StyleChangeReason::Shadow)); |
| 174 |
| 172 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot.get()); | 175 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot.get()); |
| 173 | 176 |
| 174 return *shadowRoot; | 177 return *shadowRoot; |
| 175 } | 178 } |
| 176 | 179 |
| 177 #if !ENABLE(OILPAN) | 180 #if !ENABLE(OILPAN) |
| 178 void ElementShadow::removeDetachedShadowRoots() | 181 void ElementShadow::removeDetachedShadowRoots() |
| 179 { | 182 { |
| 180 // Dont protect this ref count. | 183 // Dont protect this ref count. |
| 181 Element* shadowHost = host(); | 184 Element* shadowHost = host(); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 visitor->trace(m_nodeToInsertionPoints); | 383 visitor->trace(m_nodeToInsertionPoints); |
| 381 visitor->trace(m_selectFeatures); | 384 visitor->trace(m_selectFeatures); |
| 382 // Shadow roots are linked with previous and next pointers which are traced. | 385 // Shadow roots are linked with previous and next pointers which are traced. |
| 383 // It is therefore enough to trace one of the shadow roots here and the | 386 // It is therefore enough to trace one of the shadow roots here and the |
| 384 // rest will be traced from there. | 387 // rest will be traced from there. |
| 385 visitor->trace(m_shadowRoots.head()); | 388 visitor->trace(m_shadowRoots.head()); |
| 386 #endif | 389 #endif |
| 387 } | 390 } |
| 388 | 391 |
| 389 } // namespace | 392 } // namespace |
| OLD | NEW |