Descriptionselection: Do not run invalid sub-tests with unselectable endpoints.
* addRange.js:
It assumes any Range can be added to Selection. However the
latest draft defines that addRange() rejects Ranges in a root
different from Selection's document.
Some tests after addRange() with such Ranges were invalid.
https://w3c.github.io/selection-api/#dom-selection-addrange
> The method must set the context object's range to range by a
> strong reference (not by making a copy) if the root ([DOM4]) of
> the range's boundary points are the document associated with
> context object. Otherwise, this method must do nothing.
* exntend.js
extend() requires rangeCount>=1. setSelectionForwards() and
setSelectionBackwards() are assumed to ensure it. However, these
function can't set specified endpoints if they are in roots different
from Selection's document. We should skip such endpoints.
This CL removes 25,200 invalid tests.
BUG=683066
Review-Url: https://codereview.chromium.org/2700673005
Cr-Commit-Position: refs/heads/master@{#451545}
Committed: https://chromium.googlesource.com/chromium/src/+/329ba0e15e8853ef13e600776f1b3da4f30b0235
Patch Set 1 #Patch Set 2 : . #
Created: 3 years, 10 months ago
(Patch set is too large to download)
Messages
Total messages: 21 (17 generated)
|