Bug 1319569 - Remove unused timeThumb binding in videocontrols.xml and unreferenced statistics formatting styling from videocontrols.css. The timeThumb is no longer used since bug 1271765 and the statistics were removed by bug 1270853. r?ralin draft
authorJared Wein <jwein@mozilla.com>
Fri, 16 Dec 2016 01:12:25 -0500
changeset 450215 9d104548b06b7b10e97a825a92cc094f8ac6bc98
parent 450214 2598eb39da38bef8639020f12941758aaa16c24f
child 539698 3c1c1ec28f9787e96f0125ea7fd8c4d4bee5c1b8
push id38794
push userbmo:jaws@mozilla.com
push dateFri, 16 Dec 2016 06:13:11 +0000
reviewersralin
bugs1319569, 1271765, 1270853
milestone53.0a1
Bug 1319569 - Remove unused timeThumb binding in videocontrols.xml and unreferenced statistics formatting styling from videocontrols.css. The timeThumb is no longer used since bug 1271765 and the statistics were removed by bug 1270853. r?ralin MozReview-Commit-ID: DcXYKizCops
toolkit/content/widgets/videocontrols.css
toolkit/content/widgets/videocontrols.xml
--- a/toolkit/content/widgets/videocontrols.css
+++ b/toolkit/content/widgets/videocontrols.css
@@ -5,20 +5,16 @@
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 .scrubber,
 .volumeControl {
   -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#suppressChangeEvent");
 }
 
-.scrubber .scale-thumb {
-  -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#timeThumb");
-}
-
 .playButton,
 .muteButton,
 .scrubber .scale-slider,
 .volumeControl .scale-slider {
   -moz-user-focus: none;
 }
 
 .controlBar[fullscreen-unavailable] > .fullscreenButton {
@@ -67,41 +63,16 @@
   transition-property: opacity;
   transition-duration: 1ms;
   transition-delay: 750ms;
 }
 .statusOverlay[fadeout] {
   opacity: 0;
 }
 
-/* Statistics formatting */
-html|td.statLabel {
-  font-weight: bold;
-  max-width: 20%;
-  white-space: nowrap;
-}
-html|td.statValue {
-  max-width: 30%;
-}
-html|td.filename {
-  max-width: 80%;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-html|span.statActivity > html|span {
-  display: none;
-}
-html|span.statActivity[activity="paused"] > html|span.statActivityPaused,
-html|span.statActivity[activity="playing"] > html|span.statActivityPlaying,
-html|span.statActivity[activity="ended"] > html|span.statActivityEnded,
-html|span.statActivity[seeking] > html|span.statActivitySeeking {
-  display: inline;
-}
-
 .controlBar[size="hidden"],
 .controlBar[size="small"] .durationBox,
 .controlBar[size="small"] .durationLabel,
 .controlBar[size="small"] .positionLabel,
 .controlBar[size="small"] .volumeStack {
   visibility: collapse;
 }
 
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -10,87 +10,16 @@
 
 <bindings id="videoControlBindings"
           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"
           xmlns:svg="http://www.w3.org/2000/svg"
           xmlns:html="http://www.w3.org/1999/xhtml">
 
-<binding id="timeThumb"
-         extends="chrome://global/content/bindings/scale.xml#scalethumb">
-  <xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-    <xbl:children/>
-    <hbox class="timeThumb" xbl:inherits="showhours">
-      <label class="timeLabel"/>
-    </hbox>
-  </xbl:content>
-  <implementation>
-
-  <constructor>
-    <![CDATA[
-    this.timeLabel = document.getAnonymousElementByAttribute(this, "class", "timeLabel");
-    this.timeLabel.setAttribute("value", "0:00");
-    ]]>
-  </constructor>
-
-  <property name="showHours">
-    <getter>
-      <![CDATA[
-      return this.getAttribute("showhours") == "true";
-      ]]>
-    </getter>
-    <setter>
-      <![CDATA[
-      this.setAttribute("showhours", val);
-      // If the duration becomes known while we're still showing the value
-      // for time=0, immediately update the value to show or hide the hours.
-      // It's less intrusive to do it now than when the user clicks play and
-      // is looking right next to the thumb.
-      if (!this.timeLabel) {
-        return;
-      }
-      var displayedTime = this.timeLabel.getAttribute("value");
-      if (val && displayedTime == "0:00") {
-        this.timeLabel.setAttribute("value", "0:00:00");
-      } else if (!val && displayedTime == "0:00:00") {
-        this.timeLabel.setAttribute("value", "0:00");
-      }
-      ]]>
-    </setter>
-  </property>
-
-  <method name="setTime">
-    <parameter name="time"/>
-    <body>
-      <![CDATA[
-      var timeString;
-      time = Math.round(time / 1000);
-      var hours = Math.floor(time / 3600);
-      var mins  = Math.floor((time % 3600) / 60);
-      var secs  = Math.floor(time % 60);
-      if (secs < 10) {
-        secs = "0" + secs;
-      }
-      if (hours || this.showHours) {
-        if (mins < 10) {
-          mins = "0" + mins;
-        }
-        timeString = hours + ":" + mins + ":" + secs;
-      } else {
-        timeString = mins + ":" + secs;
-      }
-
-      this.timeLabel.setAttribute("value", timeString);
-      ]]>
-    </body>
-  </method>
-  </implementation>
-</binding>
-
 <binding id="suppressChangeEvent"
          extends="chrome://global/content/bindings/scale.xml#scale">
 <implementation implements="nsIXBLAccessible">
   <!-- nsIXBLAccessible -->
   <property name="accessibleName" readonly="true">
     <getter>
       if (this.type != "scrubber") {
         return "";