summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/html_slot_element.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/html_slot_element.h')
-rw-r--r--chromium/third_party/blink/renderer/core/html/html_slot_element.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/html_slot_element.h b/chromium/third_party/blink/renderer/core/html/html_slot_element.h
index 4e127e195c6..bec406ad9ed 100644
--- a/chromium/third_party/blink/renderer/core/html/html_slot_element.h
+++ b/chromium/third_party/blink/renderer/core/html/html_slot_element.h
@@ -64,13 +64,18 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement {
return nodes.IsEmpty() ? nullptr : nodes.back().Get();
}
+ Node* AssignedNodeNextTo(const Node&) const;
+ Node* AssignedNodePreviousTo(const Node&) const;
+
void AppendAssignedNode(Node&);
+ void ClearAssignedNodes();
const HeapVector<Member<Node>> FlattenedAssignedNodes();
void WillRecalcAssignedNodes() { ClearAssignedNodes(); }
void DidRecalcAssignedNodes() {
- UpdateFlatTreeNodeDataForAssignedNodes();
+ if (RuntimeEnabledFeatures::FastFlatTreeTraversalEnabled())
+ UpdateFlatTreeNodeDataForAssignedNodes();
RecalcFlatTreeChildren();
}
@@ -112,7 +117,7 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement {
return assigned_nodes_candidates_;
}
- void Trace(blink::Visitor*) override;
+ void Trace(Visitor*) override;
private:
InsertionNotificationRequest InsertedInto(ContainerNode&) final;
@@ -137,10 +142,10 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement {
void RecalcFlatTreeChildren();
void UpdateFlatTreeNodeDataForAssignedNodes();
- void ClearAssignedNodes();
void ClearAssignedNodesAndFlatTreeChildren();
HeapVector<Member<Node>> assigned_nodes_;
+ HeapHashMap<Member<const Node>, unsigned> assigned_nodes_index_;
HeapVector<Member<Node>> flat_tree_children_;
bool slotchange_event_enqueued_ = false;