From 16d3f9e38ace4a57be13ac55ab2f81e46c11b143 Mon Sep 17 00:00:00 2001 From: Rohan Raja Date: Wed, 13 Nov 2024 16:56:44 +0000 Subject: [PATCH] Bug 1930748 [wpt PR 49127] - Update DataTransfer.Files upon change to it's items list, a=testonly Automatic update from web-platform-tests Update DataTransfer.Files upon change to it's items list Refactored "blink::DataTransfer" class to update "files_" member when it's DataObject's item list is changed, instead of doing the same in the files getter. This change ensures that files is updated immediately when the DataTransfer's item list changes. This fixes the issue where if a reference to DataTransfer.files is stored in a separate JS variable, then any file items added to that DataTransfer object are not reflected in the stored JS variable, until the DataTransfer object's files getter is invoked. The issue is not present in Safari and Firefox. Bug: 342067834 Change-Id: Id59ca73ae0e8b744b247f1eabba9f70565245433 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5973363 Reviewed-by: Christine Hollingsworth Commit-Queue: Rohan Raja Reviewed-by: Ayu Ishii Cr-Commit-Position: refs/heads/main@{#1382128} -- wpt-commits: 60949643a99c4cfa5a6c2b43db9a6c418b9604a9 wpt-pr: 49127 --- ...er-file-list-change-reference-updates.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html diff --git a/testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html b/testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html new file mode 100644 index 000000000000..58493ec9d5f9 --- /dev/null +++ b/testing/web-platform/tests/clipboard-apis/data-transfer-file-list-change-reference-updates.html @@ -0,0 +1,19 @@ + + +Any JS reference DataTransfer.files should contain latest changes done to DataTransfer.items + + + +