LibWeb/HTML: Improve assertion for apply the history step mismatch

This more directly catches the bug we have that causes this
assertion to happen on certain sites and WPT tests.
This commit is contained in:
Shannon Booth 2025-02-10 15:20:01 +13:00 committed by Sam Atkins
parent dc58f6567f
commit 03370dc76a
Notes: github-actions[bot] 2025-02-10 15:56:47 +00:00

View file

@ -564,6 +564,7 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
case Bindings::NavigationType::Push:
// FIXME: Add ever populated check, and fix the bug where top level traversable's step is not updated when a child navigable navigates
// - "push": Assert: targetEntry's step is displayedEntry's step + 1 and targetEntry's document state's ever populated is false.
VERIFY(target_entry != displayed_entry);
VERIFY(target_entry->step().get<int>() > displayed_entry->step().get<int>());
break;
}