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

Issue 1437813002: Set selection to INPUT/TEXTAREA before dispatching 'focus' event. (Closed)

Created:
5 years, 1 month ago by tkent
Modified:
5 years, 1 month ago
Reviewers:
yoichio, kochi
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set selection to INPUT/TEXTAREA before dispatching 'focus' event. This CL moves updateFocusAppearance() call from Element::focus() to Document::setFocusedElement() so that 'focus' event handler can refer to correct selection information. The last updateLayoutIgnorePendingStylesheets() call in Element::focus is unnecessary now. Because this CL removes it, textfield-to-password-on-focus.html needs a delay to pour key inputs. BUG=526516 Committed: https://crrev.com/d76505b8d68f4fffd18620d9ab1b4d19c467ec4c Cr-Commit-Position: refs/heads/master@{#360545}

Patch Set 1 : #

Total comments: 3

Patch Set 2 : improve selection-functions.html #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -23 lines) Patch
M third_party/WebKit/LayoutTests/fast/forms/selection-functions.html View 1 2 chunks +14 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/selection-functions-expected.txt View 1 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/textfield-to-password-on-focus.html View 2 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 2 chunks +4 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLInputElement.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp View 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
tkent
kochi@, yoichio@, would you review this please?
5 years, 1 month ago (2015-11-11 16:08:45 UTC) #3
kochi
Who can set selectionBehavior to SelectionBehaviorOnFocus::None now?
5 years, 1 month ago (2015-11-11 23:23:21 UTC) #4
kochi
On 2015/11/11 23:23:21, Takayoshi Kochi wrote: > Who can set selectionBehavior to SelectionBehaviorOnFocus::None > now? ...
5 years, 1 month ago (2015-11-11 23:24:03 UTC) #5
kochi
On 2015/11/11 23:24:03, Takayoshi Kochi wrote: > On 2015/11/11 23:23:21, Takayoshi Kochi wrote: > > ...
5 years, 1 month ago (2015-11-11 23:32:36 UTC) #6
yoichio
https://codereview.chromium.org/1437813002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html File third_party/WebKit/LayoutTests/fast/forms/selection-functions.html (right): https://codereview.chromium.org/1437813002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html#newcode98 third_party/WebKit/LayoutTests/fast/forms/selection-functions.html:98: getSelection().removeAllRanges(); Could you have |elt.selectionStart = elt.selectionEnd = 0 ...
5 years, 1 month ago (2015-11-17 05:56:40 UTC) #7
tkent
https://codereview.chromium.org/1437813002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html File third_party/WebKit/LayoutTests/fast/forms/selection-functions.html (right): https://codereview.chromium.org/1437813002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html#newcode98 third_party/WebKit/LayoutTests/fast/forms/selection-functions.html:98: getSelection().removeAllRanges(); On 2015/11/17 at 05:56:40, yoichio wrote: > Could ...
5 years, 1 month ago (2015-11-17 06:02:45 UTC) #8
tkent
https://codereview.chromium.org/1437813002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html File third_party/WebKit/LayoutTests/fast/forms/selection-functions.html (right): https://codereview.chromium.org/1437813002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/selection-functions.html#newcode98 third_party/WebKit/LayoutTests/fast/forms/selection-functions.html:98: getSelection().removeAllRanges(); On 2015/11/17 at 06:02:45, tkent wrote: > On ...
5 years, 1 month ago (2015-11-17 06:24:54 UTC) #9
yoichio
> > Setting 0 to them makes unable to check the behavior correctness because we ...
5 years, 1 month ago (2015-11-18 06:22:40 UTC) #10
tkent
On 2015/11/18 at 06:22:40, yoichio wrote: > > > > Setting 0 to them makes ...
5 years, 1 month ago (2015-11-18 06:31:57 UTC) #11
yoichio
If you confirm that selectionStart and selectionEnd in focus handler should be end of text, ...
5 years, 1 month ago (2015-11-19 07:56:14 UTC) #12
tkent
On 2015/11/19 at 07:56:14, yoichio wrote: > If you confirm that selectionStart and selectionEnd in ...
5 years, 1 month ago (2015-11-19 08:04:06 UTC) #13
tkent
> The element has 48 characters. Any valid values other than 0,0 are ok. Correction: ...
5 years, 1 month ago (2015-11-19 08:05:00 UTC) #14
yoichio
On 2015/11/19 at 08:04:06, tkent wrote: > On 2015/11/19 at 07:56:14, yoichio wrote: > > ...
5 years, 1 month ago (2015-11-19 08:07:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1437813002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1437813002/40001
5 years, 1 month ago (2015-11-19 08:09:36 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:40001)
5 years, 1 month ago (2015-11-19 10:35:00 UTC) #19
commit-bot: I haz the power
5 years, 1 month ago (2015-11-19 10:35:50 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d76505b8d68f4fffd18620d9ab1b4d19c467ec4c
Cr-Commit-Position: refs/heads/master@{#360545}

Powered by Google App Engine
This is Rietveld 408576698