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.
This commit is contained in:
Pavel Shliak 2024-12-20 03:17:02 +04:00 committed by Andreas Kling
parent fa02d94d30
commit d6466da4db
Notes: github-actions[bot] 2024-12-22 11:34:42 +00:00

View file

@ -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)