setSelectionRange() for INPUT and TEXTAREA should not set "none" direction on non-macOS platforms.
setSelectionRange(s, e) unexpectedly called the four-argument version of HTMLTextFormControlElement::setSelectionRange() with SelectionHasNoDirection. So it set "none" direction without EditingBehavior check. This CL renames the implementation function of web-exposed setSelectionRange() to setSelectionRangeForBinding(), and makes its third argument optional so that seSelectionRange(s, e) calls it. On non-macOS platforms, two tests in textfieldselection-setSelectionRange.html correctly fail. BUG=640861 Review-Url: https://codereview.chromium.org/2274103002 Cr-Commit-Position: refs/heads/master@{#414306}
Showing
Please register or sign in to comment