Avoid dispatching duplicated selectionchange events for the same target
Implement the spec[1] change to avoid dispatchinging a task to fire a selectionchange
event when there is already a task scheduled to do that for the same target.
Firefox[2] and WebKit[3] have implemented this.
Update one web platform test to guarantee selectionchange event to be triggered
as expected.
third_party/blink/web_tests/external/wpt/selection/onselectionchange-on-document.html
[1] https://w3c.github.io/selection-api/#scheduling-selectionhange-event
[2] https://hg.mozilla.org/integration/autoland/rev/569a2ac0acd4
[3] https://commits.webkit.org/276388@main
Change-Id: If303a482acabffc14dcc1f69641260e58ebd3622
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5494116
Reviewed-by: Kent Tamura tkent@chromium.org
Commit-Queue: Shuangshuang Zhou shuangshuang.zhou@intel.com
Reviewed-by: Bo Liu boliu@chromium.org
Cr-Commit-Position: refs/heads/main@{#1325285}