diff --git a/.eslintignore b/.eslintignore index cf1522f3a6e..23f2b3968e1 100644 --- a/.eslintignore +++ b/.eslintignore @@ -195,6 +195,7 @@ 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/** diff --git a/toolkit/content/widgets/videocontrols.xml b/toolkit/content/widgets/videocontrols.xml index 74aaf95e237..8b7f642199b 100644 --- a/toolkit/content/widgets/videocontrols.xml +++ b/toolkit/content/widgets/videocontrols.xml @@ -794,18 +794,16 @@ }, 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) { @@ -1254,24 +1252,22 @@ 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: