Bug 98053 - Web Inspector: move completions calculation into RuntimeModel (part 1)
Summary: Web Inspector: move completions calculation into RuntimeModel (part 1)
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-10-01 11:35 PDT by Pavel Feldman
Modified: 2012-10-01 23:10 PDT (History)
10 users (show)

See Also:


Attachments
Patch (31.25 KB, patch)
2012-10-01 11:39 PDT, Pavel Feldman
yurys: review+
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-10-01 11:35:35 PDT
- moves current execution context state into runtime model
- moves completionsForTextPrompt and its private helpers into runtime model
- makes text prompt use generic expression stop characters by default
Comment 1 Pavel Feldman 2012-10-01 11:39:16 PDT
Created attachment 166512 [details]
Patch
Comment 2 Yury Semikhatsky 2012-10-01 22:59:25 PDT
Comment on attachment 166512 [details]
Patch

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

> Source/WebCore/inspector/front-end/RuntimeModel.js:167
> +    completionsForTextPrompt: function(textPrompt, wordRange, force, completionsReadyCallback)

Can we get rid of dependency on TextPrompt here?

> Source/WebCore/inspector/front-end/RuntimeModel.js:170
> +        var expressionRange = wordRange.startContainer.rangeOfWord(wordRange.startOffset, " =:[({;,!+-*/&|^<>", textPrompt.proxyElement, "backward");

Can you extract constant for " =:[({;,!+-*/&|^<>" and reuse it in TextPrompt?
Comment 3 Pavel Feldman 2012-10-01 23:06:28 PDT
> Can you extract constant for " =:[({;,!+-*/&|^<>" and reuse it in TextPrompt?

I am not sure why (and whether they should) correlate. I'll need to further refactor it. TextPrompt code is a mess.
Comment 4 Pavel Feldman 2012-10-01 23:10:24 PDT
Committed r130119: <http://trac.webkit.org/changeset/130119>