Android: Should not dispatch unnecessary 'change' event
<select multiple> dispatched unnecessary 'change' event if a user changed nothing on a chooser dialog. This CL fixes it. HTMLSelectElement::SelectMultipleOptionsByPopup() used UpdateSelectedState() to update selection state and prepare for 'change' event. However, it didn't work well mainly because SaveLastSelection() doesn't support menulist <select multiple>. This CL fixes this bug by not using UpdateSelectedState(). SelectMultipleOptionsByPopup() updates selection state and dispatches 'change' event by its own logic. * Add SetDelegatesMenuListRenderingForTesting() to LayoutTheme for ease of testing. This CL affect only Android, but the test is workable on all platforms. Bug: 1060039 Change-Id: I7c9c5ee9bb51ec4aa7b2da21329c9a8d4c0778da Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096064 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#748932}
Showing
Please register or sign in to comment