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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 1604853004: Rename slot.getDistributedNodes() to slot.getAssingedNodes({flatten: true}). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "core/html/HTMLSlotElement.h" 31 #include "core/html/HTMLSlotElement.h"
32 32
33 #include "core/HTMLNames.h" 33 #include "core/HTMLNames.h"
34 #include "core/dom/NodeTraversal.h" 34 #include "core/dom/NodeTraversal.h"
35 #include "core/dom/shadow/ElementShadow.h" 35 #include "core/dom/shadow/ElementShadow.h"
36 #include "core/dom/shadow/InsertionPoint.h" 36 #include "core/dom/shadow/InsertionPoint.h"
37 #include "core/html/AssignedNodesOptions.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 using namespace HTMLNames; 41 using namespace HTMLNames;
41 42
42 inline HTMLSlotElement::HTMLSlotElement(Document& document) 43 inline HTMLSlotElement::HTMLSlotElement(Document& document)
43 : HTMLElement(slotTag, document) 44 : HTMLElement(slotTag, document)
44 { 45 {
45 } 46 }
46 47
47 DEFINE_NODE_FACTORY(HTMLSlotElement); 48 DEFINE_NODE_FACTORY(HTMLSlotElement);
48 49
50 const WillBeHeapVector<RefPtrWillBeMember<Node>> HTMLSlotElement::getAssignedNod esForBinding(const AssignedNodesOptions& options)
51 {
52 updateDistribution();
53 if (options.hasFlatten() && options.flatten())
54 return getDistributedNodes();
55 return m_assignedNodes;
56 }
57
49 void HTMLSlotElement::appendAssignedNode(Node& node) 58 void HTMLSlotElement::appendAssignedNode(Node& node)
50 { 59 {
51 m_assignedNodes.append(&node); 60 m_assignedNodes.append(&node);
52 } 61 }
53 62
54 void HTMLSlotElement::appendDistributedNode(Node& node) 63 void HTMLSlotElement::appendDistributedNode(Node& node)
55 { 64 {
56 m_distributedNodes.append(&node); 65 m_distributedNodes.append(&node);
57 } 66 }
58 67
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 175 }
167 176
168 DEFINE_TRACE(HTMLSlotElement) 177 DEFINE_TRACE(HTMLSlotElement)
169 { 178 {
170 visitor->trace(m_assignedNodes); 179 visitor->trace(m_assignedNodes);
171 visitor->trace(m_distributedNodes); 180 visitor->trace(m_distributedNodes);
172 HTMLElement::trace(visitor); 181 HTMLElement::trace(visitor);
173 } 182 }
174 183
175 } 184 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSlotElement.h ('k') | third_party/WebKit/Source/core/html/HTMLSlotElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698