Bug 1442795 - Remove scale-thumb and scale-slider bindings r=enndeakin+6102
authorTimothy Guan-tin Chien <timdream@gmail.com>
Fri, 02 Mar 2018 17:03:13 -0800
changeset 462002 cff47a58fcb61f888e0af8c318720dadd5066f73
parent 462001 ceea3f9776b1887dcfe3135778b8234b38f9f0d8
child 462003 895b03babc03b3e155736fb9bb1055ec697e490e
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin
bugs1442795
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 1442795 - Remove scale-thumb and scale-slider bindings r=enndeakin+6102 Both bindings contain no content to be styled, and their own styles are applied by <resources> import from the scale binding. This patch also moves the binding rules from minimal-xul.css to xul.css, given that while <scale> is used in <videocontrols>, HTML documents containing <video> or <audio> will load the full xul.css. MozReview-Commit-ID: JrmMqsWhnhd
toolkit/content/minimal-xul.css
toolkit/content/widgets/scale.xml
toolkit/content/xul.css
--- a/toolkit/content/minimal-xul.css
+++ b/toolkit/content/minimal-xul.css
@@ -85,45 +85,32 @@ resizer {
 scrollbar[orient="horizontal"] {
   direction: ltr;
 }
 
 thumb {
   display: -moz-box !important;
 }
 
-.scale-thumb {
-  -moz-binding: url(chrome://global/content/bindings/scale.xml#scalethumb);
-}
-
 scrollbar, scrollbarbutton, scrollcorner, slider, thumb, scale {
   -moz-user-select: none;
 }
 
 scrollcorner {
   display: -moz-box !important;
 }
 
 scrollcorner[hidden="true"] {
   display: none !important;
 }
 
 scrollbar[value="hidden"] {
   visibility: hidden;
 }
 
-scale {
-  -moz-binding: url(chrome://global/content/bindings/scale.xml#scale);
-}
-
-.scale-slider {
-  -moz-binding: url(chrome://global/content/bindings/scale.xml#scaleslider);
-  -moz-user-focus: normal;
-}
-
 @media (-moz-scrollbar-start-backward: 0) {
   scrollbarbutton[sbattr="scrollbar-up-top"] {
     display: none;
   }
 }
 
 @media (-moz-scrollbar-start-forward: 0) {
   scrollbarbutton[sbattr="scrollbar-down-top"] {
--- a/toolkit/content/widgets/scale.xml
+++ b/toolkit/content/widgets/scale.xml
@@ -4,29 +4,16 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 
 <bindings id="scaleBindings"
    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="scalethumb" extends="xul:button">
-    <resources>
-      <stylesheet src="chrome://global/skin/scale.css"/>
-    </resources>
-  </binding>
-
-  <binding id="scaleslider" display="xul:slider"
-           extends="chrome://global/content/bindings/general.xml#basecontrol">
-    <resources>
-      <stylesheet src="chrome://global/skin/scale.css"/>
-    </resources>
-  </binding>
-
   <binding id="scale"
            extends="chrome://global/content/bindings/general.xml#basecontrol">
     <resources>
       <stylesheet src="chrome://global/skin/scale.css"/>
     </resources>
 
     <content align="center" pack="center">
       <xul:slider anonid="slider" class="scale-slider" snap="true" flex="1"
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -856,16 +856,27 @@ grippy {
 .tree-splitter {
   width: 0px;
   max-width: 0px;
   min-width: 0% ! important;
   min-height: 0% ! important;
   -moz-box-ordinal-group: 2147483646;
 }
 
+/********** scale **************/
+
+scale {
+  -moz-binding: url(chrome://global/content/bindings/scale.xml#scale);
+}
+
+.scale-slider {
+  -moz-binding: url(chrome://global/content/bindings/general.xml#basecontrol);
+  -moz-user-focus: normal;
+}
+
 /******** scrollbar ********/
 
 slider {
   /* This is a hint to layerization that the scrollbar thumb can never leave
      the scrollbar track. */
   overflow: hidden;
 }