diff options
author | Gae24 <96017547+Gae24@users.noreply.github.com> | 2025-01-15 20:45:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-15 19:45:29 +0000 |
commit | d470f219b1cb80f50bb9050a7649627397f7a5d9 (patch) | |
tree | ab726a47db048f1a14edab25d686f2c2b10e52d5 /components/compositing/windowing.rs | |
parent | cd9e831e91e7587a71c5fa401b3721b5cfad8f43 (diff) | |
download | servo-d470f219b1cb80f50bb9050a7649627397f7a5d9.tar.gz servo-d470f219b1cb80f50bb9050a7649627397f7a5d9.zip |
Implement Clipboard Event Api (#33576)
* implement ClipboardEvent interface
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* draft implementation of clipboard events
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* handle received clipboard events inside html elemtents
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* use rustdoc style
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix compilation errors due to rebase
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* update arboard crate
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* improve paste events
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* code cleanup
revert arboard crate's update, handle text only
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* restrict visibility of some methods to script crate
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* propagate CanGc argument
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* simplify handle_clipboard_msg
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* remove code duplication
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix potential borrow hazard
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* add clipboard_event pref, restore unit test code
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* retrict visibility of some document's methods
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* check if clipboardevent is trusted
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* enable clipboardevent
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* fix compilation for egl ports
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
Diffstat (limited to 'components/compositing/windowing.rs')
-rw-r--r-- | components/compositing/windowing.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index dce66be05ca..f2648246c2b 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -14,8 +14,8 @@ use keyboard_types::{CompositionEvent, KeyboardEvent}; use libc::c_void; use net::protocols::ProtocolRegistry; use script_traits::{ - GamepadEvent, MediaSessionActionType, MouseButton, Theme, TouchEventType, TouchId, - TraversalDirection, WheelDelta, + ClipboardEventType, GamepadEvent, MediaSessionActionType, MouseButton, Theme, TouchEventType, + TouchId, TraversalDirection, WheelDelta, }; use servo_geometry::{DeviceIndependentIntRect, DeviceIndependentIntSize, DeviceIndependentPixel}; use servo_url::ServoUrl; @@ -134,6 +134,8 @@ pub enum EmbedderEvent { Gamepad(GamepadEvent), /// Vertical Synchronization tick Vsync, + /// Sent when access to clipboard is required + ClipboardAction(ClipboardEventType), } impl Debug for EmbedderEvent { @@ -196,6 +198,7 @@ impl Debug for EmbedderEvent { EmbedderEvent::ReplaceNativeSurface(..) => write!(f, "ReplaceNativeSurface"), EmbedderEvent::Gamepad(..) => write!(f, "Gamepad"), EmbedderEvent::Vsync => write!(f, "Vsync"), + EmbedderEvent::ClipboardAction(_) => write!(f, "ClipboardAction"), } } } |