mirror of
https://github.com/servo/servo.git
synced 2025-06-13 19:04:30 +00: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
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue