Bug 331828: Can't inspect windows using DOMi on Mac, patch by Phil Ringnalda <philringnalda@gmail.com>, r=timeless, sr=neil

This commit is contained in:
gavin%gavinsharp.com 2006-07-02 22:01:10 +00:00
Родитель caaec2fc86
Коммит 6df3b1fe3c
2 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -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") {

Просмотреть файл

@ -29,8 +29,8 @@
<menupopup id="menu_FilePopup">
<menu oncommand="inspector.setTargetDocument(event.target.doc);" id="mnInspectDocumentFile" label="&mnInspectDocument.label;"
accesskey="&mnInspectDocument.accesskey;">
<menupopup id="listDocuments-popup" onpopupshowing="inspector.showInspectDocumentList()"
onpopuphiding="inspector.emptyChildren(this);"/>
<menupopup id="listDocuments-popup"
onpopupshowing="inspector.showInspectDocumentList()"/>
</menu>
<menuitem label="&cmdShowOpenURLDialog.label;" accesskey="&cmdShowOpenURLDialog.accesskey;"
observes="cmdShowOpenURLDialog"/>