Bug 79912

Summary: Web Inspector: Implement suggestions in Watch Expressions
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, dglazkov, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch pfeldman: review+, webkit.review.bot: commit-queue-

Description Alexander Pavlov (apavlov) 2012-02-29 07:31:09 PST
Patch to follow.
Comment 1 Alexander Pavlov (apavlov) 2012-03-01 05:38:57 PST
Created attachment 129686 [details]
Patch
Comment 2 Yury Semikhatsky 2012-03-01 07:05:06 PST
Comment on attachment 129686 [details]
Patch

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

> Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js:419
> +    const ExpressionStopCharacters = " =:[({;,!+-*/&|^<>."; // Same as in ConsoleView.js + "."

Can we expose a constant on ConsoleView.js ?
Comment 3 Pavel Feldman 2012-03-01 07:06:01 PST
Comment on attachment 129686 [details]
Patch

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

> Source/WebCore/inspector/front-end/ConsoleView.js:345
> +    completionsForElement: function(promptElement, wordRange, force, completionsReadyCallback)

This looks like a bad design. TextPrompt should pass itself or its element into the callback.

> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:324
> +        this.update();

Why did this change?

> Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js:361
> +        this._prompt = new WebInspector.WatchExpressionPrompt(this.editingCommitted.bind(this, null, this.nameElement.textContent, context.previousContent, context), this.editingCancelled.bind(this, null, context));

This seems wrong: you bind this and this's properties such as nameElement, context.previousContent, etc.

> Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js:396
> +        WebInspector.ObjectPropertyTreeElement.prototype.editingEnded.call(this, context);

Why do we need this? It would be great if ObjectPropertyTreeElement supported the same functionality.

> Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js:419
> +    const ExpressionStopCharacters = " =:[({;,!+-*/&|^<>."; // Same as in ConsoleView.js + "."

Move to a common place?
Comment 4 Alexander Pavlov (apavlov) 2012-03-01 10:23:41 PST
Created attachment 129724 [details]
Patch
Comment 5 WebKit Review Bot 2012-03-01 11:14:58 PST
Comment on attachment 129724 [details]
Patch

Attachment 129724 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11766564

New failing tests:
fast/workers/storage/use-same-database-in-page-and-workers.html
Comment 6 Alexander Pavlov (apavlov) 2012-03-02 03:17:15 PST
Committed r109545: <http://trac.webkit.org/changeset/109545>