mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
async clipboard: implement writeText
(#36498)
Implement enough of the Clipboard API to have a working `writeText`. Testing: Unfortunately many clipboard-apis tests require testdriver, so only idlharness ones will pass now. --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
c6dc7c83a8
commit
2bab5d8d52
11 changed files with 173 additions and 41 deletions
|
@ -23,6 +23,7 @@ use crate::task_manager::TaskManager;
|
|||
#[derive(Clone, Copy, Debug, Eq, Hash, JSTraceable, MallocSizeOf, PartialEq, VariantArray)]
|
||||
pub(crate) enum TaskSourceName {
|
||||
Canvas,
|
||||
Clipboard,
|
||||
DOMManipulation,
|
||||
FileReading,
|
||||
/// <https://drafts.csswg.org/css-font-loading/#task-source>
|
||||
|
@ -48,6 +49,7 @@ impl From<TaskSourceName> for ScriptThreadEventCategory {
|
|||
fn from(value: TaskSourceName) -> Self {
|
||||
match value {
|
||||
TaskSourceName::Canvas => ScriptThreadEventCategory::ScriptEvent,
|
||||
TaskSourceName::Clipboard => ScriptThreadEventCategory::ScriptEvent,
|
||||
TaskSourceName::DOMManipulation => ScriptThreadEventCategory::ScriptEvent,
|
||||
TaskSourceName::FileReading => ScriptThreadEventCategory::FileRead,
|
||||
TaskSourceName::FontLoading => ScriptThreadEventCategory::FontLoading,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue