Bug 1436389 - Switch xbl related files to a different method for determining their environment. r=mossop
authorMark Banner <standard8@mozilla.com>
Wed, 07 Feb 2018 16:02:25 +0000
changeset 455302 584d21820d82760e6fa6b11f046f4d3ff2aee1cc
parent 455301 098f795537450afd8e7a3040247613cf570a859b
child 455303 89b11edb7dd1ece24651f8870fc985ee1e5414ea
push id8799
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 16:46:23 +0000
treeherdermozilla-beta@15334014dc67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1436389
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1436389 - Switch xbl related files to a different method for determining their environment. r=mossop MozReview-Commit-ID: JLqFrKZykw
.eslintrc.js
browser/base/content/tabbrowser.xml
browser/base/content/urlbarBindings.xml
browser/components/search/content/search.xml
browser/components/translation/translation-infobar.xml
toolkit/components/prompts/content/tabprompts.xml
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -20,16 +20,31 @@ module.exports = {
   "overrides": [{
     // eslint-plugin-html handles eol-last slightly different - it applies to
     // each set of script tags, so we turn it off here.
     "files": "**/*.*html",
     "rules": {
       "eol-last": "off",
     }
   }, {
+    // These xbl bindings are assumed to be in the browser-window environment,
+    // we would mark it in the files, but ESLint made this more difficult with
+    // our xml processor, so we list them here. Bug 1397874 & co are working
+    // towards removing these files completely.
+    "files": [
+      "browser/base/content/tabbrowser.xml",
+      "browser/base/content/urlbarBindings.xml",
+      "browser/components/search/content/search.xml",
+      "browser/components/translation/translation-infobar.xml",
+      "toolkit/components/prompts/content/tabprompts.xml"
+    ],
+    "env": {
+      "mozilla/browser-window": true
+    }
+  },{
     // XXX Bug 1421969. These files/directories are still being fixed,
     // so turn off mozilla/use-services for them for now.
     "files": [
       "devtools/**",
       "extensions/pref/**",
       "mobile/android/**",
       "testing/**",
     ],
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1,16 +1,14 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
-<!-- eslint-env mozilla/browser-window -->
-
 <bindings id="tabBrowserBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
 
   <binding id="tabbrowser">
     <resources>
       <stylesheet src="chrome://browser/content/tabbrowser.css"/>
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -2,18 +2,16 @@
 
 <!--
 -*- Mode: HTML -*-
 This Source Code Form is subject to the terms of the Mozilla Public
 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/.
 -->
 
-<!-- eslint-env mozilla/browser-window -->
-
 <!DOCTYPE bindings [
 <!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">
 %notificationDTD;
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 %brandDTD;
 ]>
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -1,16 +1,13 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
-<!-- This file is imported into the browser window. -->
-<!-- eslint-env mozilla/browser-window -->
-
 <!-- XULCommandEvent is a specialised global. -->
 <!-- global XULCommandEvent -->
 
 <!DOCTYPE bindings [
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 ]>
 
--- a/browser/components/translation/translation-infobar.xml
+++ b/browser/components/translation/translation-infobar.xml
@@ -1,15 +1,13 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
-<!-- eslint-env mozilla/browser-window -->
-
 <!DOCTYPE bindings [
 <!ENTITY % notificationDTD SYSTEM "chrome://global/locale/notification.dtd">
 %notificationDTD;
 <!ENTITY % translationDTD SYSTEM "chrome://browser/locale/translation.dtd" >
 %translationDTD;
 ]>
 
 <bindings id="translationBindings"
--- a/toolkit/components/prompts/content/tabprompts.xml
+++ b/toolkit/components/prompts/content/tabprompts.xml
@@ -1,16 +1,15 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
 <!-- This file is imported into the browser window, and expects various variables,
      e.g. Ci, Services, to be available. -->
-<!-- eslint-env mozilla/browser-window -->
 
 <!DOCTYPE bindings [
 <!ENTITY % commonDialogDTD  SYSTEM "chrome://global/locale/commonDialog.dtd">
 <!ENTITY % dialogOverlayDTD SYSTEM "chrome://global/locale/dialogOverlay.dtd">
 %commonDialogDTD;
 %dialogOverlayDTD;
 ]>