From d6466da4db835d6700d48c0e1ab9be2aab03ce3a Mon Sep 17 00:00:00 2001 From: Pavel Shliak Date: Fri, 20 Dec 2024 03:17:02 +0400 Subject: [PATCH] LibWeb: Correct interception state assertion logic The previous VERIFY statement incorrectly asserted that the interception state was not "committed" or "scrolled". Updated the condition to ensure the interception state is either "committed" or "scrolled" as intended. --- Libraries/LibWeb/HTML/NavigateEvent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/HTML/NavigateEvent.cpp b/Libraries/LibWeb/HTML/NavigateEvent.cpp index 657e19166d..ef1cc889fc 100644 --- a/Libraries/LibWeb/HTML/NavigateEvent.cpp +++ b/Libraries/LibWeb/HTML/NavigateEvent.cpp @@ -204,7 +204,7 @@ void NavigateEvent::process_scroll_behavior() void NavigateEvent::potentially_process_scroll_behavior() { // 1. Assert: event's interception state is "committed" or "scrolled". - VERIFY(m_interception_state != InterceptionState::Committed && m_interception_state != InterceptionState::Scrolled); + VERIFY(m_interception_state == InterceptionState::Committed || m_interception_state == InterceptionState::Scrolled); // 2. If event's interception state is "scrolled", then return. if (m_interception_state == InterceptionState::Scrolled)