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

Issue 2393403002: Introduce Selection class (Closed)

Created:
4 years, 2 months ago by yosin_UTC9
Modified:
4 years, 2 months ago
Reviewers:
tkent, yoichio, Xiaocheng
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce Selection class This patch introduces |Selection| class which is exclude visible position canonicalization from |VisibleSelection|. The relation between |Selection| and |VisibleSelection| is similar to |Position| and |VisiblePosition|. This patch is a preparation of implementing lazy visible position canonicalization on |FrameSelection|, http://crrev.com/1958093002 BUG=139552, 603684, 606499, 625533, 644648 TEST=run_webkit_unittests --gtest_filler=SelectionTest.* Committed: https://crrev.com/e7a92d5235ce35ad2f7127ebbefbcd357e569379 Cr-Commit-Position: refs/heads/master@{#424950}

Patch Set 1 : 2016-10-06T15:27:59 #

Total comments: 17

Patch Set 2 : 2016-10-07T17:20:15 #

Total comments: 2

Patch Set 3 : 2016-10-07T18:12:22 #

Patch Set 4 : 2016-10-07T18:46:48 #

Total comments: 13

Patch Set 5 : 2016-10-12T12:30:28 #

Patch Set 6 : 2016-10-12T13:41:52 #

Patch Set 7 : 2016-10-12T13:54:28 #

Total comments: 6

Patch Set 8 : 2016-10-12T15:17:37 #

Patch Set 9 : 2016-10-12T15:57:57 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+460 lines, -0 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/SelectionTemplate.h View 1 2 3 4 5 6 7 8 1 chunk +130 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/SelectionTemplate.cpp View 1 2 3 4 5 6 7 1 chunk +263 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/SelectionTemplateTest.cpp View 1 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (25 generated)
yosin_UTC9
PTAL
4 years, 2 months ago (2016-10-06 07:06:20 UTC) #5
tkent
We have web-exposed Selection interface, core/editing/Selectin.idl. Please use a different name.
4 years, 2 months ago (2016-10-06 07:09:28 UTC) #6
Xiaocheng
I'm super excited about this class. It should eliminate tons of creations of VisibleSelections, and ...
4 years, 2 months ago (2016-10-06 08:02:33 UTC) #7
yoichio
https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h File third_party/WebKit/Source/core/editing/Selection.h (right): https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h#newcode30 third_party/WebKit/Source/core/editing/Selection.h:30: // |Builder| is a helper class for constructing |SelectionTemplate| ...
4 years, 2 months ago (2016-10-06 08:52:17 UTC) #10
yosin_UTC9
On 2016/10/06 at 07:09:28, tkent wrote: > We have web-exposed Selection interface, core/editing/Selectin.idl. > Please ...
4 years, 2 months ago (2016-10-06 09:31:12 UTC) #11
tkent
On 2016/10/06 at 09:31:12, yosin wrote: > On 2016/10/06 at 07:09:28, tkent wrote: > > ...
4 years, 2 months ago (2016-10-07 00:11:51 UTC) #12
tkent
https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.cpp File third_party/WebKit/Source/core/editing/Selection.cpp (right): https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.cpp#newcode20 third_party/WebKit/Source/core/editing/Selection.cpp:20: #if ENABLE(ASSERT) ENABLE(ASSERT) -> DCHECK_IS_ON() https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.cpp#newcode86 third_party/WebKit/Source/core/editing/Selection.cpp:86: #if ENABLE(ASSERT) ...
4 years, 2 months ago (2016-10-07 00:13:27 UTC) #13
yoichio
https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h File third_party/WebKit/Source/core/editing/Selection.h (right): https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h#newcode40 third_party/WebKit/Source/core/editing/Selection.h:40: // Move selection to |base|. |base| can't be null. ...
4 years, 2 months ago (2016-10-07 04:30:40 UTC) #14
yosin_UTC9
PTAL - Renamed "Selection.{cpp,h}" to "SelectionTemplate.{cpp,h}" - Renamed |Selection| to |SelectionInDOMTree| - Update comments in ...
4 years, 2 months ago (2016-10-07 08:46:57 UTC) #17
Xiaocheng
https://codereview.chromium.org/2393403002/diff/20001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp File third_party/WebKit/Source/core/editing/SelectionTemplate.cpp (right): https://codereview.chromium.org/2393403002/diff/20001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp#newcode169 third_party/WebKit/Source/core/editing/SelectionTemplate.cpp:169: SelectionTemplate<Strategy>::Builder::extend( We should call |m_selection.assertValid()| in this function to ...
4 years, 2 months ago (2016-10-07 09:00:52 UTC) #18
yosin_UTC9
PTAL Updated for xiachengh@ comments. https://codereview.chromium.org/2393403002/diff/20001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp File third_party/WebKit/Source/core/editing/SelectionTemplate.cpp (right): https://codereview.chromium.org/2393403002/diff/20001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp#newcode169 third_party/WebKit/Source/core/editing/SelectionTemplate.cpp:169: SelectionTemplate<Strategy>::Builder::extend( On 2016/10/07 at ...
4 years, 2 months ago (2016-10-07 09:22:55 UTC) #19
yoichio
https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h File third_party/WebKit/Source/core/editing/Selection.h (right): https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h#newcode40 third_party/WebKit/Source/core/editing/Selection.h:40: // Move selection to |base|. |base| can't be null. ...
4 years, 2 months ago (2016-10-07 09:32:13 UTC) #20
yosin_UTC9
On 2016/10/07 at 09:32:13, yoichio wrote: > https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h > File third_party/WebKit/Source/core/editing/Selection.h (right): > > https://codereview.chromium.org/2393403002/diff/1/third_party/WebKit/Source/core/editing/Selection.h#newcode40 ...
4 years, 2 months ago (2016-10-07 09:45:31 UTC) #21
yoichio
On 2016/10/07 09:45:31, Yosi_UTC9 wrote: > On 2016/10/07 at 09:32:13, yoichio wrote: > > > ...
4 years, 2 months ago (2016-10-11 01:48:30 UTC) #26
yoichio
https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp File third_party/WebKit/Source/core/editing/SelectionTemplate.cpp (right): https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp#newcode142 third_party/WebKit/Source/core/editing/SelectionTemplate.cpp:142: return m_selection; DCHECK(m_selection.assertValid()) ? https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp#newcode189 third_party/WebKit/Source/core/editing/SelectionTemplate.cpp:189: if (range.isNull()) { ...
4 years, 2 months ago (2016-10-12 01:37:00 UTC) #27
tkent
https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h File third_party/WebKit/Source/core/editing/SelectionTemplate.h (right): https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h#newcode89 third_party/WebKit/Source/core/editing/SelectionTemplate.h:89: visitor->trace(m_base); nit: I think we has no reason to ...
4 years, 2 months ago (2016-10-12 02:00:33 UTC) #28
yosin_UTC9
PTAL https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp File third_party/WebKit/Source/core/editing/SelectionTemplate.cpp (right): https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp#newcode142 third_party/WebKit/Source/core/editing/SelectionTemplate.cpp:142: return m_selection; On 2016/10/12 at 01:37:00, yoichio wrote: ...
4 years, 2 months ago (2016-10-12 03:39:02 UTC) #31
tkent
https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h File third_party/WebKit/Source/core/editing/SelectionTemplate.h (right): https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h#newcode89 third_party/WebKit/Source/core/editing/SelectionTemplate.h:89: visitor->trace(m_base); On 2016/10/12 at 03:39:02, Yosi_UTC9 wrote: > On ...
4 years, 2 months ago (2016-10-12 03:44:55 UTC) #32
yosin_UTC9
On 2016/10/12 at 03:44:55, tkent wrote: > https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h > File third_party/WebKit/Source/core/editing/SelectionTemplate.h (right): > > https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h#newcode89 ...
4 years, 2 months ago (2016-10-12 04:12:11 UTC) #33
yosin_UTC9
PTAL Make assertValid() to return bool for writing DCHECK(assertValid())
4 years, 2 months ago (2016-10-12 04:59:14 UTC) #40
Xiaocheng
Almost good to me, with a few comments. https://codereview.chromium.org/2393403002/diff/110001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp File third_party/WebKit/Source/core/editing/SelectionTemplate.cpp (right): https://codereview.chromium.org/2393403002/diff/110001/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp#newcode90 third_party/WebKit/Source/core/editing/SelectionTemplate.cpp:90: bool ...
4 years, 2 months ago (2016-10-12 05:09:43 UTC) #41
yosin_UTC9
PTAL - Update comments - Check extend() taken a position in same document of base. ...
4 years, 2 months ago (2016-10-12 06:22:54 UTC) #44
Xiaocheng
lgtm
4 years, 2 months ago (2016-10-12 06:25:31 UTC) #45
yoichio
https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h File third_party/WebKit/Source/core/editing/SelectionTemplate.h (right): https://codereview.chromium.org/2393403002/diff/50001/third_party/WebKit/Source/core/editing/SelectionTemplate.h#newcode54 third_party/WebKit/Source/core/editing/SelectionTemplate.h:54: Builder& setBaseAndExtentDeprecated( On 2016/10/12 03:39:02, Yosi_UTC9 wrote: > On ...
4 years, 2 months ago (2016-10-12 06:51:16 UTC) #46
yosin_UTC9
PTAL Add TODO
4 years, 2 months ago (2016-10-12 07:07:33 UTC) #47
yoichio
lgtm
4 years, 2 months ago (2016-10-13 02:13:05 UTC) #48
tkent
lgtm
4 years, 2 months ago (2016-10-13 02:13:52 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2393403002/150001
4 years, 2 months ago (2016-10-13 02:17:02 UTC) #52
commit-bot: I haz the power
Committed patchset #9 (id:150001)
4 years, 2 months ago (2016-10-13 03:50:20 UTC) #53
commit-bot: I haz the power
4 years, 2 months ago (2016-10-13 03:53:03 UTC) #55
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/e7a92d5235ce35ad2f7127ebbefbcd357e569379
Cr-Commit-Position: refs/heads/master@{#424950}

Powered by Google App Engine
This is Rietveld 408576698