From 03370dc76ac8fbec49d8ff6e43c7fbae2a489abc Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Mon, 10 Feb 2025 15:20:01 +1300 Subject: [PATCH] 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. --- Libraries/LibWeb/HTML/TraversableNavigable.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibWeb/HTML/TraversableNavigable.cpp b/Libraries/LibWeb/HTML/TraversableNavigable.cpp index c4e6229dbb1..9a00a51a55f 100644 --- a/Libraries/LibWeb/HTML/TraversableNavigable.cpp +++ b/Libraries/LibWeb/HTML/TraversableNavigable.cpp @@ -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() > displayed_entry->step().get()); break; }