| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 shadowRoot->setParentOrShadowHostNode(shadowHost); | 38 shadowRoot->setParentOrShadowHostNode(shadowHost); |
| 39 shadowRoot->setParentTreeScope(shadowHost->treeScope()); | 39 shadowRoot->setParentTreeScope(shadowHost->treeScope()); |
| 40 m_shadowRoots.push(shadowRoot.get()); | 40 m_shadowRoots.push(shadowRoot.get()); |
| 41 m_distributor.didShadowBoundaryChange(shadowHost); | 41 m_distributor.didShadowBoundaryChange(shadowHost); |
| 42 ChildNodeInsertionNotifier(shadowHost).notify(shadowRoot.get()); | 42 ChildNodeInsertionNotifier(shadowHost).notify(shadowRoot.get()); |
| 43 | 43 |
| 44 // Existence of shadow roots requires the host and its children to do traver
sal using ComposedShadowTreeWalker. | 44 // Existence of shadow roots requires the host and its children to do traver
sal using ComposedShadowTreeWalker. |
| 45 shadowHost->setNeedsShadowTreeWalker(); | 45 shadowHost->setNeedsShadowTreeWalker(); |
| 46 | 46 |
| 47 // FIXME(94905): ShadowHost should be reattached during recalcStyle. |
| 48 // Set some flag here and recreate shadow hosts' renderer in |
| 49 // Element::recalcStyle. |
| 47 if (shadowHost->attached()) | 50 if (shadowHost->attached()) |
| 48 shadowHost->lazyReattach(); | 51 shadowHost->lazyReattach(); |
| 49 | 52 |
| 50 InspectorInstrumentation::didPushShadowRoot(shadowHost, shadowRoot.get()); | 53 InspectorInstrumentation::didPushShadowRoot(shadowHost, shadowRoot.get()); |
| 51 | 54 |
| 52 return shadowRoot.get(); | 55 return shadowRoot.get(); |
| 53 } | 56 } |
| 54 | 57 |
| 55 void ElementShadow::removeAllShadowRoots() | 58 void ElementShadow::removeAllShadowRoots() |
| 56 { | 59 { |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 info.addMember(m_shadowRoots, "shadowRoots"); | 136 info.addMember(m_shadowRoots, "shadowRoots"); |
| 134 ShadowRoot* shadowRoot = m_shadowRoots.head(); | 137 ShadowRoot* shadowRoot = m_shadowRoots.head(); |
| 135 while (shadowRoot) { | 138 while (shadowRoot) { |
| 136 info.addMember(shadowRoot, "shadowRoot"); | 139 info.addMember(shadowRoot, "shadowRoot"); |
| 137 shadowRoot = shadowRoot->next(); | 140 shadowRoot = shadowRoot->next(); |
| 138 } | 141 } |
| 139 info.addMember(m_distributor, "distributor"); | 142 info.addMember(m_distributor, "distributor"); |
| 140 } | 143 } |
| 141 | 144 |
| 142 } // namespace | 145 } // namespace |
| OLD | NEW |