зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
caaec2fc86
Коммит
6df3b1fe3c
|
@ -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"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче