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

Issue 2674173002: Fix undo stack ordering for all-but-typing commands (Closed)

Created:
3 years, 10 months ago by Xiaocheng
Modified:
3 years, 10 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix undo stack ordering for all-but-typing commands When one top-level editing command triggers another command via event handlers, Blink used to have their undo ordering reversed. The reason is that the enstacking of commands is not protected by EventQueueScope; consequently, the commands are executed in a nested manner, making the first command end later than the second command. This patch protects everything in CompositeEditCommand::apply with EventQueueScope, so that the nesting behavior for all commands (except TypingCommand) is eliminated. BUG=685975 TEST=editing/undo/drag_with_mutation_event_undo_order.html Review-Url: https://codereview.chromium.org/2674173002 Cr-Commit-Position: refs/heads/master@{#452095} Committed: https://chromium.googlesource.com/chromium/src/+/91ce4c5c6b3c38b5291c94d897f691b30282cd79

Patch Set 1 #

Patch Set 2 : Add layout test #

Total comments: 1

Patch Set 3 : Reuse sample #

Total comments: 2

Patch Set 4 : Minimize test #

Total comments: 2

Messages

Total messages: 33 (21 generated)
Xiaocheng
PTAL.
3 years, 10 months ago (2017-02-16 21:22:43 UTC) #5
Xiaocheng
https://codereview.chromium.org/2674173002/diff/20001/third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html File third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html (right): https://codereview.chromium.org/2674173002/diff/20001/third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html#newcode51 third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html:51: dragAndDrop(selection, 'source', 'div1'); Note: the first command must be ...
3 years, 10 months ago (2017-02-16 21:23:45 UTC) #6
yosin_UTC9
https://codereview.chromium.org/2674173002/diff/40001/third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html File third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html (right): https://codereview.chromium.org/2674173002/diff/40001/third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html#newcode72 third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html:72: 'undo', We don't need to check result of "undo" ...
3 years, 10 months ago (2017-02-17 13:05:34 UTC) #13
Xiaocheng
Patch updated with test case minimized. PTAL. https://codereview.chromium.org/2674173002/diff/40001/third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html File third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html (right): https://codereview.chromium.org/2674173002/diff/40001/third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html#newcode72 third_party/WebKit/LayoutTests/editing/undo/drag_with_mutation_event_undo_order.html:72: 'undo', On ...
3 years, 10 months ago (2017-02-17 18:47:23 UTC) #16
yosin_UTC9
lgtm https://codereview.chromium.org/2674173002/diff/60001/third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html File third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html (right): https://codereview.chromium.org/2674173002/diff/60001/third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html#newcode30 third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html:30: document.execCommand('undo'); Do we have other test scripts want ...
3 years, 10 months ago (2017-02-20 06:12:02 UTC) #19
Xiaocheng
Thanks for the review. https://codereview.chromium.org/2674173002/diff/60001/third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html File third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html (right): https://codereview.chromium.org/2674173002/diff/60001/third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html#newcode30 third_party/WebKit/LayoutTests/editing/undo/paste_with_mutation_event_undo_order.html:30: document.execCommand('undo'); On 2017/02/20 at 06:12:02, ...
3 years, 10 months ago (2017-02-22 02:36:20 UTC) #21
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/2674173002/60001
3 years, 10 months ago (2017-02-22 02:37:21 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) chromeos_amd64-generic_chromium_compile_only_ng on ...
3 years, 10 months ago (2017-02-22 04:40:46 UTC) #24
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/2674173002/60001
3 years, 10 months ago (2017-02-22 05:40:22 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_tsan_rel_ng/builds/19505)
3 years, 10 months ago (2017-02-22 07:34:55 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/2674173002/60001
3 years, 10 months ago (2017-02-22 16:09:45 UTC) #30
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 17:03:31 UTC) #33
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/91ce4c5c6b3c38b5291c94d897f6...

Powered by Google App Engine
This is Rietveld 408576698