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

Issue 2642913003: Select All should show handles if they were already present (Closed)

Created:
3 years, 11 months ago by amaralp
Modified:
3 years, 10 months ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Select All should show handles if they were already present If the touch handles were present when the select all was executed then the newly selected text should also have touch handles. BUG=682128

Patch Set 1 #

Patch Set 2 : added tests #

Total comments: 5

Patch Set 3 : added PreserveHandle option #

Patch Set 4 : inlined option #

Patch Set 5 : forgot to change enum name in test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -11 lines) Patch
M third_party/WebKit/Source/core/editing/FrameSelection.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 1 2 3 5 chunks +12 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionController.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (20 generated)
amaralp
PTAL
3 years, 11 months ago (2017-01-19 07:33:10 UTC) #13
yosin_UTC9
https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode916 third_party/WebKit/Source/core/editing/FrameSelection.cpp:916: SetSelectionOptions options = CloseTyping | ClearTypingStyle; I prefer const ...
3 years, 11 months ago (2017-01-19 08:31:03 UTC) #14
yosin_UTC9
https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode917 third_party/WebKit/Source/core/editing/FrameSelection.cpp:917: if (isHandleVisible()) On 2017/01/19 at 08:31:02, Yosi_UTC9 wrote: > ...
3 years, 11 months ago (2017-01-19 09:36:52 UTC) #15
amaralp
https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode916 third_party/WebKit/Source/core/editing/FrameSelection.cpp:916: SetSelectionOptions options = CloseTyping | ClearTypingStyle; On 2017/01/19 at ...
3 years, 11 months ago (2017-01-20 01:22:09 UTC) #24
Changwan Ryu
On 2017/01/20 01:22:09, amaralp wrote: > https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp > File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): > > https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode916 > ...
3 years, 11 months ago (2017-01-20 01:28:35 UTC) #25
yosin_UTC9
3 years, 11 months ago (2017-01-20 04:50:37 UTC) #26
On 2017/01/20 at 01:22:09, amaralp wrote:
>
https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right):
> 
>
https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/editing/FrameSelection.cpp:916:
SetSelectionOptions options = CloseTyping | ClearTypingStyle;
> On 2017/01/19 at 08:31:03, Yosi_UTC9 wrote:
> > I prefer
> > 
> > const SetSelectionOptions options = isHandleVisible()
> >   ? CloseTypeing | ClearTyping | HandleVisible
> >   : CloseTypeing | ClearTyping;
> 
> This has been removed.
> 
>
https://codereview.chromium.org/2642913003/diff/20001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/editing/FrameSelection.cpp:917: if
(isHandleVisible())
> On 2017/01/19 at 08:31:02, Yosi_UTC9 wrote:
> > When do we not show handle if |isHandleVisbile()|?
> A few cases I can think of:
>   1) Javascript selection
>   2) Tapping to clear a handle
>   3) Typing should clear the handle.
> 
> > Can we have a option |HandleVisibleIfHahdleVisible| or another better name?
> Yep, |PreserveHandle| has been added.
> 
> > Checking |isHandleVisible()| and turn on option is very error prone.
> Not sure what you mean by this. Have my new changes addressed this?
> 
> I think this change would also make changwan@'s CL simpler.

Let's use SelectionTemplate to pass handle visibility parameter instead of using
FrameSelection::setSelectionOption
as discussed in [1].

It seems using setSelectionOptions make our code to be complex and adding more
flags makes more complex.
Also, as changwang@ said addition option doesn't work other cases.

So, let's move handle visibility to SelectionTemplate, then work this patch and
changwang@'s patch in parallel.

Once we've done to move handle visibility to SelectionTemplate, we can get rid
of  HandleVisibility enum class
to utilize SelectionTemplate. This is another story but we can make our code
simpler.





[1] http://crbug.com/633281 Refactor Selection Handle Visibility

Powered by Google App Engine
This is Rietveld 408576698