Closed Bug 316295 Opened 19 years ago Closed 14 years ago

DOMViewer.rebuild thinks mDOMView is an nsITreeView

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ajschult784, Assigned: crussell)

References

Details

(Keywords: regression)

Attachments

(1 file)

With DOM Inspector in linux trunk 20051111, if I attempt to show whitespace nodes from the menu, it has no effect.  The JS Console shows:

Error: this.mDOMView.selection has no properties
Source File: chrome://inspector/content/viewers/dom/dom.js
Line: 630

This regressed between linux seamonkey trunk builds 2005091905 and 2005092005
Assignee: dom-inspector → nobody
QA Contact: timeless → dom-inspector
The original bug as reported is a dupe of bug 307255, but some lines weren't fixed in the patch for that bug (attachment 199929 [details] [diff] [review])...

I was actually going to file a bug some day on the fact that when the tree is rebuilt, it doesn't remember *all* opened nodes, but just that the node under currentIndex is visible. Turns out that's not the case; it's just that looping up to mDOMView.rowCount doesn't actually execute anything, since there's no such thing as inIDOMView::rowCount.
OS: Linux → All
Hardware: x86 → All
Summary: show whitespace nodes fails with this.mDOMView.selection has no properties → DOMViewer.rebuild thinks mDOMView is an nsITreeView
Maybe we should just QueryInterface mDOMView against nsITreeView, considering bug 307255. (Alternatively, we could change inIDOMView to derive from nsITreeView, since I don't think there are any non-tree users, but I don't think anyone has enough motivation or reason to make that kind of change from the status quo.)

Neil, I'm sr?ing you now, if that's all right.
Assignee: nobody → Sevenspade
Status: NEW → ASSIGNED
Attachment #446118 - Flags: superreview?(neil)
Attachment #446118 - Flags: review?(sdwilsh)
Comment on attachment 446118 [details] [diff] [review]
change lines expecting nsITreeView to check against mDOMTree.view instead of mDOMView [Checkin: comment 5]

This happens to work on trunk but I think only because of undefined XPConnect behaviour (as soon as someone accesses tree.view XPConnect recognises it as the same object as mDOMView and merges the two together, so to speak.)
Attachment #446118 - Flags: superreview?(neil) → superreview+
Attachment #446118 - Attachment description: change lines execting nsITreeView to check against mDOMTree.view instead of mDOMView → change lines expecting nsITreeView to check against mDOMTree.view instead of mDOMView
Comment on attachment 446118 [details] [diff] [review]
change lines expecting nsITreeView to check against mDOMTree.view instead of mDOMView [Checkin: comment 5]

r=sdwilsh
Attachment #446118 - Flags: review?(sdwilsh) → review+
Comment on attachment 446118 [details] [diff] [review]
change lines expecting nsITreeView to check against mDOMTree.view instead of mDOMView [Checkin: comment 5]

http://hg.mozilla.org/dom-inspector/rev/a0a0e7ac362e
Attachment #446118 - Attachment description: change lines expecting nsITreeView to check against mDOMTree.view instead of mDOMView → change lines expecting nsITreeView to check against mDOMTree.view instead of mDOMView [Checkin: comment 5]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: