diff options
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.h | 15 |
1 files changed, 10 insertions, 5 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 3a2fc851b9b..0821db41441 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 @@ -73,13 +73,12 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement { void WillRecalcAssignedNodes() { ClearAssignedNodes(); } void DidRecalcAssignedNodes() { - if (RuntimeEnabledFeatures::FastFlatTreeTraversalEnabled()) - UpdateFlatTreeNodeDataForAssignedNodes(); + UpdateFlatTreeNodeDataForAssignedNodes(); RecalcFlatTreeChildren(); } void AttachLayoutTree(AttachContext&) final; - void DetachLayoutTree(const AttachContext& = AttachContext()) final; + void DetachLayoutTree(bool performing_reattach) final; void RebuildDistributedChildrenLayoutTrees(WhitespaceAttacher&); void AttributeChanged(const AttributeModificationParams&) final; @@ -91,7 +90,6 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement { // shadow host. This method should be used only when |assigned_nodes_| is // dirty. e.g. To detect a slotchange event in DOM mutations. bool HasAssignedNodesSlow() const; - bool FindHostChildWithSameSlotName() const; bool SupportsAssignment() const { return IsInV1ShadowTree(); } @@ -143,7 +141,6 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement { 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; @@ -151,6 +148,14 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement { // For imperative Shadow DOM distribution APIs HeapHashSet<Member<Node>> assigned_nodes_candidates_; + template <typename T, wtf_size_t S> + struct LCSArray { + LCSArray() : values(S) {} + T& operator[](wtf_size_t i) { return values[i]; } + wtf_size_t size() { return values.size(); } + Vector<T, S> values; + }; + // TODO(hayato): Move this to more appropriate directory (e.g. platform/wtf) // if there are more than one usages. template <typename Container, typename LCSTable, typename BacktrackTable> |