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

Issue 929213004: Plumb selection bounds as a single unit (Closed)

Created:
5 years, 10 months ago by jdduke (slow)
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-rendering, dglazkov+blink, Dominik Röttsches, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Plumb selection bounds as a single unit Wire the composited selection bounds as a single structure, including information about editability. This lays the groundwork for plumbing metadata about the selection triggering cause, as well as any other required metadata that can be used to inform selection response in a non-racy way relative to the selection bound location. BUG=466672 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193494

Patch Set 1 #

Total comments: 3

Patch Set 2 : Working build and tests #

Patch Set 3 : Fix copyright #

Total comments: 19

Patch Set 4 : Partial code review (will rename to WebSelection in follow-up) #

Patch Set 5 : Refactor WebSelection to align with Frame/VisibleSelection #

Total comments: 2

Patch Set 6 : Fix test #

Total comments: 4

Patch Set 7 : Fix tests #

Patch Set 8 : Use start/end #

Patch Set 9 : Fix unused #

Patch Set 10 : Rebase #

Patch Set 11 : TODO #

Total comments: 6

Patch Set 12 : Cleanup #

Total comments: 2

Patch Set 13 : TODO for moving WebSelectionBound #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -109 lines) Patch
M Source/core/frame/FrameView.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +24 lines, -23 lines 0 comments Download
A + Source/core/layout/compositing/CompositedSelection.h View 1 2 3 4 5 6 7 2 chunks +19 lines, -21 lines 0 comments Download
M Source/core/layout/compositing/CompositedSelectionBound.h View 1 2 3 4 1 chunk +4 lines, -10 lines 0 comments Download
M Source/core/page/ChromeClient.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M Source/web/AssertMatchingEnums.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -3 lines 0 comments Download
M Source/web/ChromeClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M Source/web/ChromeClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +6 lines, -18 lines 0 comments Download
A Source/web/WebSelection.cpp View 1 2 3 4 5 6 7 1 chunk +55 lines, -0 lines 0 comments Download
M Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -4 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -4 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +34 lines, -14 lines 0 comments Download
A Source/web/tests/data/composited_selection_bounds_editable.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +24 lines, -0 lines 0 comments Download
A Source/web/tests/data/composited_selection_bounds_editable_div.html View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
A Source/web/tests/data/composited_selection_bounds_empty_editable_area.html View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
A Source/web/tests/data/composited_selection_bounds_empty_editable_div.html View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A Source/web/tests/data/composited_selection_bounds_empty_editable_input.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +22 lines, -0 lines 0 comments Download
M Source/web/tests/data/composited_selection_bounds_empty_layer.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/web/web.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M public/platform/WebLayerTreeView.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M public/platform/WebSelectionBound.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -0 lines 0 comments Download
A public/web/WebSelection.h View 1 2 3 4 5 6 7 8 1 chunk +54 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (6 generated)
mfomitchev
https://codereview.chromium.org/929213004/diff/1/Source/web/ChromeClientImpl.cpp File Source/web/ChromeClientImpl.cpp (right): https://codereview.chromium.org/929213004/diff/1/Source/web/ChromeClientImpl.cpp#newcode117 Source/web/ChromeClientImpl.cpp:117: static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds& bound) This doesn't need to ...
5 years, 10 months ago (2015-02-17 22:25:51 UTC) #2
jdduke (slow)
https://codereview.chromium.org/929213004/diff/1/Source/web/ChromeClientImpl.cpp File Source/web/ChromeClientImpl.cpp (right): https://codereview.chromium.org/929213004/diff/1/Source/web/ChromeClientImpl.cpp#newcode117 Source/web/ChromeClientImpl.cpp:117: static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds& bound) On 2015/02/17 22:25:51, mfomitchev ...
5 years, 10 months ago (2015-02-17 22:28:50 UTC) #3
jdduke (slow)
+aelias for Source/web +rbyers for Source/core and public/platform https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp#newcode1672 Source/core/frame/FrameView.cpp:1672: bounds.isEditableRegionEmpty ...
5 years, 9 months ago (2015-03-12 18:18:38 UTC) #5
Rick Byers
The mechanics of grouping this into CompositedSelectionBounds all look fine to me. But we should ...
5 years, 9 months ago (2015-03-12 19:27:24 UTC) #7
aelias_OOO_until_Jul13
https://codereview.chromium.org/929213004/diff/40001/public/platform/WebSelectionBounds.h File public/platform/WebSelectionBounds.h (right): https://codereview.chromium.org/929213004/diff/40001/public/platform/WebSelectionBounds.h#newcode13 public/platform/WebSelectionBounds.h:13: struct WebSelectionBounds { Just WebSelection might be a better ...
5 years, 9 months ago (2015-03-12 19:29:16 UTC) #8
Rick Byers
https://codereview.chromium.org/929213004/diff/40001/Source/web/tests/data/composited_selection_bounds_editable.html File Source/web/tests/data/composited_selection_bounds_editable.html (right): https://codereview.chromium.org/929213004/diff/40001/Source/web/tests/data/composited_selection_bounds_editable.html#newcode10 Source/web/tests/data/composited_selection_bounds_editable.html:10: <textarea id="text"> Are <textarea> and <input type=text> similar enough ...
5 years, 9 months ago (2015-03-12 19:29:22 UTC) #9
yosin_UTC9
https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp#newcode1672 Source/core/frame/FrameView.cpp:1672: bounds.isEditableRegionEmpty = enclosingTextFormControlElement->value().isEmpty(); On 2015/03/12 19:27:23, Rick Byers wrote: ...
5 years, 9 months ago (2015-03-13 02:06:37 UTC) #10
jdduke (slow)
https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp#newcode1669 Source/core/frame/FrameView.cpp:1669: bounds.isEditable = selection.isContentEditable(); On 2015/03/12 19:27:24, Rick Byers wrote: ...
5 years, 9 months ago (2015-03-16 18:15:41 UTC) #11
jdduke (slow)
https://codereview.chromium.org/929213004/diff/40001/public/platform/WebSelectionBounds.h File public/platform/WebSelectionBounds.h (right): https://codereview.chromium.org/929213004/diff/40001/public/platform/WebSelectionBounds.h#newcode13 public/platform/WebSelectionBounds.h:13: struct WebSelectionBounds { On 2015/03/16 18:15:41, jdduke wrote: > ...
5 years, 9 months ago (2015-03-16 18:19:21 UTC) #12
aelias_OOO_until_Jul13
On 2015/03/16 at 18:19:21, jdduke wrote: > https://codereview.chromium.org/929213004/diff/40001/public/platform/WebSelectionBounds.h > File public/platform/WebSelectionBounds.h (right): > > https://codereview.chromium.org/929213004/diff/40001/public/platform/WebSelectionBounds.h#newcode13 ...
5 years, 9 months ago (2015-03-16 18:42:03 UTC) #13
yosin_UTC9
Sorry for late response. m(_ _)m https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp#newcode1672 Source/core/frame/FrameView.cpp:1672: bounds.isEditableRegionEmpty = enclosingTextFormControlElement->value().isEmpty(); ...
5 years, 9 months ago (2015-03-18 05:15:41 UTC) #14
yosin_UTC9
+yoichio@ he is an expert about selection and API between Blink and content.
5 years, 9 months ago (2015-03-18 05:16:58 UTC) #16
jdduke (slow)
https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/929213004/diff/40001/Source/core/frame/FrameView.cpp#newcode1672 Source/core/frame/FrameView.cpp:1672: bounds.isEditableRegionEmpty = enclosingTextFormControlElement->value().isEmpty(); On 2015/03/18 05:15:41, Yosi_UTC9 wrote: > ...
5 years, 9 months ago (2015-03-18 20:20:45 UTC) #17
jdduke (slow)
I went ahead and made WebSelection a proper class that exposes data/types in a fashion ...
5 years, 9 months ago (2015-03-19 00:32:42 UTC) #18
yoichio
https://codereview.chromium.org/929213004/diff/80001/Source/core/frame/FrameView.cpp File Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/929213004/diff/80001/Source/core/frame/FrameView.cpp#newcode1680 Source/core/frame/FrameView.cpp:1680: selection.isEditableRegionEmpty = enclosingTextFormControlElement->value().isEmpty(); How about <div isContentEditable=true></div>? That is ...
5 years, 9 months ago (2015-03-20 05:17:51 UTC) #19
yoichio
Could you tell me what is "the insertion handle" in Android you want to follow? ...
5 years, 9 months ago (2015-03-20 05:27:56 UTC) #20
jdduke (slow)
On 2015/03/20 05:27:56, yoichio wrote: > Could you tell me what is "the insertion handle" ...
5 years, 9 months ago (2015-03-20 15:02:18 UTC) #21
jdduke (slow)
On 2015/03/20 15:02:18, jdduke wrote: > On 2015/03/20 05:27:56, yoichio wrote: > > Could you ...
5 years, 9 months ago (2015-03-20 15:27:45 UTC) #22
jdduke (slow)
https://codereview.chromium.org/929213004/diff/100001/Source/web/tests/data/composited_selection_bounds_editable.html File Source/web/tests/data/composited_selection_bounds_editable.html (right): https://codereview.chromium.org/929213004/diff/100001/Source/web/tests/data/composited_selection_bounds_editable.html#newcode21 Source/web/tests/data/composited_selection_bounds_editable.html:21: window.expectedResult = [document, 1, 1, 1, 15, document, 1, ...
5 years, 9 months ago (2015-03-20 20:00:15 UTC) #23
jdduke (slow)
On 2015/03/20 20:00:15, jdduke wrote: > https://codereview.chromium.org/929213004/diff/100001/Source/web/tests/data/composited_selection_bounds_editable.html > File Source/web/tests/data/composited_selection_bounds_editable.html (right): > > https://codereview.chromium.org/929213004/diff/100001/Source/web/tests/data/composited_selection_bounds_editable.html#newcode21 > ...
5 years, 9 months ago (2015-03-25 17:10:03 UTC) #24
yoichio
isEmptyTextFormControl sounds good. https://codereview.chromium.org/929213004/diff/100001/Source/web/tests/data/composited_selection_bounds_editable.html File Source/web/tests/data/composited_selection_bounds_editable.html (right): https://codereview.chromium.org/929213004/diff/100001/Source/web/tests/data/composited_selection_bounds_editable.html#newcode21 Source/web/tests/data/composited_selection_bounds_editable.html:21: window.expectedResult = [document, 1, 1, 1, ...
5 years, 9 months ago (2015-03-26 03:39:15 UTC) #25
jdduke (slow)
yoichio@: Could you take another look? I went back to using start/end for plumbing, as ...
5 years, 8 months ago (2015-03-27 20:18:21 UTC) #26
yoichio
webkit_unit_tests looks failed. https://codereview.chromium.org/929213004/diff/100001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/929213004/diff/100001/Source/web/WebViewImpl.cpp#newcode2034 Source/web/WebViewImpl.cpp:2034: // FIXME: Remove this overload when ...
5 years, 8 months ago (2015-03-30 05:07:39 UTC) #27
yoichio
Please ping us if your change gets settled.
5 years, 8 months ago (2015-03-30 05:08:52 UTC) #28
jdduke (slow)
On 2015/03/30 05:07:39, yoichio wrote: > webkit_unit_tests looks failed. Really? They all passed with patchset ...
5 years, 8 months ago (2015-03-30 15:24:44 UTC) #29
yoichio
https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp#newcode4285 Source/web/tests/WebFrameTest.cpp:4285: const int yEpsilon = 2; Existing tests don't need ...
5 years, 8 months ago (2015-03-31 05:05:06 UTC) #30
jdduke (slow)
https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp#newcode4285 Source/web/tests/WebFrameTest.cpp:4285: const int yEpsilon = 2; On 2015/03/31 05:05:06, yoichio ...
5 years, 8 months ago (2015-03-31 15:09:24 UTC) #31
yoichio
https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp#newcode4285 Source/web/tests/WebFrameTest.cpp:4285: const int yEpsilon = 2; On 2015/03/31 15:09:23, jdduke ...
5 years, 8 months ago (2015-04-02 05:20:44 UTC) #32
jdduke (slow)
https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/929213004/diff/200001/Source/web/tests/WebFrameTest.cpp#newcode4285 Source/web/tests/WebFrameTest.cpp:4285: const int yEpsilon = 2; On 2015/04/02 05:20:43, yoichio ...
5 years, 8 months ago (2015-04-06 22:41:07 UTC) #33
yoichio
lgtm
5 years, 8 months ago (2015-04-07 01:59:39 UTC) #34
Rick Byers
https://codereview.chromium.org/929213004/diff/220001/public/web/WebSelection.h File public/web/WebSelection.h (right): https://codereview.chromium.org/929213004/diff/220001/public/web/WebSelection.h#newcode9 public/web/WebSelection.h:9: #include "../platform/WebSelectionBound.h" Any reason why this file is in ...
5 years, 8 months ago (2015-04-07 21:15:45 UTC) #35
jdduke (slow)
https://codereview.chromium.org/929213004/diff/220001/public/web/WebSelection.h File public/web/WebSelection.h (right): https://codereview.chromium.org/929213004/diff/220001/public/web/WebSelection.h#newcode9 public/web/WebSelection.h:9: #include "../platform/WebSelectionBound.h" On 2015/04/07 21:15:45, Rick Byers wrote: > ...
5 years, 8 months ago (2015-04-07 21:31:15 UTC) #36
Rick Byers
On 2015/04/07 21:31:15, jdduke wrote: > https://codereview.chromium.org/929213004/diff/220001/public/web/WebSelection.h > File public/web/WebSelection.h (right): > > https://codereview.chromium.org/929213004/diff/220001/public/web/WebSelection.h#newcode9 > ...
5 years, 8 months ago (2015-04-08 16:11:59 UTC) #37
jdduke (slow)
On 2015/04/08 16:11:59, Rick Byers wrote: > I think it would be least surprising if ...
5 years, 8 months ago (2015-04-09 20:02:34 UTC) #38
Rick Byers
On 2015/04/09 20:02:34, jdduke wrote: > On 2015/04/08 16:11:59, Rick Byers wrote: > > I ...
5 years, 8 months ago (2015-04-09 21:29:58 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/929213004/240001
5 years, 8 months ago (2015-04-09 22:25:58 UTC) #42
commit-bot: I haz the power
5 years, 8 months ago (2015-04-10 00:21:43 UTC) #43
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193494

Powered by Google App Engine
This is Rietveld 408576698