Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp

Issue 1877813002: Clarify that Blink does not support a re-distribution across v0 and v1 shadow trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@slotchange-1
Patch Set: clarify Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/shadow/SlotAssignment.h" 5 #include "core/dom/shadow/SlotAssignment.h"
6 6
7 #include "core/HTMLNames.h" 7 #include "core/HTMLNames.h"
8 #include "core/dom/ElementTraversal.h" 8 #include "core/dom/ElementTraversal.h"
9 #include "core/dom/NodeTraversal.h" 9 #include "core/dom/NodeTraversal.h"
10 #include "core/dom/shadow/ElementShadow.h" 10 #include "core/dom/shadow/ElementShadow.h"
(...skipping 22 matching lines...) Expand all
33 Name2Slot name2slot; 33 Name2Slot name2slot;
34 34
35 const HeapVector<Member<HTMLSlotElement>>& slots = shadowRoot.descendantSlot s(); 35 const HeapVector<Member<HTMLSlotElement>>& slots = shadowRoot.descendantSlot s();
36 36
37 for (Member<HTMLSlotElement> slot : slots) { 37 for (Member<HTMLSlotElement> slot : slots) {
38 slot->willUpdateDistribution(); 38 slot->willUpdateDistribution();
39 name2slot.add(slot->name(), slot.get()); 39 name2slot.add(slot->name(), slot.get());
40 } 40 }
41 41
42 for (Node& child : NodeTraversal::childrenOf(*shadowRoot.host())) { 42 for (Node& child : NodeTraversal::childrenOf(*shadowRoot.host())) {
43 if (child.isElementNode() && isActiveInsertionPoint(child)) { 43 if (child.isInsertionPoint()) {
hayato 2016/04/11 09:34:40 Strictly speaking, this is the behavior change. Ho
kochi 2016/04/11 10:35:33 Acknowledged.
44 // TODO(hayato): Support re-distribution across v0 and v1 shadow tre es 44 // A re-distribution across v0 and v1 shadow trees is not supported.
45 detachNotAssignedNode(child); 45 detachNotAssignedNode(child);
46 continue; 46 continue;
47 } 47 }
48 if (!child.slottable()) { 48 if (!child.slottable()) {
49 detachNotAssignedNode(child); 49 detachNotAssignedNode(child);
50 continue; 50 continue;
51 } 51 }
52 AtomicString slotName = child.slotName(); 52 AtomicString slotName = child.slotName();
53 HTMLSlotElement* slot = name2slot.get(slotName); 53 HTMLSlotElement* slot = name2slot.get(slotName);
54 if (slot) 54 if (slot)
(...skipping 21 matching lines...) Expand all
76 if (slot.isChildOfV1ShadowHost()) 76 if (slot.isChildOfV1ShadowHost())
77 slot.parentElementShadow()->setNeedsDistributionRecalc(); 77 slot.parentElementShadow()->setNeedsDistributionRecalc();
78 } 78 }
79 79
80 DEFINE_TRACE(SlotAssignment) 80 DEFINE_TRACE(SlotAssignment)
81 { 81 {
82 visitor->trace(m_assignment); 82 visitor->trace(m_assignment);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698