DescriptionDrop remaining [LegacyInterfaceTypeChecking] for Selection
With [LegacyInterfaceTypeChecking], any invalid type is treated as null,
and the risk of this change is therefore bounded by the
SelectionCollapseNull (also hit by setPosition) and
SelectionSetBaseAndExtentNull use counters:
https://www.chromestatus.com/metrics/feature/timeline/popularity/1083
https://www.chromestatus.com/metrics/feature/timeline/popularity/1084
Unfortunately chromestatus.com is not updating, but rbyers@ has checked
the stable channel data and reports usage as ~0 for both. The majority
of this tiny usage still ought to be actual null input, in cases like
collapse(something.firstChild).
The behavior of other engines was tested with this test:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3970
Edge already throws for non-Node-or-null argumens to collapse and
setBaseAndExtent, but doesn't support setPosition.
Gecko already throws for collapse, but doesn't support setPosition or
setBaseAndExtent.
Overall, this ought to be very low risk.
BUG=561338
R=yoichio@chromium.org,rbyers@chromium.org
Committed: https://crrev.com/4dfafe2f97caabcb7c11ae3c8d6907b0db3bb215
Cr-Commit-Position: refs/heads/master@{#380339}
Patch Set 1 #Patch Set 2 : update tests #Patch Set 3 : fix more tests #Messages
Total messages: 16 (8 generated)
|