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

@ -38,6 +38,7 @@ use euclid::{Rect, Scale, Size2D, UnknownUnit};
use http::{HeaderMap, Method};
use ipc_channel::Error as IpcError;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use keyboard_types::Modifiers;
use log::warn;
use malloc_size_of_derive::MallocSizeOf;
use media::WindowGLContext;
@ -401,6 +402,8 @@ pub struct ConstellationInputEvent {
/// The pressed mouse button state of the constellation when this input
/// event was triggered.
pub pressed_mouse_buttons: u16,
/// The currently active keyboard modifiers.
pub active_keyboard_modifiers: Modifiers,
/// The [`InputEvent`] itself.
pub event: InputEvent,
}