mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
DataTransferItem
: improve spec compliance (#35418)
* DataTransfer: remove PlainString and Binary structs Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * add DataTransferItemList remove() test case Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * bring datatransferitem closer to the spec Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> * queue a task to invoke the callback Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com> --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
0e9bebce0f
commit
966888615f
7 changed files with 198 additions and 125 deletions
|
@ -1140,8 +1140,8 @@ impl<T: ClipboardProvider> TextInput<T> {
|
|||
|
||||
fn paste_contents(&mut self, drag_data_store: &DragDataStore) {
|
||||
for item in drag_data_store.iter_item_list() {
|
||||
if let Kind::Text(string) = item {
|
||||
self.insert_string(string.data());
|
||||
if let Kind::Text { data, .. } = item {
|
||||
self.insert_string(data.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue