LibWeb+UI: Support triple clicking and dragging paragraphs

When triple clicking on text, we should select the entire paragraph, or
entire line in <input>s and <textarea>s. If the mouse button is held
down and the user starts dragging, the selection expands with additional
paragraphs or lines.

This expands on the work of Kai Wildberger (PR #7681) but was adjusted
for the work that happened previously to support double click + drag
moves and includes triple click support for our Qt UI.

Co-authored-by: Kai Wildberger <kiawildberger@gmail.com>
This commit is contained in:
Jelle Raaijmakers
2026-02-05 13:07:15 +01:00
committed by Sam Atkins
parent 14b35887de
commit 2a2f8ef90b
Notes: github-actions[bot] 2026-02-06 14:19:18 +00:00
14 changed files with 233 additions and 21 deletions

View File

@@ -304,6 +304,8 @@ void EventLoop::process_input_events() const
return page.handle_mousewheel(mouse_event.position, mouse_event.screen_position, mouse_event.button, mouse_event.buttons, mouse_event.modifiers, mouse_event.wheel_delta_x, mouse_event.wheel_delta_y);
case MouseEvent::Type::DoubleClick:
return page.handle_doubleclick(mouse_event.position, mouse_event.screen_position, mouse_event.button, mouse_event.buttons, mouse_event.modifiers);
case MouseEvent::Type::TripleClick:
return page.handle_tripleclick(mouse_event.position, mouse_event.screen_position, mouse_event.button, mouse_event.buttons, mouse_event.modifiers);
}
VERIFY_NOT_REACHED();
},