Closed Bug 201585 Opened 23 years ago Closed 22 years ago

[FIXr]inIDOMView should expose contentDocument nodes

Categories

(Other Applications :: DOM Inspector, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.5alpha

People

(Reporter: WeirdAl, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

We really should be able to see the #document nodes for an html:iframe, xul:iframe, xul:editor, or xul:browser element in the dom.xul tree view. Exposing them also gives us a couple other benefits as well, such as a Stylesheets panel (left side) which lets you choose first by document and then by stylesheet to set the subject CSSStyleSheet of the right panel.
Blocks: 201586
No longer blocks: 201586
OS: Windows 98 → All
Priority: -- → P2
Hardware: PC → All
Summary: inIDOMView should expose contentDocument nodes → [FIX]inIDOMView should expose contentDocument nodes
Target Milestone: --- → mozilla1.5alpha
Attachment #120154 - Flags: superreview?(alecf)
Attachment #120154 - Flags: review?(caillon)
Blocks: 201586
No longer depends on: 156072
- nsCOMPtr<nsIDOMAttr> attr = do_QueryInterface(aNode, &rv); - if (NS_FAILED(rv)) { + nsCOMPtr<nsIDOMAttr> attr = do_QueryInterface(aNode); + if (attr) { That should be !attr, of course....
Comment on attachment 120154 [details] [diff] [review] most of this is nsCOMArray stuff; the actual change is in not getting the document's kids. awesome! sr=alecf
Attachment #120154 - Flags: superreview?(alecf) → superreview+
Comment on attachment 120154 [details] [diff] [review] most of this is nsCOMArray stuff; the actual change is in not getting the document's kids. istr another bug about this sort of thing that was already open, but maybe not. nice work, either way. r=caillon.
Attachment #120154 - Flags: review?(caillon) → review+
WeirdAl, could you mark a dependency on whatever bug has that patch to make the right-hand panel not suck when a document is selected? This patch can't land till that lands.
Summary: [FIX]inIDOMView should expose contentDocument nodes → [FIXr]inIDOMView should expose contentDocument nodes
Good point, bz; hadn't occured to me. Bug 156072 has the patch for viewer- registry.rdf. Welcome back, Chris. :)
Depends on: 156072
Ah right. bug 156072 is the bug I was thinking about in comment 4.
Attached patch Slight updateSplinter Review
I had to update some people who assumed that there was nothing in the tree between a documentElement and its document's container... But that's all happy now.
Attachment #126215 - Flags: review?(caillon)
Comment on attachment 126215 [details] [diff] [review] Slight update >@@ -998,26 +1003,23 @@ inDOMView::RemoveAllNodes() > void > inDOMView::ExpandNode(PRInt32 aRow) > { > inDOMViewNode* node = nsnull; > RowToNode(aRow, &node); > >- nsCOMPtr<nsISupportsArray> kids; >- inDOMView::GetChildNodesFor(node ? node->node : mRootNode, getter_AddRefs(kids)); >- PRUint32 kidCount; >- kids->Count(&kidCount); >+ nsCOMArray<nsIDOMNode> kids; >+ GetChildNodesFor(node ? node->node : mRootNode, kids); For clarity's sake, please put |kids| on its own line in the above function call? >Index: extensions/inspector/base/src/inDOMView.h >=================================================================== >RCS file: /cvsroot/mozilla/extensions/inspector/base/src/inDOMView.h,v >retrieving revision 1.10 >diff -p -u -6 -r1.10 inDOMView.h >--- extensions/inspector/base/src/inDOMView.h 19 Jan 2003 02:37:50 -0000 1.10 >+++ extensions/inspector/base/src/inDOMView.h 22 Jun 2003 07:46:53 -0000 >@@ -45,26 +45,27 @@ > #include "nsITreeView.h" > #include "nsITreeSelection.h" > #include "nsIDocumentObserver.h" > #include "nsIDOMNode.h" > #include "nsIDOMDocument.h" > #include "nsVoidArray.h" Do we still need the |#include nsVoidArray.h| ? >+#include "nsCOMArray.h" > >Index: extensions/inspector/base/src/inDeepTreeWalker.h >=================================================================== >RCS file: /cvsroot/mozilla/extensions/inspector/base/src/inDeepTreeWalker.h,v >retrieving revision 1.5 >diff -p -u -6 -r1.5 inDeepTreeWalker.h >--- extensions/inspector/base/src/inDeepTreeWalker.h 25 Sep 2001 23:29:32 -0000 1.5 >+++ extensions/inspector/base/src/inDeepTreeWalker.h 22 Jun 2003 07:46:53 -0000 >@@ -37,12 +37,13 @@ > * ***** END LICENSE BLOCK ***** */ > > #ifndef __inDeepTreeWalker_h___ > #define __inDeepTreeWalker_h___ > > #include "inIDeepTreeWalker.h" >+#include "inIDOMUtils.h" Can't we exploit the exciting, shiny, new capability of nsCOMPtr to forward declare here? No need for an #include here ;) > > #include "nsCOMPtr.h" > #include "nsIDOMNode.h" > #include "nsVoidArray.h" > > class inDeepTreeWalker : public inIDeepTreeWalker r=caillon with the above comments addressed.
Attachment #126215 - Flags: review?(caillon) → review+
> For clarity's sake, please put |kids| on its own line in the above function Done. > Do we still need the |#include nsVoidArray.h| ? Yes -- it's used for some non-COM objects > Can't we exploit the exciting, shiny, new capability of nsCOMPtr to forward > declare here? Done. Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Oh, that is sweet, particularly using DOM Inspector to inspect itself.
Status: RESOLVED → VERIFIED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: