Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Issue 205903003: Implement Range-based selection expansion. (Closed)

Created:
6 years, 9 months ago by Yuta Kitamura
Modified:
6 years, 8 months ago
CC:
blink-reviews
Visibility:
Public.

Description

Implement 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -24 lines) Patch
M LayoutTests/editing/selection/addRange-expected.txt View 1 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/editing/selection/addRange-merging.html View 1 chunk +224 lines, -0 lines 0 comments Download
A LayoutTests/editing/selection/addRange-merging-expected.txt View 1 chunk +269 lines, -0 lines 0 comments Download
M LayoutTests/editing/text-iterator/findString-start-search-after-selection-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/platform/win/editing/selection/addRange-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/page/DOMSelection.cpp View 1 2 chunks +16 lines, -24 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Yuta Kitamura
6 years, 9 months ago (2014-03-20 05:58:16 UTC) #1
yosin_UTC9
I don't think this patch is beneficial for application developers because this behavior is still ...
6 years, 9 months ago (2014-03-20 06:58:26 UTC) #2
Yuta Kitamura
On 2014/03/20 06:58:26, Yoshi wrote: > I don't think this patch is beneficial for application ...
6 years, 9 months ago (2014-03-20 07:48:01 UTC) #3
yosin_UTC9
On 2014/03/20 07:48:01, Yuta Kitamura wrote: > On 2014/03/20 06:58:26, Yoshi wrote: > > I ...
6 years, 9 months ago (2014-03-20 08:20:04 UTC) #4
Yuta Kitamura
+Levi, Julie I would like to hear from you about this change, as a second ...
6 years, 9 months ago (2014-03-24 10:28:59 UTC) #5
leviw_travelin_and_unemployed
The change makes sense, but it'd be good to have it documented somewhere like MDN ...
6 years, 9 months ago (2014-03-26 16:31:14 UTC) #6
Yuta Kitamura
After thinking about this, I've come to the conclusion that I should land this after ...
6 years, 9 months ago (2014-03-27 07:49:24 UTC) #7
leviw_travelin_and_unemployed
On 2014/03/27 07:49:24, Yuta Kitamura wrote: > After thinking about this, I've come to the ...
6 years, 8 months ago (2014-04-01 21:15:38 UTC) #8
Yuta Kitamura
The CQ bit was checked by yutak@chromium.org
6 years, 8 months ago (2014-04-02 05:11:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yutak@chromium.org/205903003/20001
6 years, 8 months ago (2014-04-02 05:11:22 UTC) #10
commit-bot: I haz the power
6 years, 8 months ago (2014-04-02 07:22:36 UTC) #11
Message was sent while issue was closed.
Change committed as 170640

Powered by Google App Engine
This is Rietveld 408576698