DescriptionImplement Range-based selection expansion.
This patch simplifies Selection.addRange()'s implementation by expanding
the selection based on DOM Ranges instead of VisiblePositions.
There is a slight behavior change caused by this shift of data structures
we use: ranges which are discrete in the DOM tree but visually adjacent will
be rejected after this patch is landed. However, I don't think this will be
a huge problem, since (1) API behavior relying on visual positions can be
tricky to users because they are Blink-internal only information; and
(2) users wishing to connect the regions can (and probably should) specify
a range which overlaps with the current selection.
BUG=346613
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170640
Patch Set 1 #Patch Set 2 : Rebase; fix test expectation for Mac. #
Messages
Total messages: 11 (0 generated)
|