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

Issue 1377963004: Use FrameSelection::selectedText where possible. (Closed)

Created:
5 years, 2 months ago by kotenkov
Modified:
5 years, 2 months ago
Reviewers:
tkent, yosin_UTC9
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dcheng, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use FrameSelection::selectedText where possible. Substitute occurrences of selection -> range -> (text or html) conversions with direct selection -> (text or html) conversions using existing functions. BUG= Committed: https://crrev.com/9c2436064ebdcb9192dfacac96944f2753a2ce78 Cr-Commit-Position: refs/heads/master@{#355247}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Check whether selection is range. #

Total comments: 3

Patch Set 3 : Restore DOMSelection::toString() behavior #

Patch Set 4 : Make |createMarkup()| handle null ranges. #

Patch Set 5 : Update layout in HTMLTextFormControlElement::setSelectionRange. #

Total comments: 1

Patch Set 6 : Add comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -24 lines) Patch
M third_party/WebKit/Source/core/clipboard/DataTransfer.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/Serialization.cpp View 1 2 3 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 2 chunks +2 lines, -10 lines 0 comments Download

Messages

Total messages: 41 (6 generated)
kotenkov
I noticed that there are some copy-pasted conversions and used existing functions in FrameSelection to ...
5 years, 2 months ago (2015-09-30 12:48:22 UTC) #2
tkent
Delegate to yosin@.
5 years, 2 months ago (2015-10-01 01:59:26 UTC) #4
yosin_UTC9
I love this approach. It makes our code base simpler. Please address |normalizeRange()| nits and ...
5 years, 2 months ago (2015-10-01 06:29:09 UTC) #5
kotenkov
On 2015/10/01 06:29:09, Yosi_UTC9 wrote: > I love this approach. It makes our code base ...
5 years, 2 months ago (2015-10-02 08:27:46 UTC) #6
kotenkov
https://codereview.chromium.org/1377963004/diff/1/third_party/WebKit/Source/core/editing/VisibleSelection.cpp File third_party/WebKit/Source/core/editing/VisibleSelection.cpp (right): https://codereview.chromium.org/1377963004/diff/1/third_party/WebKit/Source/core/editing/VisibleSelection.cpp#newcode273 third_party/WebKit/Source/core/editing/VisibleSelection.cpp:273: return range.isNotNull() ? normalizeRange(range) : range; On 2015/10/01 06:29:09, ...
5 years, 2 months ago (2015-10-02 08:28:07 UTC) #7
yosin_UTC9
Sorry for late response. tl;dr: We need to keep current behavior of Selection.toString(). So, we ...
5 years, 2 months ago (2015-10-06 05:41:51 UTC) #8
kotenkov
Thanks for the clarification! I removed changes in DOMSelection::toString(), but now I'm getting failures in ...
5 years, 2 months ago (2015-10-06 12:29:23 UTC) #9
kotenkov
On 2015/10/06 12:29:23, kotenkov wrote: > Thanks for the clarification! > I removed changes in ...
5 years, 2 months ago (2015-10-15 06:37:00 UTC) #10
yosin_UTC9
Sorry for late response. Please run trybots if you make changes. If you can run ...
5 years, 2 months ago (2015-10-15 07:45:46 UTC) #11
kotenkov
Now |createMarkup()| can handle null positions and I also deleted 2 redundant check. Still the ...
5 years, 2 months ago (2015-10-15 17:36:25 UTC) #12
yosin_UTC9
Much simpler! Running trybots and see result. Stay tune! (^_^)b
5 years, 2 months ago (2015-10-16 01:17:06 UTC) #13
yosin_UTC9
On 2015/10/16 at 01:17:06, Yosi_UTC9 wrote: > Much simpler! > Running trybots and see result. ...
5 years, 2 months ago (2015-10-16 08:23:04 UTC) #14
kotenkov
On 2015/10/16 08:23:04, Yosi_UTC9 wrote: > On 2015/10/16 at 01:17:06, Yosi_UTC9 wrote: > > Much ...
5 years, 2 months ago (2015-10-16 11:37:58 UTC) #15
yosin_UTC9
On 2015/10/16 at 11:37:58, kotenkov wrote: > On 2015/10/16 08:23:04, Yosi_UTC9 wrote: > > On ...
5 years, 2 months ago (2015-10-16 14:36:13 UTC) #16
yosin_UTC9
On 2015/10/16 at 14:36:13, Yosi_UTC9 wrote: > On 2015/10/16 at 11:37:58, kotenkov wrote: > > ...
5 years, 2 months ago (2015-10-16 14:48:56 UTC) #17
yosin_UTC9
On 2015/10/16 at 14:48:56, Yosi_UTC9 wrote: > On 2015/10/16 at 14:36:13, Yosi_UTC9 wrote: > > ...
5 years, 2 months ago (2015-10-16 15:27:28 UTC) #18
kotenkov
Sorry for the delay. > Note: In move_range_selection_extent_input_field.html > var range = input.setSelectionRange(0, 6); > ...
5 years, 2 months ago (2015-10-19 06:20:43 UTC) #19
kotenkov
On 2015/10/19 06:20:43, kotenkov wrote: > Sorry for the delay. > > > Note: In ...
5 years, 2 months ago (2015-10-19 06:34:56 UTC) #20
yosin_UTC9
On 2015/10/19 at 06:34:56, kotenkov wrote: > On 2015/10/19 06:20:43, kotenkov wrote: > > Sorry ...
5 years, 2 months ago (2015-10-19 08:29:50 UTC) #21
kotenkov
On 2015/10/19 08:29:50, Yosi_UTC9 wrote: > On 2015/10/19 at 06:34:56, kotenkov wrote: > > On ...
5 years, 2 months ago (2015-10-19 14:24:43 UTC) #22
kotenkov
5 years, 2 months ago (2015-10-19 14:24:52 UTC) #23
yosin_UTC9
On 2015/10/19 at 14:24:43, kotenkov wrote: > On 2015/10/19 08:29:50, Yosi_UTC9 wrote: > > On ...
5 years, 2 months ago (2015-10-20 04:05:12 UTC) #24
yosin_UTC9
lgtm All bots are passed!
5 years, 2 months ago (2015-10-20 12:21:48 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1377963004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1377963004/80001
5 years, 2 months ago (2015-10-20 12:22:24 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-20 15:16:40 UTC) #29
kotenkov
On 2015/10/20 12:21:48, Yosi_UTC9 wrote: > lgtm > > All bots are passed! So we ...
5 years, 2 months ago (2015-10-20 15:25:36 UTC) #30
tkent
lgtm https://codereview.chromium.org/1377963004/diff/80001/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp File third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp (right): https://codereview.chromium.org/1377963004/diff/80001/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp#newcode357 third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp:357: document().updateLayoutIgnorePendingStylesheets(); nit: Add a comment why we need ...
5 years, 2 months ago (2015-10-20 23:11:32 UTC) #31
yosin_UTC9
On 2015/10/20 at 15:25:36, kotenkov wrote: > On 2015/10/20 12:21:48, Yosi_UTC9 wrote: > > lgtm ...
5 years, 2 months ago (2015-10-21 01:04:14 UTC) #32
kotenkov
I have added comments. Checking the commit checkbox now.
5 years, 2 months ago (2015-10-21 05:53:45 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1377963004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1377963004/100001
5 years, 2 months ago (2015-10-21 05:54:03 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 2 months ago (2015-10-21 07:01:03 UTC) #37
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/9c2436064ebdcb9192dfacac96944f2753a2ce78 Cr-Commit-Position: refs/heads/master@{#355247}
5 years, 2 months ago (2015-10-21 07:01:49 UTC) #38
tkent
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/1417363002/ by tkent@chromium.org. ...
5 years, 2 months ago (2015-10-22 22:45:44 UTC) #39
yosin_UTC9
On 2015/10/22 at 22:45:44, tkent wrote: > A revert of this CL (patchset #6 id:100001) ...
5 years, 2 months ago (2015-10-23 01:41:44 UTC) #40
tkent
5 years, 2 months ago (2015-10-23 01:59:26 UTC) #41
Message was sent while issue was closed.
On 2015/10/22 at 22:45:44, tkent wrote:
> The reason for reverting is: Regressed speedometer significantly. 
crbug.com/546248
> .

blink_perf.dom textarea-dom (crbug.com/546250) too.

Powered by Google App Engine
This is Rietveld 408576698