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

Issue 1636883003: Perform Spellcheck Requesting before Dispatching Events (Closed)

Created:
4 years, 11 months ago by Xiaocheng
Modified:
4 years, 10 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews, kochi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Perform Spellcheck Requesting before Dispatching Events |ReplaceSelectionCommand| stores the inserted range after |doApply()|. This range may be invalidated if |Editor::appliedEditing()| modifies the DOM, causing spellcheck run on an invalid range. This CL moves the spellcheck request into |Editor::appliedEditing()| before dispatching any event, ensuring spellcheck run on a valid range. BUG=580950 TEST=LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html Committed: https://crrev.com/275214958096dafab0cd78968f66d5108d83ab1c Cr-Commit-Position: refs/heads/master@{#371776}

Patch Set 1 #

Patch Set 2 : Move spell check requesting to |Editor::appliedEditing()| #

Patch Set 3 : Must dispatch non-scoped events #

Total comments: 2

Patch Set 4 : #

Patch Set 5 : Add test case #

Total comments: 14

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -8 lines) Patch
A third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html View 1 2 3 4 5 6 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Editor.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Editor.cpp View 1 2 3 4 5 2 chunks +19 lines, -8 lines 0 comments Download

Messages

Total messages: 26 (10 generated)
Xiaocheng
PTAL. I'm still figuring out how to minimize the repro case. A test case will ...
4 years, 11 months ago (2016-01-26 02:38:42 UTC) #2
yosin_UTC9
Rather than nullify inserted range, we would like to fix root cause, e.g. postpone |webkitEditableContentChanged| ...
4 years, 11 months ago (2016-01-26 03:46:24 UTC) #3
yosin_UTC9
4 years, 11 months ago (2016-01-26 03:46:53 UTC) #4
Xiaocheng
On 2016/01/26 at 03:46:24, yosin wrote: > Rather than nullify inserted range, we would like ...
4 years, 11 months ago (2016-01-26 05:27:24 UTC) #5
yosin_UTC9
On 2016/01/26 at 05:27:24, xiaochengh wrote: > On 2016/01/26 at 03:46:24, yosin wrote: > > ...
4 years, 11 months ago (2016-01-26 07:20:03 UTC) #6
Xiaocheng
PTAL. I also tried changing |dispatchEvent| to |dispatchScopedEvent|, which caused two layout tests to fail ...
4 years, 10 months ago (2016-01-26 13:37:54 UTC) #7
yosin_UTC9
lgtm w/ style suggestion. https://codereview.chromium.org/1636883003/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/1636883003/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp#newcode657 third_party/WebKit/Source/core/editing/Editor.cpp:657: if (cmd->editingAction() == EditActionPaste) { ...
4 years, 10 months ago (2016-01-27 02:06:43 UTC) #9
Xiaocheng
Revised accordingly. https://codereview.chromium.org/1636883003/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/1636883003/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp#newcode657 third_party/WebKit/Source/core/editing/Editor.cpp:657: if (cmd->editingAction() == EditActionPaste) { On 2016/01/27 ...
4 years, 10 months ago (2016-01-27 02:49:10 UTC) #11
Xiaocheng
Added a layout test. PTAL.
4 years, 10 months ago (2016-01-27 05:38:45 UTC) #16
yosin_UTC9
https://codereview.chromium.org/1636883003/diff/80001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html File third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html (right): https://codereview.chromium.org/1636883003/diff/80001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html#newcode2 third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html:2: nit: We don't need to have an extra blank ...
4 years, 10 months ago (2016-01-27 06:02:38 UTC) #17
Xiaocheng
Revised style according to the comments. Also fixed a bug newly introduced in Patch 5 ...
4 years, 10 months ago (2016-01-27 07:20:37 UTC) #18
yosin_UTC9
still lgtm w/ nit https://codereview.chromium.org/1636883003/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html File third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html (right): https://codereview.chromium.org/1636883003/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html#newcode16 third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html:16: dest.addEventListener('webkitEditableContentChanged', () => dest.innerHTML = ...
4 years, 10 months ago (2016-01-27 08:40:29 UTC) #19
Xiaocheng
Revised accordingly. https://codereview.chromium.org/1636883003/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html File third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html (right): https://codereview.chromium.org/1636883003/diff/100001/third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html#newcode16 third_party/WebKit/LayoutTests/editing/pasteboard/paste-webkit-editable-content-changed-crash.html:16: dest.addEventListener('webkitEditableContentChanged', () => dest.innerHTML = ''); On ...
4 years, 10 months ago (2016-01-27 08:50:56 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1636883003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1636883003/120001
4 years, 10 months ago (2016-01-27 08:51:16 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 10 months ago (2016-01-27 11:53:17 UTC) #24
commit-bot: I haz the power
4 years, 10 months ago (2016-01-27 11:54:20 UTC) #26
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/275214958096dafab0cd78968f66d5108d83ab1c
Cr-Commit-Position: refs/heads/master@{#371776}

Powered by Google App Engine
This is Rietveld 408576698