Bug 1410540 - Remove the 'viewbutton' XBL binding and pageInfo.xml;r=dao draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 08 Nov 2017 12:26:31 -0800
changeset 695119 66cf2e302e8e095f4d9f77228d721673c70a40e2
parent 695118 9bc01aa77d737419f94d4b66c09d8ca653d9a831
child 695120 2c839eb5a405bc8572626e33b499e96122f5ff4b
push id88354
push userbgrinstead@mozilla.com
push dateWed, 08 Nov 2017 20:32:13 +0000
reviewersdao
bugs1410540
milestone58.0a1
Bug 1410540 - Remove the 'viewbutton' XBL binding and pageInfo.xml;r=dao Instead of creating a new binding that extends the radio binding to remove the actual radio input from the DOM, with this change we use the default radio binding and hide the radio input via CSS. MozReview-Commit-ID: GMEFinhRehU
browser/base/content/pageinfo/pageInfo.css
browser/base/content/pageinfo/pageInfo.xml
browser/base/content/pageinfo/pageInfo.xul
browser/base/jar.mn
browser/themes/linux/pageInfo.css
browser/themes/osx/pageInfo.css
browser/themes/windows/pageInfo.css
--- a/browser/base/content/pageinfo/pageInfo.css
+++ b/browser/base/content/pageinfo/pageInfo.css
@@ -1,17 +1,23 @@
 /* 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/. */
 
+#viewGroup > radio > .radio-label-box {
+  -moz-box-orient: vertical;
+  -moz-box-align: center;
+}
 
-#viewGroup > radio {
-  -moz-binding: url("chrome://browser/content/pageinfo/pageInfo.xml#viewbutton");
+/* Hide the radio button for the section headers */
+#viewGroup > radio > .radio-check {
+  display: none;
 }
 
+
 richlistitem[feed] {
   -moz-binding: url("chrome://browser/content/pageinfo/feeds.xml#feed");
 }
 
 richlistitem[feed]:not([selected="true"]) .feed-subscribe {
   display: none;
 }
 
deleted file mode 100644
--- a/browser/base/content/pageinfo/pageInfo.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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/. -->
-
-
-<bindings id="pageInfoBindings"
-          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">
-
-  <!-- based on preferences.xml paneButton -->
-  <binding id="viewbutton" extends="chrome://global/content/bindings/radio.xml#radio" role="xullistitem">
-    <content>
-      <xul:image class="viewButtonIcon" xbl:inherits="src"/>
-      <xul:label class="viewButtonLabel" xbl:inherits="value=label"/>
-    </content>
-  </binding>
-
-</bindings>
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -76,17 +76,16 @@
       <radio id="mediaTab"    label="&mediaTab;"    accesskey="&mediaTab.accesskey;"
            oncommand="showTab('media');" hidden="true"/>
       <radio id="feedTab"     label="&feedTab;"     accesskey="&feedTab.accesskey;"
            oncommand="showTab('feed');" hidden="true"/>
       <radio id="permTab"     label="&permTab;"     accesskey="&permTab.accesskey;"
            oncommand="showTab('perm');"/>
       <radio id="securityTab" label="&securityTab;" accesskey="&securityTab.accesskey;"
            oncommand="showTab('security');"/>
-      <!-- Others added by overlay -->
     </radiogroup>
   </windowdragbox>
 
   <deck id="mainDeck" flex="1">
     <!-- General page information -->
     <vbox id="generalPanel">
       <grid id="generalGrid">
         <columns>
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -108,17 +108,16 @@ browser.jar:
         content/browser/defaultthemes/light.icon.svg (content/defaultthemes/light.icon.svg)
         content/browser/newtab/newTab.xhtml           (content/newtab/newTab.xhtml)
 *       content/browser/newtab/newTab.js              (content/newtab/newTab.js)
         content/browser/newtab/newTab.css             (content/newtab/newTab.css)
         content/browser/newtab/alternativeDefaultSites.json   (content/newtab/alternativeDefaultSites.json)
 *       content/browser/pageinfo/pageInfo.xul         (content/pageinfo/pageInfo.xul)
         content/browser/pageinfo/pageInfo.js          (content/pageinfo/pageInfo.js)
         content/browser/pageinfo/pageInfo.css         (content/pageinfo/pageInfo.css)
-        content/browser/pageinfo/pageInfo.xml         (content/pageinfo/pageInfo.xml)
         content/browser/pageinfo/feeds.js             (content/pageinfo/feeds.js)
         content/browser/pageinfo/feeds.xml            (content/pageinfo/feeds.xml)
         content/browser/pageinfo/permissions.js       (content/pageinfo/permissions.js)
         content/browser/pageinfo/security.js          (content/pageinfo/security.js)
         content/browser/robot.ico                     (content/robot.ico)
         content/browser/static-robot.png              (content/static-robot.png)
         content/browser/safeMode.css                  (content/safeMode.css)
         content/browser/safeMode.js                   (content/safeMode.js)
--- a/browser/themes/linux/pageInfo.css
+++ b/browser/themes/linux/pageInfo.css
@@ -4,18 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 %endif
 
 @import url("chrome://global/skin/");
 
 /* View buttons */
 #viewGroup > radio {
   list-style-image: url("chrome://browser/skin/pageInfo.png");
-  -moz-box-orient: vertical;
-  -moz-box-align: center;
   -moz-appearance: none;
   min-width: 4.5em;
   margin: 0;
   padding: 3px;
   color: -moz-FieldText;
 }
 
 #viewGroup > radio[selected="true"] {
--- a/browser/themes/osx/pageInfo.css
+++ b/browser/themes/osx/pageInfo.css
@@ -2,22 +2,16 @@
  * 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/. */
 
 @import "chrome://global/skin/";
 
 /* View buttons */
 @import "chrome://global/skin/viewbuttons.css";
 
-/* Extensions will provide icons because the view buttons have icons
-   on the windows and linux themes. We don't want to display them */
-.viewButtonIcon {
-  display: none;
-}
-
 deck {
   padding: 10px 10px 10px 10px;
 }
 
 /* Misc */
 tree {
   margin: .5em;
 }
--- a/browser/themes/windows/pageInfo.css
+++ b/browser/themes/windows/pageInfo.css
@@ -6,18 +6,16 @@
 
 /* View buttons */
 #viewGroup {
   padding-inline-start: 10px;
 }
 
 #viewGroup > radio {
   list-style-image: url("chrome://browser/skin/pageInfo.png");
-  -moz-box-orient: vertical;
-  -moz-box-align: center;
   -moz-appearance: none;
   padding: 5px 3px 1px 3px;
   margin: 0 1px;
   min-width: 4.5em;
 }
 
 #viewGroup > radio:hover {
   background-color: #E0E8F6;