RESOLVED FIXED30955
REGRESSION: In Mail, Undo does not restore some characters I have deleted at the end of a line
https://bugs.webkit.org/show_bug.cgi?id=30955
Summary REGRESSION: In Mail, Undo does not restore some characters I have deleted at ...
Enrica Casucci
Reported 2009-10-30 10:17:10 PDT
* STEPS TO REPRODUCE 1. Create a new message in any Webmail application 2. Type the following without using backspace to correct any words (the exact words are not important) one two three four five six seven 3. Delete the last word or two using alt+shift+delete without moving the insertion point (without using arrow keys), so you have this: one two three four five 4. Undo (CMD+Z) * RESULTS the entire content is erased * EXPECTED the delete word is restored
Attachments
Patch (16.48 KB, patch)
2009-10-30 10:24 PDT, Enrica Casucci
darin: review-
Patch2 (5.60 KB, patch)
2009-10-30 11:56 PDT, Enrica Casucci
darin: review+
Patch3 (5.60 KB, patch)
2009-10-30 12:15 PDT, Enrica Casucci
darin: review+
Enrica Casucci
Comment 1 2009-10-30 10:24:48 PDT
Darin Adler
Comment 2 2009-10-30 10:27:09 PDT
Comment on attachment 42215 [details] Patch > - if (isOpenForMoreTypingCommand(lastEditCommand)) { > + if (!killRing && isOpenForMoreTypingCommand(lastEditCommand)) { It's not correct to use the killRing boolean for this. That has a specific meaning, and it just happens to be set in the appropriate cases. I would like to see a new patch that does this in some logically consistent way. One possibility would be to continue to use this boolean and rename it to reflect its new meaning. Another possibility would be to add some other argument or mechanism for controlling whether new keys are added to the existing typing.
Adele Peterson
Comment 3 2009-10-30 10:38:48 PDT
Comment on attachment 42215 [details] Patch One more comment- I think you can use layoutTestController.dumpAsText() in this test. I don't think you need the full RenderTree in the results.
Enrica Casucci
Comment 4 2009-10-30 11:56:52 PDT
Created attachment 42223 [details] Patch2 Per Darin's suggestions, we don't the killRing flag, but instead we rely on the TextGranularity to decide whether to start a new command or not. I've also modified the unit test per Adele's suggestions.
Darin Adler
Comment 5 2009-10-30 12:11:04 PDT
Comment on attachment 42223 [details] Patch2 > + if (granularity == CharacterGranularity && isOpenForMoreTypingCommand(lastEditCommand)) { There's an extra space here before the "C". r=me
Enrica Casucci
Comment 6 2009-10-30 12:15:10 PDT
Created attachment 42226 [details] Patch3 New patch removing extra blank.
Adele Peterson
Comment 7 2009-10-30 15:09:24 PDT
Committed revision 50358
Note You need to log in before you can comment on or make changes to this bug.