Bug 1310796 part 4. Get rid of 'content-targetable' values for the 'type' attribute everywhere except tabbrowser.xml. Just use 'content' instead. r=gijs
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 08 Dec 2016 16:41:45 -1000
changeset 325474 6395d5edfd1577daeaa0786edf98ec9977c47e51
parent 325473 110d3d8ffb949e22bd9250c56a49ffc0db0596bb
child 325475 deadb8cb73efabd29a9bb357319c7caddfd212be
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersgijs
bugs1310796
milestone53.0a1
Bug 1310796 part 4. Get rid of 'content-targetable' values for the 'type' attribute everywhere except tabbrowser.xml. Just use 'content' instead. r=gijs
dom/base/test/chrome/file_bug990812-1.xul
dom/base/test/chrome/file_bug990812-2.xul
dom/base/test/chrome/file_bug990812-3.xul
dom/base/test/chrome/file_bug990812-4.xul
dom/base/test/chrome/file_bug990812-5.xul
dom/base/test/chrome/file_bug990812.xul
mobile/android/chrome/content/PresentationView.xul
mobile/android/chrome/content/browser.js
toolkit/components/printing/content/printUtils.js
--- a/dom/base/test/chrome/file_bug990812-1.xul
+++ b/dom/base/test/chrome/file_bug990812-1.xul
@@ -46,17 +46,17 @@ https://bugzilla.mozilla.org/show_bug.cg
           opener.setTimeout("next()");
           window.close();
         }
       });
 
       var browser = document.createElement("browser");
       browser.setAttribute("messagemanagergroup", "test");
       browser.setAttribute("src", "about:mozilla");
-      browser.setAttribute("type", "content-targetable");
+      browser.setAttribute("type", "content");
       document.documentElement.appendChild(browser);
 
       globalMM.removeDelayedFrameScript(FRAME_SCRIPT_GLOBAL);
       messageManager.removeDelayedFrameScript(FRAME_SCRIPT_WINDOW);
       getGroupMessageManager("test").removeDelayedFrameScript(FRAME_SCRIPT_GROUP);
     }
 
   ]]></script>
--- a/dom/base/test/chrome/file_bug990812-2.xul
+++ b/dom/base/test/chrome/file_bug990812-2.xul
@@ -49,11 +49,11 @@ https://bugzilla.mozilla.org/show_bug.cg
       Promise.all([global, window, group]).then(function () {
         opener.setTimeout("next()");
         self.close();
       });
     }
 
   ]]></script>
 
-  <browser messagemanagergroup="test" type="content-targetable" src="about:mozilla" />
+  <browser messagemanagergroup="test" type="content" src="about:mozilla" />
 
 </window>
--- a/dom/base/test/chrome/file_bug990812-3.xul
+++ b/dom/base/test/chrome/file_bug990812-3.xul
@@ -60,12 +60,12 @@ https://bugzilla.mozilla.org/show_bug.cg
       Promise.all([promise1, promise2]).then(function () {
         opener.setTimeout("next()");
         window.close();
       });
     }
 
   ]]></script>
 
-  <browser messagemanagergroup="test1" type="content-targetable" src="about:mozilla" />
-  <browser messagemanagergroup="test2" type="content-targetable" src="about:mozilla" />
+  <browser messagemanagergroup="test1" type="content" src="about:mozilla" />
+  <browser messagemanagergroup="test2" type="content" src="about:mozilla" />
 
 </window>
--- a/dom/base/test/chrome/file_bug990812-4.xul
+++ b/dom/base/test/chrome/file_bug990812-4.xul
@@ -57,12 +57,12 @@ https://bugzilla.mozilla.org/show_bug.cg
       Promise.all([promise1, promise2]).then(function () {
         opener.setTimeout("next()");
         window.close();
       });
     }
 
   ]]></script>
 
-  <browser messagemanagergroup="test1" type="content-targetable" src="about:mozilla" />
-  <browser messagemanagergroup="test2" type="content-targetable" src="about:mozilla" />
+  <browser messagemanagergroup="test1" type="content" src="about:mozilla" />
+  <browser messagemanagergroup="test2" type="content" src="about:mozilla" />
 
 </window>
--- a/dom/base/test/chrome/file_bug990812-5.xul
+++ b/dom/base/test/chrome/file_bug990812-5.xul
@@ -63,15 +63,15 @@ https://bugzilla.mozilla.org/show_bug.cg
       Promise.all([promise1, promise2]).then(function () {
         opener.setTimeout("next()");
         window.close();
       });
     }
 
   ]]></script>
 
-  <browser messagemanagergroup="test1" type="content-targetable" src="about:mozilla" />
-  <browser messagemanagergroup="test1" type="content-targetable" src="about:mozilla" />
+  <browser messagemanagergroup="test1" type="content" src="about:mozilla" />
+  <browser messagemanagergroup="test1" type="content" src="about:mozilla" />
 
-  <browser messagemanagergroup="test2" type="content-targetable" src="about:mozilla" />
-  <browser messagemanagergroup="test2" type="content-targetable" src="about:mozilla" />
+  <browser messagemanagergroup="test2" type="content" src="about:mozilla" />
+  <browser messagemanagergroup="test2" type="content" src="about:mozilla" />
 
 </window>
--- a/dom/base/test/chrome/file_bug990812.xul
+++ b/dom/base/test/chrome/file_bug990812.xul
@@ -40,17 +40,17 @@ https://bugzilla.mozilla.org/show_bug.cg
           opener.setTimeout("next()");
           window.close();
         }
       });
 
       var browser = document.createElement("browser");
       browser.setAttribute("messagemanagergroup", "test");
       browser.setAttribute("src", "about:mozilla");
-      browser.setAttribute("type", "content-targetable");
+      browser.setAttribute("type", "content");
       document.documentElement.appendChild(browser);
 
       globalMM.removeDelayedFrameScript(FRAME_SCRIPT_GLOBAL);
       messageManager.removeDelayedFrameScript(FRAME_SCRIPT_WINDOW);
       getGroupMessageManager("test").removeDelayedFrameScript(FRAME_SCRIPT_GROUP);
     }
 
   ]]></script>
--- a/mobile/android/chrome/content/PresentationView.xul
+++ b/mobile/android/chrome/content/PresentationView.xul
@@ -4,12 +4,12 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <window id="presentation-window"
         onload="PresentationView.startup();"
         onunload="PresentationView.stop();"
         windowtype="navigator:browser"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-  <browser id="content" type="content-targetable" src="about:blank" flex="1"/>
+  <browser id="content" type="content" src="about:blank" flex="1"/>
 
   <script type="application/javascript" src="chrome://browser/content/PresentationView.js"/>
 </window>
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3413,17 +3413,17 @@ function truncate(text, max) {
 Tab.prototype = {
   create: function(aURL, aParams) {
     if (this.browser)
       return;
 
     aParams = aParams || {};
 
     this.browser = document.createElement("browser");
-    this.browser.setAttribute("type", "content-targetable");
+    this.browser.setAttribute("type", "content");
     this.browser.setAttribute("messagemanagergroup", "browsers");
 
     if (Preferences.get("browser.tabs.remote.force-enable", false)) {
       this.browser.setAttribute("remote", "true");
     }
 
     this.browser.permanentKey = {};
 
@@ -3672,17 +3672,17 @@ Tab.prototype = {
 
     if (aActive) {
       this.browser.setAttribute("type", "content-primary");
       this.browser.focus();
       this.browser.docShellIsActive = true;
       Reader.updatePageAction(this);
       ExternalApps.updatePageAction(this.browser.currentURI, this.browser.contentDocument);
     } else {
-      this.browser.setAttribute("type", "content-targetable");
+      this.browser.setAttribute("type", "content");
       this.browser.docShellIsActive = false;
       this.browser.blur();
     }
   },
 
   getActive: function getActive() {
     return this.browser.docShellIsActive;
   },
--- a/toolkit/components/printing/content/printUtils.js
+++ b/toolkit/components/printing/content/printUtils.js
@@ -15,18 +15,17 @@
  *
  * To compound that, we need to support remote browsers, and that means
  * kicking off the print jobs in the content process. This means we send
  * messages back and forth to that process. browser-content.js contains
  * the object that listens and responds to the messages that PrintUtils
  * sends.
  *
  * This also means that <xul:browser>'s that hope to use PrintUtils must have
- * their type attribute set to either "content", "content-targetable", or
- * "content-primary".
+ * their type attribute set to either "content" or "content-primary".
  *
  * PrintUtils sends messages at different points in its implementation, but
  * their documentation is consolidated here for ease-of-access.
  *
  *
  * Messages sent:
  *
  *   Printing:Print
@@ -161,23 +160,23 @@ var PrintUtils = {
   /**
    * Initializes print preview.
    *
    * @param aListenerObj
    *        An object that defines the following functions:
    *
    *        getPrintPreviewBrowser:
    *          Returns the <xul:browser> to display the print preview in. This
-   *          <xul:browser> must have its type attribute set to "content",
-   *          "content-targetable", or "content-primary".
+   *          <xul:browser> must have its type attribute set to "content" or
+   *          "content-primary".
    *
    *        getSourceBrowser:
    *          Returns the <xul:browser> that contains the document being
    *          printed. This <xul:browser> must have its type attribute set to
-   *          "content", "content-targetable", or "content-primary".
+   *          "content" or "content-primary".
    *
    *        getNavToolbox:
    *          Returns the primary toolbox for this window.
    *
    *        onEnter:
    *          Called upon entering print preview.
    *
    *        onExit: