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