Bug 72388 - Web Inspector: [Extensions API] drop ExtensionSidebarPane.onUpdated, use callbacks instead
Summary: Web Inspector: [Extensions API] drop ExtensionSidebarPane.onUpdated, use call...
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: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 08:02 PST by Andrey Kosyakov
Modified: 2011-11-16 05:03 PST (History)
9 users (show)

See Also:


Attachments
Patch (29.28 KB, patch)
2011-11-15 08:06 PST, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-11-15 08:02:29 PST
- fire ExtensionSidebarPane.on{Hidden,Shown} for non-iframe content (experssions/objects);
- drop ExtensionsSidebarPane.onUpdated, provide callback for setObject()/setExpression() instead;
- split LayoutTests/inspector/extensions.html into extensions-panel.html & extensions-sidebar.html.
Comment 1 Andrey Kosyakov 2011-11-15 08:06:28 PST
Created attachment 115167 [details]
Patch
Comment 2 Pavel Feldman 2011-11-16 00:18:21 PST
Comment on attachment 115167 [details]
Patch

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

> Source/WebCore/inspector/front-end/ExtensionPanel.js:84
> +WebInspector.ExtensionNotifierView = function(id)

You should probably make this a superclass of the ExtensionView.

> Source/WebCore/inspector/front-end/ExtensionPanel.js:183
> +    setObject: function(object, title, callback)

Drive-by: you should start annotating your code.

> Source/WebCore/inspector/front-end/ExtensionPanel.js:215
> +    _makeObjectPropertiesView: function()

_createObjectPropertiesView

> Source/WebCore/inspector/front-end/ExtensionPanel.js:231
> +            callback("operation cancelled");

What does "operation cancelled" mean for the client? Annotating this callback would give me a clue.

> Source/WebCore/inspector/front-end/ExtensionServer.js:234
> +            var result = error ? this._status.E_FAILED(error) : this._status.OK();

aha. so non-empty is error string.

> Source/WebCore/inspector/front-end/View.js:173
> +    detach: function(force)

force -> overrideHideOnDetach
Comment 3 Andrey Kosyakov 2011-11-16 04:56:46 PST
Committed r100433: <http://trac.webkit.org/changeset/100433>
Comment 4 Andrey Kosyakov 2011-11-16 05:03:35 PST
(In reply to comment #2)

> > Source/WebCore/inspector/front-end/ExtensionPanel.js:84
> > +WebInspector.ExtensionNotifierView = function(id)
> 
> You should probably make this a superclass of the ExtensionView.

I've started with doing exactly this, then realized they won't even share a single method implementation due to checks for _frameIndex being present in willHide()/willShow().


> > Source/WebCore/inspector/front-end/ExtensionPanel.js:183
> > +    setObject: function(object, title, callback)
> 
> Drive-by: you should start annotating your code.

Done for entire ExtensionsPanel.js

> > Source/WebCore/inspector/front-end/ExtensionPanel.js:215
> > +    _makeObjectPropertiesView: function()
> 
> _createObjectPropertiesView

Done.

> > Source/WebCore/inspector/front-end/ExtensionPanel.js:231
> > +            callback("operation cancelled");
> 
> What does "operation cancelled" mean for the client? Annotating this callback would give me a clue.

Unfortunately it won't -- we can't specify parameter names in type annotation of callbacks.

> > Source/WebCore/inspector/front-end/View.js:173
> > +    detach: function(force)
> 
> force -> overrideHideOnDetach

Done.