Bug 101905 - Web Inspector: use last selection as complementary signal when applying DOM changes to the text model.
Summary: Web Inspector: use last selection as complementary signal when applying DOM c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-11 23:55 PST by Pavel Feldman
Modified: 2012-11-14 05:09 PST (History)
8 users (show)

See Also:


Attachments
[Patch] Straw man, not for landing (8.99 KB, patch)
2012-11-12 00:02 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (13.20 KB, patch)
2012-11-13 10:25 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (13.19 KB, patch)
2012-11-13 10:28 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (15.13 KB, patch)
2012-11-14 01:58 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-11-11 23:55:39 PST
Currently we use heuristics for detecting damaged model range upon DOM mutation. This change adds signals from the last selection and keyboard events in order to further improve the heuristics quality.
Comment 1 Pavel Feldman 2012-11-12 00:02:44 PST
Created attachment 173575 [details]
[Patch] Straw man, not for landing
Comment 2 Pavel Feldman 2012-11-13 10:25:10 PST
Created attachment 173920 [details]
Patch
Comment 3 Pavel Feldman 2012-11-13 10:28:35 PST
Created attachment 173921 [details]
Patch
Comment 4 Vsevolod Vlasov 2012-11-14 01:33:29 PST
Comment on attachment 173921 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=173921&action=review

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:473
> +        return this._mainPanel._lastSelection;

There are still some _lastSelection usages in editor, r- for that.

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2153
> +        var isBackspace = this._keyDownCode === WebInspector.KeyboardShortcut.Keys.Backspace.code;

Delete?

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2165
> +        var range = this._lastSelection.clone();

backwards selection?
Comment 5 Pavel Feldman 2012-11-14 01:58:52 PST
Created attachment 174114 [details]
Patch
Comment 6 Vsevolod Vlasov 2012-11-14 02:26:56 PST
Comment on attachment 174114 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=174114&action=review

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2192
> +    {console.log(1);

please remove
Comment 7 Pavel Feldman 2012-11-14 03:33:26 PST
Committed r134591: <http://trac.webkit.org/changeset/134591>
Comment 8 Vsevolod Vlasov 2012-11-14 05:09:04 PST
Comment on attachment 174114 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=174114&action=review

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2192
> +    {console.log(1);

please remove
Comment 9 Vsevolod Vlasov 2012-11-14 05:09:21 PST
Comment on attachment 174114 [details]
Patch

oops