Bug 1456728 - Bind an empty binding on scrollbar draft
authorTimothy Guan-tin Chien <timdream@gmail.com>
Fri, 27 Apr 2018 13:27:47 -0700
changeset 790298 fd6c5bc8684093d904fa119d42230391a29fac63
parent 788440 ccfd7b716a91241ddbc084cb7116ec561e56d5d1
push id108485
push usertimdream@gmail.com
push dateTue, 01 May 2018 22:01:59 +0000
bugs1456728
milestone61.0a1
Bug 1456728 - Bind an empty binding on scrollbar For some reason, removing the scrollbar binding triggers content process performance regression on Linux. We'll add an empty binding for now until we find the real cause. MozReview-Commit-ID: 5sonOULH1x8
toolkit/content/widgets/general.xml
toolkit/themes/osx/global/nativescrollbars.css
toolkit/themes/windows/global/xulscrollbars.css
--- a/toolkit/content/widgets/general.xml
+++ b/toolkit/content/widgets/general.xml
@@ -4,16 +4,20 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 
 <bindings id="generalBindings"
    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">
 
+  <!-- This binding is needed on <scrollbar> to prevent content process
+       startup performance regression; to be removed in bug 1458375 -->
+  <binding id="empty"/>
+
   <binding id="basecontrol">
     <implementation implements="nsIDOMXULControlElement">
       <!-- public implementation -->
       <property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
                                        else this.removeAttribute('disabled');
                                        return val;"
                                 onget="return this.getAttribute('disabled') == 'true';"/>
       <property name="tabIndex" onget="return parseInt(this.getAttribute('tabindex')) || 0"
--- a/toolkit/themes/osx/global/nativescrollbars.css
+++ b/toolkit/themes/osx/global/nativescrollbars.css
@@ -2,16 +2,17 @@
  * 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/. */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 scrollbar {
   -moz-appearance: scrollbar;
+  -moz-binding: url("chrome://global/content/bindings/general.xml#empty");
   cursor: default;
   background-color: white;
 }
 
 scrollbar[root="true"] {
   position: relative;
   z-index: 2147483647; /* largest positive value of a signed 32-bit integer */
 }
@@ -76,11 +77,12 @@ scrollcorner {
   cursor: default;
   background-color: white;
 }
 
 /* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
 @media print {
   html|div scrollbar {
     -moz-appearance: scrollbar;
+    -moz-binding: url("chrome://global/content/bindings/general.xml#empty");
     cursor: default;
   }
 }
--- a/toolkit/themes/windows/global/xulscrollbars.css
+++ b/toolkit/themes/windows/global/xulscrollbars.css
@@ -8,16 +8,17 @@
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */
 
 /* ::::: scrollbar ::::: */
 
 scrollbar {
   -moz-appearance: scrollbar-horizontal;
+  -moz-binding: url("chrome://global/content/bindings/general.xml#empty");
   cursor: default;
 }
 
 @media all and (-moz-overlay-scrollbars) {
   scrollbar[root="true"] {
     position: relative;
     z-index: 2147483647; /* largest positive value of a signed 32-bit integer */
   }
@@ -57,17 +58,17 @@ thumb[orient="horizontal"] {
 
 scrollbarbutton {
   min-width: 16px;
   min-height: 16px;
 }
 
 /* ::::: square at the corner of two scrollbars ::::: */
 
-scrollcorner { 
+scrollcorner {
   /* XXX -moz-appearance: scrollcorner; */
   width: 16px;
   cursor: default;
   background-color: -moz-Dialog;
 }
 
 /* ..... increment .... */