Bug 1324899 - Port bug 1322414 (remove content-primary) to DOM Inspector. r=Ratty SEAMONKEY_2_48_BUILD1 SEAMONKEY_2_48_RELEASE SEAMONKEY_2_48b1_BUILD1 SEAMONKEY_2_48b1_BUILD2 SEAMONKEY_2_48b1_BUILD3 SEAMONKEY_2_48b1_BUILD4 SEAMONKEY_2_48b1_BUILD5 SEAMONKEY_2_48b1_BUILD6 SEAMONKEY_2_48b1_BUILD7 SEAMONKEY_2_48b1_RELEASE
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sun, 01 Jan 2017 13:44:46 +0100
changeset 1925 a69769cacd8dbf7b2d41ff361c25d3712c72355d
parent 1924 2fdd48d9482c78d0a7cd79322fc0de719e07653b
child 1926 ca57c796b6228d020925c3ce299ff0056739a18b
child 1927 1efb6d4f3e8e420ac82381a09d2e313e8c6bb241
child 1945 dada0e5a05898931040e8e5280b7a75c7251a404
push id787
push userfrgrahl@gmx.net
push dateSun, 01 Jan 2017 12:45:12 +0000
reviewersRatty
bugs1324899, 1322414
Bug 1324899 - Port bug 1322414 (remove content-primary) to DOM Inspector. r=Ratty
Makefile.in
install.rdf
resources/content/inspector.js
resources/content/inspectorOverlay.xul
--- 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>