Back out the videocontrols piece of bug 1231828 due to b2g breakage and add to the ignore list. r=backout
authorDave Townsend <dtownsend@oxymoronical.com>
Wed, 16 Dec 2015 12:45:58 -0800
changeset 311744 5621bf5d87e491c8856b90e5ff86919c96bf04c6
parent 311743 2c0d64cea673b90bc49aa8d4cfa63787931782cc
child 311745 736a01329729d5b68e2e3d3c141d14b66e2b2559
push id5703
push userraliiev@mozilla.com
push dateMon, 07 Mar 2016 14:18:41 +0000
treeherdermozilla-beta@31e373ad5b5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1231828
milestone46.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
Back out the videocontrols piece of bug 1231828 due to b2g breakage and add to the ignore list. r=backout
.eslintignore
toolkit/content/widgets/videocontrols.xml
--- a/.eslintignore
+++ b/.eslintignore
@@ -190,16 +190,17 @@ toolkit/modules/tests/xpcshell/test_task
 
 # Not yet updated
 toolkit/components/osfile/**
 toolkit/components/passwordmgr/**
 toolkit/components/places/**
 
 # Uses preprocessing
 toolkit/content/contentAreaUtils.js
+toolkit/content/widgets/videocontrols.xml
 toolkit/components/jsdownloads/src/DownloadIntegration.jsm
 toolkit/components/search/nsSearchService.js
 toolkit/components/url-classifier/**
 toolkit/components/urlformatter/nsURLFormatter.js
 toolkit/identity/FirefoxAccounts.jsm
 toolkit/modules/AppConstants.jsm
 toolkit/modules/SessionRecorder.jsm
 toolkit/mozapps/downloads/nsHelperAppDlg.js
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -789,28 +789,26 @@
                     // XXX Can't set increment here, due to bug 473103. Also, doing so causes
                     // snapping when dragging with the mouse, so we can't just set a value for
                     // the arrow-keys.
                     //this.scrubber.increment = duration / 50;
                     this.scrubber.pageIncrement = Math.round(duration / 10);
                 },
 
                 seekToPosition : function(newPosition) {
-                    let { AppConstants } =
-                        Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
                     newPosition /= 1000; // convert from ms
                     this.log("+++ seeking to " + newPosition);
-                    if (AppConstants.platform == "gonk") {
-                        // We use fastSeek() on B2G, and an accurate (but slower)
-                        // seek on other platforms (that are likely to be higher
-                        // perf).
-                        this.video.fastSeek(newPosition);
-                    } else {
-                        this.video.currentTime = newPosition;
-                    }
+#ifdef MOZ_WIDGET_GONK
+                    // We use fastSeek() on B2G, and an accurate (but slower)
+                    // seek on other platforms (that are likely to be higher
+                    // perf).
+                    this.video.fastSeek(newPosition);
+#else
+                    this.video.currentTime = newPosition;
+#endif
                 },
 
                 setVolume : function(newVolume) {
                     this.log("*** setting volume to " + newVolume);
                     this.video.volume = newVolume;
                     this.video.muted = false;
                 },
 
@@ -1249,34 +1247,32 @@
                     s.volume.textContent = volume;
                 },
 
                 keyHandler : function(event) {
                     // Ignore keys when content might be providing its own.
                     if (!this.video.hasAttribute("controls"))
                         return;
 
-                    let { AppConstants } =
-                        Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
                     var keystroke = "";
                     if (event.altKey)
                         keystroke += "alt-";
                     if (event.shiftKey)
                         keystroke += "shift-";
-                    if (AppConstants.platform == "macosx") {
-                        if (event.metaKey)
-                            keystroke += "accel-";
-                        if (event.ctrlKey)
-                            keystroke += "control-";
-                    } else {
-                        if (event.metaKey)
-                            keystroke += "meta-";
-                        if (event.ctrlKey)
-                            keystroke += "accel-";
-                    }
+#ifdef XP_MACOSX
+                    if (event.metaKey)
+                        keystroke += "accel-";
+                    if (event.ctrlKey)
+                        keystroke += "control-";
+#else
+                    if (event.metaKey)
+                        keystroke += "meta-";
+                    if (event.ctrlKey)
+                        keystroke += "accel-";
+#endif
 
                     switch (event.keyCode) {
                         case KeyEvent.DOM_VK_UP:
                             keystroke += "upArrow";
                             break;
                         case KeyEvent.DOM_VK_DOWN:
                             keystroke += "downArrow";
                             break;