| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 shadowRoot->setParentOrShadowHostNode(&shadowHost); | 79 shadowRoot->setParentOrShadowHostNode(&shadowHost); |
| 80 shadowRoot->setParentTreeScope(shadowHost.treeScope()); | 80 shadowRoot->setParentTreeScope(shadowHost.treeScope()); |
| 81 appendShadowRoot(*shadowRoot); | 81 appendShadowRoot(*shadowRoot); |
| 82 setNeedsDistributionRecalc(); | 82 setNeedsDistributionRecalc(); |
| 83 | 83 |
| 84 shadowRoot->insertedInto(&shadowHost); | 84 shadowRoot->insertedInto(&shadowHost); |
| 85 shadowHost.setChildNeedsStyleRecalc(); | 85 shadowHost.setChildNeedsStyleRecalc(); |
| 86 shadowHost.setNeedsStyleRecalc( | 86 shadowHost.setNeedsStyleRecalc( |
| 87 SubtreeStyleChange, | 87 SubtreeStyleChange, |
| 88 StyleChangeReasonForTracing::create(StyleChangeReason::Shadow)); | 88 StyleChangeReasonForTracing::create(StyleChangeReason::Shadow)); |
| 89 shadowRoot->setNeedsReattachLayoutTree(); |
| 89 | 90 |
| 90 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot); | 91 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot); |
| 91 | 92 |
| 92 return *shadowRoot; | 93 return *shadowRoot; |
| 93 } | 94 } |
| 94 | 95 |
| 95 void ElementShadow::appendShadowRoot(ShadowRoot& shadowRoot) { | 96 void ElementShadow::appendShadowRoot(ShadowRoot& shadowRoot) { |
| 96 if (!m_shadowRoot) { | 97 if (!m_shadowRoot) { |
| 97 m_shadowRoot = &shadowRoot; | 98 m_shadowRoot = &shadowRoot; |
| 98 return; | 99 return; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 visitor->trace(m_elementShadowV0); | 164 visitor->trace(m_elementShadowV0); |
| 164 visitor->trace(m_shadowRoot); | 165 visitor->trace(m_shadowRoot); |
| 165 } | 166 } |
| 166 | 167 |
| 167 DEFINE_TRACE_WRAPPERS(ElementShadow) { | 168 DEFINE_TRACE_WRAPPERS(ElementShadow) { |
| 168 visitor->traceWrappers(m_elementShadowV0); | 169 visitor->traceWrappers(m_elementShadowV0); |
| 169 visitor->traceWrappers(m_shadowRoot); | 170 visitor->traceWrappers(m_shadowRoot); |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace blink | 173 } // namespace blink |
| OLD | NEW |