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

Issue 2878613002: INPUT/TEXTAREA elements: Fix incorrect selectionStart/selectionEnd values after blur. (Closed)

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

Description

INPUT/TEXTAREA elements: Fix incorrect selectionStart/selectionEnd values after blur. We failed to update selectionStart/selectionEnd cache because TextControlElement::SelectionChanged() is not called in some cases after crrev.com/450370. After this CL, selection values are cached in webkitEditableContentChanged event handling code too. It is called on every DOM mutation in text control editor. BUG=714425 Review-Url: https://codereview.chromium.org/2878613002 Cr-Commit-Position: refs/heads/master@{#471290} Committed: https://chromium.googlesource.com/chromium/src/+/e71aa45ab3098edca75725a658d3624f5ed47108

Patch Set 1 : . #

Total comments: 2

Patch Set 2 : rename FrameSelection::NotifyLayoutObjectOfSelectionChange() #

Total comments: 6

Patch Set 3 : Cache in TextControlElement::DefaultEventHandler() #

Total comments: 4

Patch Set 4 : Improve a test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -0 lines) Patch
A third_party/WebKit/LayoutTests/fast/forms/text-control-selection-after-blur.html View 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/TextControlElement.cpp View 1 2 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (28 generated)
tkent
yosin@, would you review this please?
3 years, 7 months ago (2017-05-11 09:07:40 UTC) #5
yosin_UTC9
+ xiaochengh@ and +yoichio@, for new name of NotifyLayoutObjectOfSelectionChange() https://codereview.chromium.org/2878613002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2878613002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode225 third_party/WebKit/Source/core/editing/FrameSelection.cpp:225: ...
3 years, 7 months ago (2017-05-11 09:41:56 UTC) #9
Xiaocheng
https://codereview.chromium.org/2878613002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2878613002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode225 third_party/WebKit/Source/core/editing/FrameSelection.cpp:225: NotifyLayoutObjectOfSelectionChange( On 2017/05/11 at 09:41:55, yosin_UTC9 wrote: > Could ...
3 years, 7 months ago (2017-05-11 18:37:18 UTC) #10
tkent
ok, patch set 2 renames it to NotifyTextControlOfSelectionChange().
3 years, 7 months ago (2017-05-12 01:23:21 UTC) #13
yosin_UTC9
https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode225 third_party/WebKit/Source/core/editing/FrameSelection.cpp:225: NotifyTextControlOfSelectionChange( Can we update cached selection in "webkitEditableContentChanged" event ...
3 years, 7 months ago (2017-05-12 01:37:00 UTC) #16
yoichio
https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html File third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html (right): https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html#newcode17 third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html:17: assert_equals(element.selectionStart, null); It doesn't make sense of "selectionStart/End on ...
3 years, 7 months ago (2017-05-12 01:54:00 UTC) #19
tkent
https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/Source/core/editing/FrameSelection.cpp File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/Source/core/editing/FrameSelection.cpp#newcode224 third_party/WebKit/Source/core/editing/FrameSelection.cpp:224: // changed. On 2017/05/12 at 01:54:00, yoichio wrote: > ...
3 years, 7 months ago (2017-05-12 02:01:01 UTC) #22
tkent
https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html File third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html (right): https://codereview.chromium.org/2878613002/diff/40001/third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html#newcode17 third_party/WebKit/LayoutTests/fast/forms/text/text-selection-after-type-change.html:17: assert_equals(element.selectionStart, null); On 2017/05/12 at 01:54:00, yoichio wrote: > ...
3 years, 7 months ago (2017-05-12 02:01:46 UTC) #23
yosin_UTC9
lgtm w/ nits Please update summary and description. It seems they describe PS#1 and PS#2 ...
3 years, 7 months ago (2017-05-12 04:03:52 UTC) #24
tkent
> Please update summary and description. It seems they describe PS#1 and PS#2 instead of ...
3 years, 7 months ago (2017-05-12 08:41:07 UTC) #30
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/2878613002/80001
3 years, 7 months ago (2017-05-12 08:41:42 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/382971)
3 years, 7 months ago (2017-05-12 09:51:55 UTC) #35
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/2878613002/80001
3 years, 7 months ago (2017-05-12 10:12:00 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/383023)
3 years, 7 months ago (2017-05-12 11:09:52 UTC) #39
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/2878613002/80001
3 years, 7 months ago (2017-05-12 12:55:22 UTC) #41
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 12:59:43 UTC) #44
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/e71aa45ab3098edca75725a658d3...

Powered by Google App Engine
This is Rietveld 408576698