Closed
Bug 613718
Opened 14 years ago
Closed 14 years ago
Add Copy URI and View File to XBL Bindings Viewer
Categories
(Other Applications :: DOM Inspector, enhancement)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: crussell, Assigned: crussell)
References
Details
Attachments
(2 files, 3 obsolete files)
13.48 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
9.42 KB,
patch
|
neil
:
review+
crussell
:
feedback+
|
Details | Diff | Splinter Review |
This adds a shared menupopup containing Copy URI and View File to the bindings menulist, its menupopup, and the tree in the Resources tab.
Assignee | ||
Comment 1•14 years ago
|
||
Attachment creation failed there for some reason.
Comment 2•14 years ago
|
||
What's the difference between aController.contextNode and document.popupNode?
Comment 3•14 years ago
|
||
Also, should the #anchor (if any) get trimmed from the binding URI?
Comment 4•14 years ago
|
||
(for View File at least; Copy URI is probably OK.)
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #2)
> What's the difference between aController.contextNode and document.popupNode?
That the latter was causing me trouble at one point, to which I chalked it up to a race condition (that I no longer happen to be able to reproduce anymore).
> Also, should the #anchor (if any) get trimmed from the binding URI?
> (for View File at least; Copy URI is probably OK.)
For Copy URI, I'd say the hash string is desirable, even. I left it alone for View File because it didn't seem to make sense to write something extra to get rid of it ff it already works.
Attachment #492044 -
Attachment is obsolete: true
Attachment #492115 -
Flags: review?(neil)
Attachment #492044 -
Flags: review?(neil)
Comment 6•14 years ago
|
||
Comment on attachment 492115 [details] [diff] [review]
use document.popupNode in the BindingsListController transactions
>+ this.mTree = aTree;
[You only ever use the view, so might be worth caching that here instead?]
>+ this.wrappedJSObject = this;
[I wish there was a better way...]
Attachment #492115 -
Flags: review?(neil) → review+
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
> >+ this.wrappedJSObject = this;
> [I wish there was a better way...]
Attachment #492207 -
Flags: review?(neil)
Comment 8•14 years ago
|
||
Comment on attachment 492207 [details] [diff] [review]
followup to 492115: eliminating wrappedJSObject variant 1 - overriding setTree to initialize a reference to the controller
>+ResourceTreeView.prototype.setTree = function RTV_SetTree(aTreeBoxObject)
I guess you're lucky that inBaseTreeView doesn't use its mTree.
Comment 9•14 years ago
|
||
Comment on attachment 492207 [details] [diff] [review]
followup to 492115: eliminating wrappedJSObject variant 1 - overriding setTree to initialize a reference to the controller
Perhaps you could set it in displayResources instead?
Assignee | ||
Comment 10•14 years ago
|
||
Here's another variant that I was going to go with before.
(In reply to comment #8)
> I guess you're lucky that inBaseTreeView doesn't use its mTree.
(In reply to comment #9)
> Perhaps you could set it in displayResources instead?
Or I could just add the line
this.mTree = aTreeBoxObject;
to RTV_SetTree.
Attachment #492222 -
Flags: feedback?(neil)
Comment 11•14 years ago
|
||
Comment on attachment 492222 [details] [diff] [review]
followup to 492115: eliminating wrappedJSObject variant 2 - Expose accessors for cached views
So, do the other panels cache their views?
Assignee | ||
Comment 12•14 years ago
|
||
What do you mean? I don't know which one you're excluding (with "other"), but all tree views get cached in attachment 492222 [details] [diff] [review]. The content view is created and cached in the XBLBindingsViewer constructor, the rest are created and cached in displayMethods, displayProperties, displayHandlers, and displayResources.
Comment 13•14 years ago
|
||
Sorry, I meant viewers, not panels. No wonder you were confused.
Assignee | ||
Comment 14•14 years ago
|
||
Yes—at least the dom, domNode, stylesheets, styleRules, and computedStyle viewers do (I don't know and didn't check the accessibility viewers, and the jsObject viewer uses a content tree). They keep a field, but they don't expose them with a public-looking accessor.
Assignee | ||
Comment 15•14 years ago
|
||
The difference here is that none of the other viewers really need public accessors, because they don't use controllers to handle commands/transactions. The styleRules viewer wants to; it uses a focus event listener and the mFocusedTree field to discriminate in isCommandEnabled, for example.
Comment 16•14 years ago
|
||
Comment on attachment 492222 [details] [diff] [review]
followup to 492115: eliminating wrappedJSObject variant 2 - Expose accessors for cached views
>+ contentView.whatToShow &= ~(NodeFilter.SHOW_TEXT);
[The ()s hardly seem necessary...]
Attachment #492222 -
Flags: feedback?(neil) → feedback+
Assignee | ||
Updated•14 years ago
|
Attachment #492207 -
Attachment is obsolete: true
Attachment #492207 -
Flags: review?(neil)
Assignee | ||
Comment 17•14 years ago
|
||
Comment on attachment 492222 [details] [diff] [review]
This was supposed to be an alternative approach used in lieu of the one in attachment 492207 [details] [diff] [review]. Can I count feedback+ as review+ here?
Assignee | ||
Comment 18•14 years ago
|
||
I don't know if you're receiving bugmail for this, Neil. I didn't think to check last night when I modified the bug.
Assignee | ||
Comment 19•14 years ago
|
||
Neil, can I get a clarification on this? I added attachment 492207 [details] [diff] [review] with r? and then added attachment 492222 [details] [diff] [review] with feedback?. You gave 492222 feedback+. It was supposed to be an alternate approach to 492207, so, given feedback+, I took that to mean it was preferable. I removed the r? flag on 492207, but I need to know if I can count that feedback+ on 492222 as r+.
Comment 20•14 years ago
|
||
(In reply to comment #19)
> Neil, can I get a clarification on this? I added attachment 492207 [details] [diff] [review] with r? and
> then added attachment 492222 [details] [diff] [review] with feedback?. You gave 492222 feedback+. It
> was supposed to be an alternate approach to 492207, so, given feedback+, I took
> that to mean it was preferable. I removed the r? flag on 492207, but I need to
> know if I can count that feedback+ on 492222 as r+.
492222 is preferable to 492207. I'm undecided as to whether it's preferable to 492115. I can't remember whether I reviewed it properly or not.
Comment 21•14 years ago
|
||
Huh, I can't get this to apply any more. What am I doing wrong?
Assignee | ||
Comment 22•14 years ago
|
||
(In reply to comment #20)
> 492222 is preferable to 492207. I'm undecided as to whether it's preferable to
> 492115. I can't remember whether I reviewed it properly or not.
(In reply to comment #21)
> Huh, I can't get this to apply any more. What am I doing wrong?
492222/492207 aren't supposed to replace 492115. 492222/492207 are two different approaches to eliminate the use of wrappedJSObject in 492115. 492115 should precede each when applying. For whichever one gets r+, I'll merge it with 492115 into the same patch before I push.
Assignee | ||
Updated•14 years ago
|
Attachment #492222 -
Attachment description: Expose accessors for cached views → followup to 492115: eliminating wrappedJSObject variant 2 - Expose accessors for cached views
Assignee | ||
Comment 23•14 years ago
|
||
Comment on attachment 492207 [details] [diff] [review]
followup to 492115: eliminating wrappedJSObject variant 1 - overriding setTree to initialize a reference to the controller
(In reply to comment #10)
> (In reply to comment #8)
> > I guess you're lucky that inBaseTreeView doesn't use its mTree.
...
> Or I could just add the line
>
> this.mTree = aTreeBoxObject;
>
> to RTV_SetTree.
Or I could've done inBaseTreeView.prototype.setTree.apply(this, arguments), which would be a little more "proper".
Attachment #492207 -
Attachment description: don't expose ResourceTreeView implementation through wrappedJSObject → followup to 492115: eliminating wrappedJSObject variant 2 - overriding setTree to initialize a reference to the controller
Assignee | ||
Updated•14 years ago
|
Attachment #492207 -
Attachment description: followup to 492115: eliminating wrappedJSObject variant 2 - overriding setTree to initialize a reference to the controller → followup to 492115: eliminating wrappedJSObject variant 1 - overriding setTree to initialize a reference to the controller
Assignee | ||
Comment 24•14 years ago
|
||
I just noticed that with 492222, I didn't remove the aController arg in the the Resource tree controller command constructors.
Attachment #492222 -
Attachment is obsolete: true
Attachment #499700 -
Flags: review?(neil)
Attachment #499700 -
Flags: feedback+
Updated•14 years ago
|
Attachment #499700 -
Flags: review?(neil) → review+
Assignee | ||
Comment 25•14 years ago
|
||
Pushed:
http://hg.mozilla.org/dom-inspector/rev/9e42bcbfc4fe
http://hg.mozilla.org/dom-inspector/rev/dcb31acffaef
I didn't merge them into the same patch, just because.
You need to log in
before you can comment on or make changes to this bug.
Description
•