Bug 79912 - Web Inspector: Implement suggestions in Watch Expressions
Summary: Web Inspector: Implement suggestions in Watch Expressions
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: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 07:31 PST by Alexander Pavlov (apavlov)
Modified: 2012-03-02 03:17 PST (History)
12 users (show)

See Also:


Attachments
Patch (12.58 KB, patch)
2012-03-01 05:38 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (19.19 KB, patch)
2012-03-01 10:23 PST, Alexander Pavlov (apavlov)
pfeldman: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>