Bug 1324899 - Port
bug 1322414 (remove content-primary) to DOM Inspector. r=Ratty
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,17 +6,17 @@
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-DOMi_VERSION = 2.0.17pre
+DOMi_VERSION = 2.0.17.0
XPI_NAME = inspector
INSTALL_EXTENSION_ID = inspector@mozilla.org
XPI_PKGNAME = inspector-$(DOMi_VERSION)
DIST_FILES = install.rdf
DEFINES += -DDOMi_VERSION=$(DOMi_VERSION)
--- a/install.rdf
+++ b/install.rdf
@@ -18,45 +18,45 @@
use '(x)a1' (*-central) on default,
and '(x-1).*' (*-aurora/beta/release) for branches. -->
<!-- Fennec -->
<em:targetApplication>
<Description>
<em:id>{a23983c0-fd0e-11dc-95ff-0800200c9a66}</em:id>
<em:minVersion>4.0</em:minVersion>
- <em:maxVersion>41.0</em:maxVersion>
+ <em:maxVersion>53.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Firefox
3.0 is Gecko 1.9.0
3.5 is Gecko 1.9.1
3.6 is Gecko 1.9.2
4.0 is Gecko 2.0
5.0 is Gecko 5.0
x.0 is Gecko x.0, where x is greater than 5 -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>4.0</em:minVersion>
- <em:maxVersion>41.0.0</em:maxVersion>
+ <em:maxVersion>53.0.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- SeaMonkey
2.0 is Gecko 1.9.1
2.1 is Gecko 2.0
2.2 is Gecko 5.0
2.x is Gecko (x+3).0, where x is greater than 2 -->
<em:targetApplication>
<Description>
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.1</em:minVersion>
- <em:maxVersion>2.38</em:maxVersion>
+ <em:maxVersion>2.50</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Pale Moon -->
<em:targetApplication>
<Description>
<em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
<em:minVersion>25.0</em:minVersion>
@@ -77,27 +77,27 @@
3.0 is Gecko 1.9.1
3.1 is Gecko 1.9.2
5.0 is Gecko 5.0
x.0 is Gecko x.0, where x is greater than 5 -->
<em:targetApplication>
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>4.0</em:minVersion>
- <em:maxVersion>41.0</em:maxVersion>
+ <em:maxVersion>53.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Gecko Toolkit
version 2.0.0 and higher -->
<em:targetApplication>
<Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>2.0</em:minVersion>
- <em:maxVersion>41.0</em:maxVersion>
+ <em:maxVersion>53.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- front-end metadata -->
<em:name>DOM Inspector</em:name>
<em:description>Inspects the structure and properties of a window and its contents.</em:description>
<em:creator>mozilla.org</em:creator>
<em:homepageURL>http://www.mozilla.org/projects/inspector/</em:homepageURL>
--- a/resources/content/inspector.js
+++ b/resources/content/inspector.js
@@ -2,16 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*****************************************************************************
* InspectorApp ---------------------------------------------------------------
* The primary object that controls the Inspector application.
*****************************************************************************/
+Components.utils.import("resource://gre/modules/Services.jsm");
+
//////////////////////////////////////////////////////////////////////////////
//// Global Variables
var inspector;
//////////////////////////////////////////////////////////////////////////////
//// Global Constants
@@ -58,16 +60,23 @@ function InspectorApp_initialize()
initURI = window.arguments[0];
}
else if (window.arguments[0] instanceof Components.interfaces.nsIDOMNode) {
initNode = window.arguments[0];
}
}
inspector.initialize(initNode, initURI);
+ // Fix up content primary for older versions.
+ // See bug 1324899.
+ if (Services.vc.compare(Services.appinfo.platformVersion, "53.0a1") < 0) {
+ document.getElementById("ifBrowser").setAttribute("type",
+ "content-primary");
+ }
+
// Enable/disable Mac outlier keys.
if (kIsMac) {
document.getElementById("keyEnterLocation2").setAttribute("disabled",
"true");
}
else {
document.getElementById("keyEditDeleteMac").setAttribute("disabled",
"true");
--- a/resources/content/inspectorOverlay.xul
+++ b/resources/content/inspectorOverlay.xul
@@ -46,16 +46,16 @@
linkedpanel="bxDocPanel" flex="1" persist="width"/>
</domi-panelset>
<splitter id="splBrowser" class="titled-splitter"
onopen="inspector.onSplitterOpen(this)"
label="&browserPanel.label;" collapse="after"/>
<hbox id="bxBrowser" flex="1">
- <browser id="ifBrowser" type="content-primary"
+ <browser id="ifBrowser" type="content" primary="true"
disablehistory="true" disablesecurity="true"
flex="1" src="about:blank"/>
</hbox>
</vbox>
</overlay>