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/shared/embedder/lib.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/shared/embedder/lib.rs')
-rw-r--r-- | components/shared/embedder/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/shared/embedder/lib.rs b/components/shared/embedder/lib.rs index 2548cad70f3..b03fa1035df 100644 --- a/components/shared/embedder/lib.rs +++ b/components/shared/embedder/lib.rs @@ -192,6 +192,8 @@ pub enum EmbedderMsg { AllowUnload(IpcSender<bool>), /// Sends an unconsumed key event back to the embedder. Keyboard(KeyboardEvent), + /// Inform embedder to clear the clipboard + ClearClipboardContents, /// Gets system clipboard contents GetClipboardContents(IpcSender<String>), /// Sets system clipboard contents @@ -256,6 +258,7 @@ pub enum CompositorEventVariant { CompositionEvent, IMEDismissedEvent, GamepadEvent, + ClipboardEvent, } impl Debug for EmbedderMsg { @@ -269,6 +272,7 @@ impl Debug for EmbedderMsg { EmbedderMsg::AllowUnload(..) => write!(f, "AllowUnload"), EmbedderMsg::AllowNavigationRequest(..) => write!(f, "AllowNavigationRequest"), EmbedderMsg::Keyboard(..) => write!(f, "Keyboard"), + EmbedderMsg::ClearClipboardContents => write!(f, "ClearClipboardContents"), EmbedderMsg::GetClipboardContents(..) => write!(f, "GetClipboardContents"), EmbedderMsg::SetClipboardContents(..) => write!(f, "SetClipboardContents"), EmbedderMsg::SetCursor(..) => write!(f, "SetCursor"), |