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

Issue 177903010: Expose the selection root bounds in WebView. (Closed)

Created:
6 years, 9 months ago by mlamouri (slow - plz ping)
Modified:
6 years, 9 months ago
CC:
blink-reviews, dglazkov+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Expose the selection root bounds in WebView. This will allow consumers to decide whether they want to UI related to selection such as selection handlers in touch devices. BUG=236033 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169078

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Patch Set 4 : #

Total comments: 11

Patch Set 5 : #

Total comments: 2

Patch Set 6 : apply Tim's comments #

Total comments: 2

Patch Set 7 : use WebView.h #

Total comments: 1

Patch Set 8 : with tests #

Patch Set 9 : add missing test files #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -4 lines) Patch
M Source/web/WebViewImpl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 1 comment Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 3 chunks +94 lines, -0 lines 0 comments Download
M Source/web/tests/data/select_range_basic.html View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/data/select_range_iframe.html View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_div_editable.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_input.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_input_overflow.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_scroll.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_span_editable.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_textarea.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_iframe_textarea_overflow.html View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_input.html View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_input_overflow.html View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
M Source/web/tests/data/select_range_scroll.html View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A Source/web/tests/data/select_range_textarea.html View 1 2 3 4 5 6 7 1 chunk +11 lines, -0 lines 0 comments Download
A Source/web/tests/data/select_range_textarea_overflow.html View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M public/web/WebView.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
mlamouri (slow - plz ping)
6 years, 9 months ago (2014-03-05 00:00:03 UTC) #1
mlamouri (slow - plz ping)
Unfortunately, I can't use WebWidgetTest to test this. If you have any hint in a ...
6 years, 9 months ago (2014-03-05 00:01:10 UTC) #2
tkent
https://codereview.chromium.org/177903010/diff/20001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/177903010/diff/20001/Source/web/WebViewImpl.cpp#newcode2158 Source/web/WebViewImpl.cpp:2158: if (root->shadowHost() nit: You don't need to wrap this ...
6 years, 9 months ago (2014-03-05 04:48:10 UTC) #3
mlamouri (slow - plz ping)
On 2014/03/05 04:48:10, tkent wrote: > * Why do you add this function to WebWidget ...
6 years, 9 months ago (2014-03-05 09:48:25 UTC) #4
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/177903010/diff/20001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/177903010/diff/20001/Source/web/WebViewImpl.cpp#newcode2158 Source/web/WebViewImpl.cpp:2158: if (root->shadowHost() On 2014/03/05 04:48:10, tkent wrote: > ...
6 years, 9 months ago (2014-03-05 09:52:45 UTC) #5
timvolodine
some nits https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp#newcode2162 Source/web/WebViewImpl.cpp:2162: && toHTMLInputElement(root->shadowHost())->isText()))) { no single-line brackets https://codereview.chromium.org/177903010/diff/60001/public/web/WebWidget.h ...
6 years, 9 months ago (2014-03-05 19:41:01 UTC) #6
mlamouri (slow - plz ping)
PTAL https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp#newcode2162 Source/web/WebViewImpl.cpp:2162: && toHTMLInputElement(root->shadowHost())->isText()))) { On 2014/03/05 19:41:02, timvolodine wrote: ...
6 years, 9 months ago (2014-03-06 13:45:31 UTC) #7
timvolodine
Thanks Mounir, some nits below. This patch looks good to me, but we need owners ...
6 years, 9 months ago (2014-03-06 17:02:01 UTC) #8
jamesr
https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h File public/web/WebWidget.h (right): https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h#newcode201 public/web/WebWidget.h:201: virtual bool selectionRootBounds(WebRect& bounds) const { return false; } ...
6 years, 9 months ago (2014-03-06 21:55:06 UTC) #9
mlamouri (slow - plz ping)
https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h File public/web/WebWidget.h (right): https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h#newcode201 public/web/WebWidget.h:201: virtual bool selectionRootBounds(WebRect& bounds) const { return false; } ...
6 years, 9 months ago (2014-03-07 13:50:28 UTC) #10
jamesr
On 2014/03/07 13:50:28, Mounir Lamouri wrote: > https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h > File public/web/WebWidget.h (right): > > https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h#newcode201 ...
6 years, 9 months ago (2014-03-08 02:02:51 UTC) #11
mlamouri (slow - plz ping)
On 2014/03/08 02:02:51, jamesr wrote: > On 2014/03/07 13:50:28, Mounir Lamouri wrote: > > https://codereview.chromium.org/177903010/diff/80001/public/web/WebWidget.h ...
6 years, 9 months ago (2014-03-10 14:26:32 UTC) #12
mlamouri (slow - plz ping)
https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp#newcode2157 Source/web/WebViewImpl.cpp:2157: // If the selection is inside a form control, ...
6 years, 9 months ago (2014-03-10 16:05:59 UTC) #13
timvolodine
https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp File Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/177903010/diff/60001/Source/web/WebViewImpl.cpp#newcode2162 Source/web/WebViewImpl.cpp:2162: && toHTMLInputElement(root->shadowHost())->isText()))) { On 2014/03/10 16:05:59, Mounir Lamouri wrote: ...
6 years, 9 months ago (2014-03-10 17:49:59 UTC) #14
jamesr
Widgets are a base type for something that has graphical output and can accept user ...
6 years, 9 months ago (2014-03-10 20:33:19 UTC) #15
jamesr
https://codereview.chromium.org/177903010/diff/100001/public/web/WebWidget.h File public/web/WebWidget.h (right): https://codereview.chromium.org/177903010/diff/100001/public/web/WebWidget.h#newcode201 public/web/WebWidget.h:201: virtual bool selectionRootBounds(WebRect& bounds) const { return false; } ...
6 years, 9 months ago (2014-03-10 20:35:34 UTC) #16
mlamouri (slow - plz ping)
https://codereview.chromium.org/177903010/diff/100001/public/web/WebWidget.h File public/web/WebWidget.h (right): https://codereview.chromium.org/177903010/diff/100001/public/web/WebWidget.h#newcode201 public/web/WebWidget.h:201: virtual bool selectionRootBounds(WebRect& bounds) const { return false; } ...
6 years, 9 months ago (2014-03-10 21:01:25 UTC) #17
jamesr
Thanks, the public/web/ changes now LGTM. Are integer coordinates going to be sufficiently precise? If ...
6 years, 9 months ago (2014-03-11 01:34:44 UTC) #18
mlamouri (slow - plz ping)
On 2014/03/11 01:34:44, jamesr wrote: > Thanks, the public/web/ changes now LGTM. Do you want ...
6 years, 9 months ago (2014-03-11 11:27:59 UTC) #19
timvolodine
On 2014/03/11 11:27:59, Mounir Lamouri wrote: > On 2014/03/11 01:34:44, jamesr wrote: > > Thanks, ...
6 years, 9 months ago (2014-03-11 11:54:28 UTC) #20
jamesr
The source/web/ changes need some tests but I'd be happy to review once you add ...
6 years, 9 months ago (2014-03-11 21:58:38 UTC) #21
mlamouri (slow - plz ping)
James, PTAL at the patch with tests.
6 years, 9 months ago (2014-03-12 18:43:49 UTC) #22
jamesr
lgtm
6 years, 9 months ago (2014-03-12 21:28:38 UTC) #23
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 9 months ago (2014-03-12 21:29:14 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/177903010/140001
6 years, 9 months ago (2014-03-12 21:29:17 UTC) #25
mlamouri (slow - plz ping)
The CQ bit was unchecked by mlamouri@chromium.org
6 years, 9 months ago (2014-03-12 21:38:55 UTC) #26
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 9 months ago (2014-03-12 21:39:16 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/177903010/140001
6 years, 9 months ago (2014-03-12 21:39:18 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-12 22:00:37 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_blink_rel
6 years, 9 months ago (2014-03-12 22:00:38 UTC) #30
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 9 months ago (2014-03-12 22:05:09 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/177903010/150001
6 years, 9 months ago (2014-03-12 22:05:15 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-12 23:07:01 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_blink_rel
6 years, 9 months ago (2014-03-12 23:07:02 UTC) #34
mlamouri (slow - plz ping)
The CQ bit was checked by mlamouri@chromium.org
6 years, 9 months ago (2014-03-12 23:33:50 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mlamouri@chromium.org/177903010/150001
6 years, 9 months ago (2014-03-12 23:33:54 UTC) #36
commit-bot: I haz the power
Change committed as 169078
6 years, 9 months ago (2014-03-13 02:20:21 UTC) #37
Miguel Garcia
6 years, 9 months ago (2014-03-20 08:23:37 UTC) #38
Message was sent while issue was closed.
Pass by review

https://codereview.chromium.org/177903010/diff/150001/Source/web/WebViewImpl.h
File Source/web/WebViewImpl.h (right):

https://codereview.chromium.org/177903010/diff/150001/Source/web/WebViewImpl....
Source/web/WebViewImpl.h:297: virtual void getSelectionRootBounds(WebRect&
bounds) const OVERRIDE;
so, there is a selectionBounds method up in line 158. Would it make sense to
move this up there? Or perhaps even merge them? It is not entirely clear what
the difference is just based on the method name is it?

Powered by Google App Engine
This is Rietveld 408576698