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

Issue 2706033004: Don't throw when getting selection(Direction|Start|End) on input (Closed)

Created:
3 years, 10 months ago by Sunny
Modified:
3 years, 10 months ago
CC:
asvitkine+watch_chromium.org, 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

Don't throw when getting selection(Direction|Start|End) on input Return null instead of throwing |InvalidStateError| for visiting |selectionDirection|, |selectionStart| and |selectionEnd| on |input| which does not apply selection API. Firefox has the similar behavior. Spec: https://html.spec.whatwg.org/multipage/forms.html#dom-textarea/input-selectionstart This change fix 25 fails in layout tests. BUG=622679 Review-Url: https://codereview.chromium.org/2706033004 Cr-Commit-Position: refs/heads/master@{#451926} Committed: https://chromium.googlesource.com/chromium/src/+/fa9836f9a52257a725282c2d12f9a4d213cd0109

Patch Set 1 #

Total comments: 1

Patch Set 2 : Refine test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -130 lines) Patch
M third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application.html View 1 1 chunk +6 lines, -3 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-input-element/selection-expected.txt View 1 chunk +0 lines, -49 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/selection-functions.html View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/selection-functions-expected.txt View 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/selection-wrongtype.html View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/selection-wrongtype-expected.txt View 1 chunk +51 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.cpp View 2 chunks +4 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.idl View 1 chunk +3 lines, -3 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 34 (20 generated)
Sunny
Hi tkent@, please take a look, thanks :D
3 years, 10 months ago (2017-02-20 17:36:47 UTC) #2
tkent
https://codereview.chromium.org/2706033004/diff/1/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application-expected.txt File third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application-expected.txt (right): https://codereview.chromium.org/2706033004/diff/1/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application-expected.txt#newcode2 third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:2: FAIL text field selection for the input hidden assert_throws: ...
3 years, 10 months ago (2017-02-20 23:43:07 UTC) #7
Sunny
On 2017/02/20 23:43:07, tkent wrote: > https://codereview.chromium.org/2706033004/diff/1/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application-expected.txt > File > third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/selection-not-application-expected.txt > (right): > > ...
3 years, 10 months ago (2017-02-21 12:41:49 UTC) #9
tkent
lgtm
3 years, 10 months ago (2017-02-22 00:09:44 UTC) #15
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/2706033004/20001
3 years, 10 months ago (2017-02-22 00:11:23 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) linux_chromium_tsan_rel_ng on ...
3 years, 10 months ago (2017-02-22 02:14:33 UTC) #18
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/2706033004/20001
3 years, 10 months ago (2017-02-22 02:16:55 UTC) #20
commit-bot: I haz the power
Exceeded global retry quota
3 years, 10 months ago (2017-02-22 04:20:08 UTC) #22
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/2706033004/20001
3 years, 10 months ago (2017-02-22 06:09:31 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/369761)
3 years, 10 months ago (2017-02-22 06:21:46 UTC) #26
tkent
ericwilligers@ or haraken@, please approve histograms.xml
3 years, 10 months ago (2017-02-22 06:23:26 UTC) #28
haraken
LGTM
3 years, 10 months ago (2017-02-22 06:42:38 UTC) #29
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/2706033004/20001
3 years, 10 months ago (2017-02-22 06:55:42 UTC) #31
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 08:21:59 UTC) #34
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/fa9836f9a52257a725282c2d12f9...

Powered by Google App Engine
This is Rietveld 408576698