From 631a73100b8204b549ebe438c458c4fc48fc13d2 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Sun, 2 Jul 2006 22:01:10 +0000 Subject: [PATCH] Bug 331828: Can't inspect windows using DOMi on Mac, patch by Phil Ringnalda , r=timeless, sr=neil git-svn-id: svn://10.0.0.236/trunk@201472 18797224-902f-48f8-a5cc-f745e15eee43 --- .../extensions/inspector/resources/content/inspector.js | 9 ++++++--- .../inspector/resources/content/popupOverlay.xul | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mozilla/extensions/inspector/resources/content/inspector.js b/mozilla/extensions/inspector/resources/content/inspector.js index c59ac1a4ff2..4888481a0f5 100644 --- a/mozilla/extensions/inspector/resources/content/inspector.js +++ b/mozilla/extensions/inspector/resources/content/inspector.js @@ -403,13 +403,16 @@ InspectorApp.prototype = } } + // Clear out any previous menu + this.emptyChildren(this.mInspectDocumentMenu); + // Now add what we found to the menu var docNumber = 0; for (var i = 0; i < contentDocs.length; i++) { this.addInspectDocumentMenuItem(contentDocs[i], ++docNumber); } if (showChrome) { - // Put a seperator in if there were content docs + // Put a separator in if there were content docs if (contentDocs.length > 0) { this.mInspectDocumentMenu.appendChild(document.createElementNS(XULNS, "menuseparator")); } @@ -663,11 +666,11 @@ InspectorApp.prototype = emptyChildren: function(aNode) { - while (aNode.childNodes.length > 0) { + while (aNode.hasChildNodes()) { aNode.removeChild(aNode.lastChild); } }, - + onSplitterOpen: function(aSplitter) { if (aSplitter.id == "splBrowser") { diff --git a/mozilla/extensions/inspector/resources/content/popupOverlay.xul b/mozilla/extensions/inspector/resources/content/popupOverlay.xul index 7fae52ceb8c..5bbbb418bc8 100644 --- a/mozilla/extensions/inspector/resources/content/popupOverlay.xul +++ b/mozilla/extensions/inspector/resources/content/popupOverlay.xul @@ -29,8 +29,8 @@ - +