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

Issue 2735633006: INPUT/TEXTAREA elements: Dispatch 'select' event only if text selection is changed. (Closed)

Created:
3 years, 9 months ago by tkent
Modified:
3 years, 9 months ago
Reviewers:
yoichio
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dglazkov+blink
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

INPUT/TEXTAREA elements: Dispatch 'select' event only if text selection is changed. * TextControlElement::cacheSelection() and setSelectionRange() This is the main change of this CL. We dispatch 'select' event only if new values are not identical to old values. * TextControlElement::setRangeText() Add a new flag to TextControlElement::setValue() in order to control text selection change in setValue(). setRangeText() doesn't want setValue() to change text selection. * web-platform-tests html/semantics/forms/textfieldselection/select-event.html - Mark this slow. This test make sure that |select| events are NOT dispatched. So it takes long time. - Correct "right" to "backward" to avoid the unknown keyword is recognized as the default keyword. - Shorten setTimeout value. * LayoutTests/fast/events/select-event-on-input-and-textarea.html Removed because this is covered by the above test. * LayoutTests/fast/events/select-event-on-input-recursive.html Removed. This test doesn't make sense since this CL. BUG=696102 Review-Url: https://codereview.chromium.org/2735633006 Cr-Commit-Position: refs/heads/master@{#455380} Committed: https://chromium.googlesource.com/chromium/src/+/158aa81d2e11bd3cce433df4801cbffc9922d86d

Patch Set 1 : . #

Total comments: 7

Patch Set 2 : Remove throttling #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -290 lines) Patch
M third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/select-event.html View 3 chunks +3 lines, -2 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/select-event-expected.txt View 1 chunk +0 lines, -76 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea.html View 1 chunk +0 lines, -99 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea-expected.txt View 1 chunk +0 lines, -23 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html View 1 chunk +0 lines, -32 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive-expected.txt View 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.h View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLTextAreaElement.h View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp View 3 chunks +13 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/html/TextControlElement.h View 3 chunks +13 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/html/TextControlElement.cpp View 1 4 chunks +20 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/BaseButtonInputType.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/FileInputType.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/FileInputType.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/HiddenInputType.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/HiddenInputType.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/InputType.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/InputType.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/NumberInputType.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/NumberInputType.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/forms/TextFieldInputType.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp View 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 36 (24 generated)
tkent
yoichio@, would you review this please? I think intent-to-ship isn't necessary. This just reduces the ...
3 years, 9 months ago (2017-03-07 05:32:43 UTC) #16
yoichio
https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html File third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html (left): https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html#oldcode15 third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html:15: input.selectionEnd = 3; This test confirms throttle event queueing. ...
3 years, 9 months ago (2017-03-07 09:00:56 UTC) #19
tkent
https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html File third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html (left): https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html#oldcode15 third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html:15: input.selectionEnd = 3; On 2017/03/07 at 09:00:56, yoichio wrote: ...
3 years, 9 months ago (2017-03-07 09:27:34 UTC) #20
tkent
https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html File third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html (left): https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html#oldcode15 third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html:15: input.selectionEnd = 3; On 2017/03/07 at 09:27:34, tkent wrote: ...
3 years, 9 months ago (2017-03-07 11:30:08 UTC) #25
yoichio
https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html File third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html (left): https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html#oldcode15 third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html:15: input.selectionEnd = 3; Do you think this kind of ...
3 years, 9 months ago (2017-03-08 02:00:36 UTC) #26
tkent
https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html File third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html (left): https://codereview.chromium.org/2735633006/diff/20001/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html#oldcode15 third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html:15: input.selectionEnd = 3; On 2017/03/08 at 02:00:36, yoichio wrote: ...
3 years, 9 months ago (2017-03-08 02:05:23 UTC) #27
yoichio
lgtm
3 years, 9 months ago (2017-03-08 03:46:13 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735633006/40001
3 years, 9 months ago (2017-03-08 04:33:07 UTC) #30
commit-bot: I haz the power
Committed patchset #2 (id:40001) as https://chromium.googlesource.com/chromium/src/+/158aa81d2e11bd3cce433df4801cbffc9922d86d
3 years, 9 months ago (2017-03-08 04:41:17 UTC) #33
jeffcarp
On 2017/03/08 at 04:41:17, commit-bot wrote: > Committed patchset #2 (id:40001) as https://chromium.googlesource.com/chromium/src/+/158aa81d2e11bd3cce433df4801cbffc9922d86d This CL ...
3 years, 9 months ago (2017-03-08 19:31:54 UTC) #34
tkent
On 2017/03/08 at 19:31:54, jeffcarp wrote: > This CL failed the WPT stability check[1]. I ...
3 years, 9 months ago (2017-03-09 00:28:04 UTC) #35
jeffcarp
3 years, 9 months ago (2017-03-09 00:53:06 UTC) #36
Message was sent while issue was closed.
On 2017/03/09 at 00:28:04, tkent wrote:
> On 2017/03/08 at 19:31:54, jeffcarp wrote:
> > This CL failed the WPT stability check[1]. I think it might be due to the
decreased setTimeout value. I'm going to increase it in the current patch[2] so
that it kicks off another Travis CI run.
> > 
> > [1] https://travis-ci.org/w3c/web-platform-tests/jobs/208848753
> > [2] https://github.com/w3c/web-platform-tests/pull/5068
> 
> Thank you for the fix!  Can wpt-exporter send a pull-request status to a patch
author?  It's hard for a Chromium patch author to know export failures.

I'm currently looking into moving the exporter to Gerrit - part of the plan is
to comment status updates on the CL (e.g. 'travis failed' or 'export succeeded')

Powered by Google App Engine
This is Rietveld 408576698