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 christinesm@chromium.org
Commit-Queue: Rohan Raja roraja@microsoft.com
Reviewed-by: Ayu Ishii ayui@chromium.org
Cr-Commit-Position: refs/heads/main@{#1382128}