| OLD | NEW |
| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class AssignedNodesOptions; | 39 class AssignedNodesOptions; |
| 40 | 40 |
| 41 class CORE_EXPORT HTMLSlotElement final : public HTMLElement { | 41 class CORE_EXPORT HTMLSlotElement final : public HTMLElement { |
| 42 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
| 43 public: | 43 public: |
| 44 DECLARE_NODE_FACTORY(HTMLSlotElement); | 44 DECLARE_NODE_FACTORY(HTMLSlotElement); |
| 45 | 45 |
| 46 const HeapVector<Member<Node>>& getAssignedNodes() const { ASSERT(!needsDist
ributionRecalc()); return m_assignedNodes; } | 46 const HeapVector<Member<Node>>& assignedNodes() const { ASSERT(!needsDistrib
utionRecalc()); return m_assignedNodes; } |
| 47 const HeapVector<Member<Node>>& getDistributedNodes(); | 47 const HeapVector<Member<Node>>& getDistributedNodes(); |
| 48 const HeapVector<Member<Node>> getAssignedNodesForBinding(const AssignedNode
sOptions&); | 48 const HeapVector<Member<Node>> assignedNodesForBinding(const AssignedNodesOp
tions&); |
| 49 | 49 |
| 50 Node* firstDistributedNode() const { return m_distributedNodes.isEmpty() ? n
ullptr : m_distributedNodes.first().get(); } | 50 Node* firstDistributedNode() const { return m_distributedNodes.isEmpty() ? n
ullptr : m_distributedNodes.first().get(); } |
| 51 Node* lastDistributedNode() const { return m_distributedNodes.isEmpty() ? nu
llptr : m_distributedNodes.last().get(); } | 51 Node* lastDistributedNode() const { return m_distributedNodes.isEmpty() ? nu
llptr : m_distributedNodes.last().get(); } |
| 52 | 52 |
| 53 Node* distributedNodeNextTo(const Node&) const; | 53 Node* distributedNodeNextTo(const Node&) const; |
| 54 Node* distributedNodePreviousTo(const Node&) const; | 54 Node* distributedNodePreviousTo(const Node&) const; |
| 55 | 55 |
| 56 void appendAssignedNode(Node&); | 56 void appendAssignedNode(Node&); |
| 57 void appendDistributedNode(Node&); | 57 void appendDistributedNode(Node&); |
| 58 void appendDistributedNodesFrom(const HTMLSlotElement& other); | 58 void appendDistributedNodesFrom(const HTMLSlotElement& other); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 HeapVector<Member<Node>> m_distributedNodes; | 95 HeapVector<Member<Node>> m_distributedNodes; |
| 96 HeapHashMap<Member<const Node>, size_t> m_distributedIndices; | 96 HeapHashMap<Member<const Node>, size_t> m_distributedIndices; |
| 97 // TODO(hayato): Remove m_oldDistibutedNodes and make SlotAssignment check t
he diffirence between old and new distributed nodes for each slot to save the me
mories. | 97 // TODO(hayato): Remove m_oldDistibutedNodes and make SlotAssignment check t
he diffirence between old and new distributed nodes for each slot to save the me
mories. |
| 98 HeapVector<Member<Node>> m_oldDistributedNodes; | 98 HeapVector<Member<Node>> m_oldDistributedNodes; |
| 99 DistributionState m_distributionState; | 99 DistributionState m_distributionState; |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace blink | 102 } // namespace blink |
| 103 | 103 |
| 104 #endif // HTMLSlotElement_h | 104 #endif // HTMLSlotElement_h |
| OLD | NEW |