Fix a bug that 'change' event is not dispatched after unselecting an OPTION via accesskey.
We should use selectOption(-1) in a case of unselecting menulist.
Add "accessKey" modifier to eventSender.keyDown() for testing.
Also, code cleanups:
- Early return for |listIndex < 0| and |!isHTMLOptionElement|.
- Remove unnecessary dispatchInputAndChangeEventForMenuList() call after selectOption().
- scrollToSelection() is necessary only for listbox.
BUG=543394
Review URL: https://codereview.chromium.org/1410463002
Cr-Commit-Position: refs/heads/master@{#354385}
3 files changed