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

Issue 65043014: Fix for broken undo functionality (Closed)

Created:
7 years, 1 month ago by vanihegde
Modified:
7 years ago
CC:
blink-reviews, vanivhegde
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix for broken undo functionality When delete(character granularity) is performed after few text insertions, this delete command is added to already open typing command. This was resulting in wrong 'undo' behaviors. This can be fixed by keeping continuous delete operations alone as a group. Hence whenever a delete command follows some other typing command say text insertion, we should open a new typing command. This fixes many erroneous behaviors related to undo operation. TEST=LayoutTests/editing/undo/undo-insert-delete.html BUG=319659 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162784

Patch Set 1 #

Patch Set 2 : Removing old pixel test #

Total comments: 4

Patch Set 3 : Review comments incorporated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -29 lines) Patch
D LayoutTests/editing/undo/5378473.html View 1 1 chunk +0 lines, -9 lines 0 comments Download
D LayoutTests/editing/undo/5378473-expected.txt View 1 1 chunk +0 lines, -7 lines 0 comments Download
A LayoutTests/editing/undo/undo-insert-delete.html View 1 2 1 chunk +35 lines, -0 lines 0 comments Download
A LayoutTests/editing/undo/undo-insert-delete-expected.txt View 1 chunk +6 lines, -0 lines 0 comments Download
D LayoutTests/platform/mac/editing/undo/5378473-expected.png View 1 Binary file 0 comments Download
D LayoutTests/platform/win/editing/undo/5378473-expected.png View 1 Binary file 0 comments Download
D LayoutTests/platform/win/editing/undo/5378473-expected.txt View 1 1 chunk +0 lines, -7 lines 0 comments Download
M Source/core/editing/TypingCommand.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/editing/TypingCommand.cpp View 1 3 chunks +12 lines, -6 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
vanihegde
This fix is causing editing/undo/5378473.html to fail. The test is as below document.execCommand("InsertText", false, "foo"); ...
7 years, 1 month ago (2013-11-15 08:30:14 UTC) #1
yosin_UTC9
On 2013/11/15 08:30:14, vanihegde wrote: > This fix is causing editing/undo/5378473.html to fail. > > ...
7 years, 1 month ago (2013-11-15 08:58:30 UTC) #2
vanihegde
On 2013/11/15 08:58:30, Yoshi wrote: > On 2013/11/15 08:30:14, vanihegde wrote: > > This fix ...
7 years, 1 month ago (2013-11-15 09:35:27 UTC) #3
vanihegde
By the way I don't see editing/undo/5378473.html testing anything significant. The new test case covers ...
7 years, 1 month ago (2013-11-15 09:36:37 UTC) #4
yosin_UTC9
It is better to introduce LayoutTests/editing/undo/undo-insert-delete.html with removing 5378473.html. https://codereview.chromium.org/65043014/diff/70001/LayoutTests/editing/undo/undo-insert-delete.html File LayoutTests/editing/undo/undo-insert-delete.html (right): https://codereview.chromium.org/65043014/diff/70001/LayoutTests/editing/undo/undo-insert-delete.html#newcode25 LayoutTests/editing/undo/undo-insert-delete.html:25: ...
7 years, 1 month ago (2013-11-15 10:22:21 UTC) #5
vanihegde
On 2013/11/15 10:22:21, Yoshi wrote: > It is better to introduce LayoutTests/editing/undo/undo-insert-delete.html with > removing ...
7 years, 1 month ago (2013-11-15 10:38:43 UTC) #6
yosin_UTC9
https://codereview.chromium.org/65043014/diff/70001/Source/core/editing/TypingCommand.cpp File Source/core/editing/TypingCommand.cpp (right): https://codereview.chromium.org/65043014/diff/70001/Source/core/editing/TypingCommand.cpp#newcode114 Source/core/editing/TypingCommand.cpp:114: if (RefPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) { On 2013/11/15 10:22:22, ...
7 years, 1 month ago (2013-11-15 10:55:11 UTC) #7
vanihegde
Added a patch with nits fixed. Please have a look. It wasn't quite clear as ...
7 years, 1 month ago (2013-11-15 11:14:28 UTC) #8
yosin_UTC9
ACK Please add TEST=LayoutTests/editing/undo/undo-insert-delete.html in description.
7 years, 1 month ago (2013-11-18 01:25:18 UTC) #9
vanihegde
LGTM please.
7 years, 1 month ago (2013-11-19 10:29:31 UTC) #10
ojan
lgtm
7 years ago (2013-11-27 23:09:22 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vani.hegde@samsung.com/65043014/200001
7 years ago (2013-11-27 23:12:26 UTC) #12
commit-bot: I haz the power
7 years ago (2013-11-28 01:19:20 UTC) #13
Message was sent while issue was closed.
Change committed as 162784

Powered by Google App Engine
This is Rietveld 408576698