Summary: | Web Inspector: Several consecutive Backspace or Delete strikes should not be marked as undoable state. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vsevolod Vlasov <vsevik> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Vsevolod Vlasov <vsevik> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Vsevolod Vlasov
2013-02-15 02:07:40 PST
Created attachment 188517 [details]
Patch
Comment on attachment 188517 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188517&action=review > Source/WebCore/inspector/front-end/TextEditorModel.js:288 > + if (this._lastCommand.newRange.endLine === range.startLine && this._lastCommand.newRange.endColumn === range.startColumn) This looks like a utility method (TextRange.prototypes.isSiblingRange) > Source/WebCore/inspector/front-end/TextEditorModel.js:298 > + if (text.length > 1 || text === "\n") Due to the editRangeLogic, even single key press can result in a text.length > 1 (and I can imagine coalescing events that are converted into single editRange). Could we simplify this whole heuristics? Comment on attachment 188517 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188517&action=review > Source/WebCore/inspector/front-end/TextEditorModel.js:256 > + _rangeHasOneCharacter: function(range) Move to text range prototype. Created attachment 188572 [details]
Patch
(In reply to comment #3) > (From update of attachment 188517 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=188517&action=review > > > Source/WebCore/inspector/front-end/TextEditorModel.js:256 > > + _rangeHasOneCharacter: function(range) > > Move to text range prototype. It's not really possible since it depends on the line length. Comment on attachment 188572 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188572&action=review > Source/WebCore/inspector/front-end/TextEditorModel.js:278 > + _rangeHasOneCharacter: function(range) This could be even public :) Comment on attachment 188572 [details] Patch Clearing flags on attachment: 188572 Committed r143005: <http://trac.webkit.org/changeset/143005> All reviewed patches have been landed. Closing bug. |