mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
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:
parent
8b8b447ef0
commit
90161c1c91
5 changed files with 114 additions and 25 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue