input[type=file] should not alter the user-agent shadow tree for another type
We do something like: shadow_root.lastChild.textContent = 'foo.txt'; when input[type=file] receives the result from a file chooser dialog. If a file input requests to open a file chooser and the input type is changed before receiving the result, we remove shadow elements by the textContent setter in some cases. This CL fixes it by - Introduce InputTypeView::will_be_destroyed_, which becomes true when a InputTypeView is disconnected from the owner HTMLInputElement. - Check will_be_destroyed_ in functions which receive asynchronous results from pickers. Bug: 1116378 Change-Id: I76fb166a0e5221441fcabeea34ab8a5bbd7d4af1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2358718 Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Auto-Submit: Kent Tamura <tkent@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#798962}
Showing
Please register or sign in to comment