script: Allow opening links in a new WebView (#35017)

This changes starts tracking the keyboard modifier state in the
`Constellation` and forwards it with every input event. The state
is used to modify the target of link click so when the
platform-dependent alternate action key is enabled, the target is
overriden to "_blank".

In addition, specification step numbers and text is updated.

Signed-off-by: webbeef <me@webbeef.org>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
webbeef 2025-03-23 03:59:19 -07:00 committed by GitHub
parent 8b8b447ef0
commit 90161c1c91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 114 additions and 25 deletions

View file

@ -1069,6 +1069,8 @@ impl ScriptThread {
let window = document.window();
let _realm = enter_realm(document.window());
for event in document.take_pending_input_events().into_iter() {
document.update_active_keyboard_modifiers(event.active_keyboard_modifiers);
match event.event {
InputEvent::MouseButton(mouse_button_event) => {
document.handle_mouse_button_event(