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

Issue 675413003: WebLocalFrameImpl::selectWordAroundPosition should select a word before space. (Closed)

Created:
6 years, 1 month ago by yoichio
Modified:
6 years, 1 month ago
CC:
blink-reviews, pedro (no code reviews)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

WebLocalFrameImpl::selectWordAroundPosition should select a word before space. If you have a "foo| ", WebLocalFrameImpl::selectWordAroundPosition selects space after the caret. This is from the Selection::expandUsingGranularity behavior. It is used widely including double-click word selection on desktop. Thus we can not change the behavior. I changed the implementation to use VisibleUnit functions directly. New implementation is that we try to find a word on right side and left side. In addition, move implement from WebLocalFrameImpl to FrameSelection. BUG=397696 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185359

Patch Set 1 : update #

Total comments: 8

Patch Set 2 : Update #

Total comments: 1

Patch Set 3 : Use VisibleUnit functions and add test cases #

Total comments: 6

Patch Set 4 : nit picks #

Total comments: 10

Patch Set 5 : Adapt to selectWordAroundPosition too #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -7 lines) Patch
M Source/core/editing/FrameSelection.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/editing/FrameSelection.cpp View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download
M Source/core/editing/FrameSelectionTest.cpp View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 2 chunks +2 lines, -7 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
yoichio
6 years, 1 month ago (2014-10-28 05:17:15 UTC) #3
yosin_UTC9
Since this patch uses |isSeparator()|, this patch select a word before separator. https://codereview.chromium.org/675413003/diff/20001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp ...
6 years, 1 month ago (2014-10-28 06:11:46 UTC) #4
yoichio
https://codereview.chromium.org/675413003/diff/20001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/675413003/diff/20001/Source/core/editing/FrameSelection.cpp#newcode1934 Source/core/editing/FrameSelection.cpp:1934: void FrameSelection::selectWordAroundPosition(const VisiblePosition& position) On 2014/10/28 06:11:46, Yosi_UTC9 wrote: ...
6 years, 1 month ago (2014-10-28 08:28:04 UTC) #5
donnd
LGTM, with just a suggestion about more tests. Thanks for doing this Yoichi! https://codereview.chromium.org/675413003/diff/40001/Source/core/editing/FrameSelectionTest.cpp File ...
6 years, 1 month ago (2014-10-29 22:41:37 UTC) #7
yosin_UTC9
Since we make selectWordAroundPosition to be smart, I would like to see design doc for ...
6 years, 1 month ago (2014-10-30 02:15:32 UTC) #8
yoichio
On 2014/10/30 02:15:32, Yosi_UTC9 wrote: > Since we make selectWordAroundPosition to be smart, I would ...
6 years, 1 month ago (2014-11-13 08:42:58 UTC) #10
yoichio
Ping.
6 years, 1 month ago (2014-11-14 04:10:18 UTC) #11
yosin_UTC9
LGTM Please ask OWNERS review. Thanks! https://codereview.chromium.org/675413003/diff/80001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/675413003/diff/80001/Source/core/editing/FrameSelection.cpp#newcode1937 Source/core/editing/FrameSelection.cpp:1937: for (auto& wordSide ...
6 years, 1 month ago (2014-11-14 04:19:51 UTC) #13
yoichio
Add yutak@, an owner. https://codereview.chromium.org/675413003/diff/80001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/675413003/diff/80001/Source/core/editing/FrameSelection.cpp#newcode1937 Source/core/editing/FrameSelection.cpp:1937: for (auto& wordSide : wordSideList) ...
6 years, 1 month ago (2014-11-14 04:50:22 UTC) #15
Yuta Kitamura
Just have one question, aside from style issues. BTW, I'm not an OWNER of web/, ...
6 years, 1 month ago (2014-11-14 05:14:57 UTC) #16
yoichio
Add tkent@, a web/ owner. https://codereview.chromium.org/675413003/diff/100001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/675413003/diff/100001/Source/core/editing/FrameSelection.cpp#newcode1936 Source/core/editing/FrameSelection.cpp:1936: EWordSide wordSideList[2] = { ...
6 years, 1 month ago (2014-11-14 06:19:58 UTC) #19
yoichio
Add tkent@, a web/ owner. https://codereview.chromium.org/675413003/diff/100001/Source/core/editing/FrameSelection.cpp File Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/675413003/diff/100001/Source/core/editing/FrameSelection.cpp#newcode1936 Source/core/editing/FrameSelection.cpp:1936: EWordSide wordSideList[2] = { ...
6 years, 1 month ago (2014-11-14 06:19:59 UTC) #20
Yuta Kitamura
lgtm
6 years, 1 month ago (2014-11-14 06:39:15 UTC) #21
tkent
lgtm
6 years, 1 month ago (2014-11-14 06:52:32 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/675413003/120001
6 years, 1 month ago (2014-11-14 07:13:27 UTC) #24
commit-bot: I haz the power
6 years, 1 month ago (2014-11-14 09:27:46 UTC) #25
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as 185359

Powered by Google App Engine
This is Rietveld 408576698