LibWeb: Remove layout node check in EventHandler::handle_keydown()

This function does not rely on having a layout node.
This commit is contained in:
Aliaksandr Kalenik 2024-10-03 19:58:08 +02:00 committed by Andreas Kling
parent 0b403d30d7
commit dc1a646764
Notes: github-actions[bot] 2024-10-04 05:08:14 +00:00

View file

@ -844,8 +844,6 @@ EventResult EventHandler::handle_keydown(UIEvents::KeyCode key, u32 modifiers, u
return EventResult::Dropped; return EventResult::Dropped;
JS::NonnullGCPtr<DOM::Document> document = *m_navigable->active_document(); JS::NonnullGCPtr<DOM::Document> document = *m_navigable->active_document();
if (!document->layout_node())
return EventResult::Dropped;
if (key == UIEvents::KeyCode::Key_Tab) { if (key == UIEvents::KeyCode::Key_Tab) {
if (modifiers & UIEvents::KeyModifier::Mod_Shift) if (modifiers & UIEvents::KeyModifier::Mod_Shift)