Merge autoland to mozilla-central. a=merge
authorDorel Luca <dluca@mozilla.com>
Mon, 21 Oct 2019 00:43:47 +0300
changeset 498397 b34beb21e1cf9d283ef0d855f68f63bcc15e40fb
parent 498396 4b332005f92551e4c96e74a150a601764f76aa02 (current diff)
parent 498296 2b0f526cdab1f1a6f93a86ed51a961f40bb98641 (diff)
child 498398 d42c22627c8dee9e9286fd5d7bbc3d02afbfad44
push id114157
push usernbeleuzu@mozilla.com
push dateMon, 21 Oct 2019 22:00:13 +0000
treeherdermozilla-inbound@563f437f24b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone71.0a1
first release with
nightly linux32
b34beb21e1cf / 71.0a1 / 20191020214712 / files
nightly linux64
b34beb21e1cf / 71.0a1 / 20191020214712 / files
nightly mac
b34beb21e1cf / 71.0a1 / 20191020214712 / files
nightly win32
b34beb21e1cf / 71.0a1 / 20191020214712 / files
nightly win64
b34beb21e1cf / 71.0a1 / 20191020214712 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge autoland to mozilla-central. a=merge
--- a/browser/components/aboutconfig/content/aboutconfig.css
+++ b/browser/components/aboutconfig/content/aboutconfig.css
@@ -127,22 +127,33 @@
 }
 
 .cell-value {
   overflow-wrap: anywhere;
   white-space: pre-wrap;
   word-break: break-all;
 }
 
+tr:not(.deleted) > .cell-value {
+  /* Always display the text in the value cell using left-to-right rules, but
+     align it according to the page direction. This doesn't apply to the radio
+     buttons shown for deleted preferences. */
+  direction: ltr;
+  text-align: match-parent;
+}
+
 td.cell-value > form > input[type="text"],
 td.cell-value > form > input[type="number"] {
   -moz-appearance: textfield;
   margin: 0;
   width: 100%;
   box-sizing: border-box;
+  /* Align the text inside the input field in the same way as the table cell,
+     for both the left-to-right and right-to-left directions. */
+  text-align: match-parent;
 }
 
 .button-add,
 .button-save,
 .button-edit,
 .button-toggle,
 .button-delete,
 .button-reset {
--- a/layout/style/test/chrome/bug418986-2.js
+++ b/layout/style/test/chrome/bug418986-2.js
@@ -56,30 +56,33 @@ var suppressed_toggles = [
   "-moz-mac-graphite-theme",
   // Not available on most OSs.
   //  "-moz-maemo-classic",
   "-moz-scrollbar-end-backward",
   "-moz-scrollbar-end-forward",
   "-moz-scrollbar-start-backward",
   "-moz-scrollbar-start-forward",
   "-moz-scrollbar-thumb-proportional",
-  "-moz-touch-enabled",
   "-moz-windows-compositor",
   "-moz-windows-default-theme",
   "-moz-windows-glass",
   "-moz-gtk-csd-available",
   "-moz-gtk-csd-hide-titlebar-by-default",
   "-moz-gtk-csd-transparent-background",
   "-moz-gtk-csd-minimize-button",
   "-moz-gtk-csd-maximize-button",
   "-moz-gtk-csd-close-button",
   "-moz-gtk-csd-reversed-placement",
 ];
 
-var toggles_enabled_in_content = ["-moz-touch-enabled"];
+var toggles_enabled_in_content = [];
+if (SpecialPowers.getBoolPref("layout.css.moz-touch-enabled.enabled")) {
+  suppressed_toggles.push("-moz-touch-enabled");
+  toggles_enabled_in_content.push("-moz-touch-enabled");
+}
 
 // Possible values for '-moz-os-version'
 var windows_versions = ["windows-win7", "windows-win8", "windows-win10"];
 
 // Read the current OS.
 var OS = SpecialPowers.Services.appinfo.OS;
 
 // If we are using Windows, add an extra toggle only
--- a/layout/style/test/chrome/test_chrome_only_media_queries.html
+++ b/layout/style/test/chrome/test_chrome_only_media_queries.html
@@ -54,19 +54,22 @@ const TOGGLES = [
   "-moz-windows-default-theme",
   "-moz-mac-graphite-theme",
   "-moz-mac-yosemite-theme",
   "-moz-windows-accent-color-in-titlebar",
   "-moz-windows-compositor",
   "-moz-windows-classic",
   "-moz-windows-glass",
   "-moz-swipe-animation-enabled",
-  "-moz-touch-enabled",
 ];
 
+if (SpecialPowers.getBoolPref("layout.css.moz-touch-enabled.enabled")) {
+  TOGGLES.push("-moz-touch-enabled");
+}
+
 for (let i = 0; i < TOGGLES.length; ++i) {
   testToggle(TOGGLES[i])
 }
 
 expectParseable("(-moz-os-version: windows-win7)");
 expectParseable("(-moz-os-version: windows-win8)");
 expectParseable("(-moz-os-version: windows-win10)");
 expectNonParseable("(-moz-os-version: )");
--- a/layout/style/test/test_media_queries.html
+++ b/layout/style/test/test_media_queries.html
@@ -713,17 +713,16 @@ function run() {
   expression_should_not_be_parseable("-moz-swipe-animation-enabled");
   expression_should_not_be_parseable("-moz-gtk-csd-available");
   expression_should_not_be_parseable("-moz-gtk-csd-hide-titlebar-by-default");
   expression_should_not_be_parseable("-moz-gtk-csd-transparent-background");
   expression_should_not_be_parseable("-moz-gtk-csd-minimize-button");
   expression_should_not_be_parseable("-moz-gtk-csd-maximize-button");
   expression_should_not_be_parseable("-moz-gtk-csd-close-button");
   expression_should_not_be_parseable("-moz-gtk-csd-reversed-placement");
-  expression_should_be_parseable("-moz-touch-enabled");
 
   expression_should_not_be_parseable("-moz-scrollbar-start-backward: 0");
   expression_should_not_be_parseable("-moz-scrollbar-start-forward: 0");
   expression_should_not_be_parseable("-moz-scrollbar-end-backward: 0");
   expression_should_not_be_parseable("-moz-scrollbar-end-forward: 0");
   expression_should_not_be_parseable("-moz-scrollbar-thumb-proportional: 0");
   expression_should_not_be_parseable("-moz-overlay-scrollbars: 0");
   expression_should_not_be_parseable("-moz-windows-default-theme: 0");
@@ -736,17 +735,16 @@ function run() {
   expression_should_not_be_parseable("-moz-swipe-animation-enabled: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-available: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-hide-titlebar-by-default: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-transparent-background: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-minimize-button: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-maximize-button: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-close-button: 0");
   expression_should_not_be_parseable("-moz-gtk-csd-reversed-placement: 0");
-  expression_should_be_parseable("-moz-touch-enabled: 0");
 
   expression_should_not_be_parseable("-moz-scrollbar-start-backward: 1");
   expression_should_not_be_parseable("-moz-scrollbar-start-forward: 1");
   expression_should_not_be_parseable("-moz-scrollbar-end-backward: 1");
   expression_should_not_be_parseable("-moz-scrollbar-end-forward: 1");
   expression_should_not_be_parseable("-moz-scrollbar-thumb-proportional: 1");
   expression_should_not_be_parseable("-moz-overlay-scrollbars: 1");
   expression_should_not_be_parseable("-moz-windows-default-theme: 1");
@@ -759,17 +757,16 @@ function run() {
   expression_should_not_be_parseable("-moz-swipe-animation-enabled: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-available: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-hide-titlebar-by-default: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-transparent-background: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-minimize-button: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-maximize-button: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-close-button: 1");
   expression_should_not_be_parseable("-moz-gtk-csd-reversed-placement: 1");
-  expression_should_be_parseable("-moz-touch-enabled: 1");
 
   expression_should_not_be_parseable("-moz-scrollbar-start-backward: -1");
   expression_should_not_be_parseable("-moz-scrollbar-start-forward: -1");
   expression_should_not_be_parseable("-moz-scrollbar-end-backward: -1");
   expression_should_not_be_parseable("-moz-scrollbar-end-forward: -1");
   expression_should_not_be_parseable("-moz-scrollbar-thumb-proportional: -1");
   expression_should_not_be_parseable("-moz-overlay-scrollbars: -1");
   expression_should_not_be_parseable("-moz-windows-default-theme: -1");
@@ -813,16 +810,25 @@ function run() {
   expression_should_not_be_parseable("-moz-gtk-csd-reversed-placement: true");
 
   // os version media queries (currently windows only)
   expression_should_not_be_parseable("-moz-os-version: windows-win7");
   expression_should_not_be_parseable("-moz-os-version: windows-win8");
   expression_should_not_be_parseable("-moz-os-version: windows-win10");
   expression_should_not_be_parseable("-moz-os-version: ");
 
+  {
+    let should_be_parseable_if_enabled = SpecialPowers.getBoolPref('layout.css.moz-touch-enabled.enabled')
+      ? expression_should_be_parseable
+      : expression_should_not_be_parseable;
+    should_be_parseable_if_enabled("-moz-touch-enabled");
+    should_be_parseable_if_enabled("-moz-touch-enabled: 0");
+    should_be_parseable_if_enabled("-moz-touch-enabled: 1");
+  }
+
   // OpenType SVG media features
   query_should_not_be_parseable("(-moz-is-glyph)");
   query_should_not_be_parseable("not (-moz-is-glyph)");
   query_should_not_be_parseable("only (-moz-is-glyph)");
   query_should_not_be_parseable("all and (-moz-is-glyph)");
   query_should_not_be_parseable("not all and (-moz-is-glyph)");
   query_should_not_be_parseable("only all and (-moz-is-glyph)");
 
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -4811,16 +4811,23 @@
   mirror: always
 
 # Is support for -moz-binding enabled?
 - name: layout.css.moz-binding.content.enabled
   type: bool
   value: false
   mirror: always
 
+# Expose the media query -moz-touch-enabled to web content.
+- name: layout.css.moz-touch-enabled.enabled
+  type: RelaxedAtomicBool
+  value: @IS_NOT_NIGHTLY_BUILD@
+  mirror: always
+  rust: true
+
 # Pref to control whether the ::marker property restrictions defined in [1]
 # apply.
 #
 # [1]: https://drafts.csswg.org/css-pseudo-4/#selectordef-marker
 - name: layout.css.marker.restricted
   type: RelaxedAtomicBool
   value: true
   mirror: always
@@ -4897,23 +4904,16 @@
   mirror: always
 
 # Is support for -moz-box-sizing enabled?
 - name: layout.css.prefixes.box-sizing
   type: bool
   value: true
   mirror: always
 
-# Are "-webkit-{min|max}-device-pixel-ratio" media queries supported?
-- name: layout.css.prefixes.device-pixel-ratio-webkit
-  type: RelaxedAtomicBool
-  value: true
-  mirror: always
-  rust: true
-
 # Is support for -moz-prefixed font feature properties enabled?
 - name: layout.css.prefixes.font-features
   type: bool
   value: true
   mirror: always
 
 # Is support for -moz-prefixed transform properties enabled?
 - name: layout.css.prefixes.transforms
--- a/servo/components/style/gecko/media_features.rs
+++ b/servo/components/style/gecko/media_features.rs
@@ -593,18 +593,17 @@ lazy_static! {
             ParsingRequirements::empty(),
         ),
         // Webkit extensions that we support for de-facto web compatibility.
         // -webkit-{min|max}-device-pixel-ratio (controlled with its own pref):
         feature!(
             atom!("device-pixel-ratio"),
             AllowsRanges::Yes,
             Evaluator::Float(eval_device_pixel_ratio),
-            ParsingRequirements::WEBKIT_PREFIX |
-                ParsingRequirements::WEBKIT_DEVICE_PIXEL_RATIO_PREF_ENABLED,
+            ParsingRequirements::WEBKIT_PREFIX,
         ),
         // -webkit-transform-3d.
         feature!(
             atom!("transform-3d"),
             AllowsRanges::No,
             Evaluator::BoolInteger(eval_transform_3d),
             ParsingRequirements::WEBKIT_PREFIX,
         ),
--- a/servo/components/style/media_queries/media_feature.rs
+++ b/servo/components/style/media_queries/media_feature.rs
@@ -118,19 +118,16 @@ macro_rules! keyword_evaluator {
 bitflags! {
     /// Different requirements or toggles that change how a expression is
     /// parsed.
     pub struct ParsingRequirements: u8 {
         /// The feature should only be parsed in chrome and ua sheets.
         const CHROME_AND_UA_ONLY = 1 << 0;
         /// The feature requires a -webkit- prefix.
         const WEBKIT_PREFIX = 1 << 1;
-        /// The feature requires the webkit-device-pixel-ratio preference to be
-        /// enabled.
-        const WEBKIT_DEVICE_PIXEL_RATIO_PREF_ENABLED = 1 << 2;
     }
 }
 
 /// Whether a media feature allows ranges or not.
 #[derive(Clone, Copy, Debug, Eq, PartialEq)]
 #[allow(missing_docs)]
 pub enum AllowsRanges {
     Yes,
--- a/servo/components/style/media_queries/media_feature_expression.rs
+++ b/servo/components/style/media_queries/media_feature_expression.rs
@@ -237,16 +237,23 @@ fn consume_operation_or_colon(input: &mu
             } else {
                 Operator::LessThan
             }
         },
         _ => return Err(()),
     }))
 }
 
+fn disabled_by_pref(feature: &Atom) -> bool {
+    if *feature == atom!("-moz-touch-enabled") {
+        return !static_prefs::pref!("layout.css.moz-touch-enabled.enabled");
+    }
+    false
+}
+
 impl MediaFeatureExpression {
     fn new(
         feature_index: usize,
         value: Option<MediaExpressionValue>,
         range_or_operator: Option<RangeOrOperator>,
     ) -> Self {
         debug_assert!(feature_index < MEDIA_FEATURES.len());
         Self {
@@ -274,91 +281,63 @@ impl MediaFeatureExpression {
     }
 
     /// Parse a media feature expression where we've already consumed the
     /// parenthesis.
     pub fn parse_in_parenthesis_block<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
     ) -> Result<Self, ParseError<'i>> {
-        // FIXME: remove extra indented block when lifetimes are non-lexical
-        let feature_index;
-        let feature;
-        let range;
-        {
-            let location = input.current_source_location();
-            let ident = input.expect_ident()?;
-
-            let mut requirements = ParsingRequirements::empty();
-
-            if context.in_ua_or_chrome_sheet() {
-                requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
-            }
+        let mut requirements = ParsingRequirements::empty();
+        let location = input.current_source_location();
+        let ident = input.expect_ident()?;
 
-            let result = {
-                let mut feature_name = &**ident;
+        if context.in_ua_or_chrome_sheet() {
+            requirements.insert(ParsingRequirements::CHROME_AND_UA_ONLY);
+        }
 
-                #[cfg(feature = "gecko")]
-                {
-                    if starts_with_ignore_ascii_case(feature_name, "-webkit-") {
-                        feature_name = &feature_name[8..];
-                        requirements.insert(ParsingRequirements::WEBKIT_PREFIX);
-                        if static_prefs::pref!("layout.css.prefixes.device-pixel-ratio-webkit") {
-                            requirements.insert(
-                                ParsingRequirements::WEBKIT_DEVICE_PIXEL_RATIO_PREF_ENABLED,
-                            );
-                        }
-                    }
-                }
+        let mut feature_name = &**ident;
+
+        if starts_with_ignore_ascii_case(feature_name, "-webkit-") {
+            feature_name = &feature_name[8..];
+            requirements.insert(ParsingRequirements::WEBKIT_PREFIX);
+        }
 
-                let range = if starts_with_ignore_ascii_case(feature_name, "min-") {
-                    feature_name = &feature_name[4..];
-                    Some(Range::Min)
-                } else if starts_with_ignore_ascii_case(feature_name, "max-") {
-                    feature_name = &feature_name[4..];
-                    Some(Range::Max)
-                } else {
-                    None
-                };
+        let range = if starts_with_ignore_ascii_case(feature_name, "min-") {
+            feature_name = &feature_name[4..];
+            Some(Range::Min)
+        } else if starts_with_ignore_ascii_case(feature_name, "max-") {
+            feature_name = &feature_name[4..];
+            Some(Range::Max)
+        } else {
+            None
+        };
 
-                let atom = Atom::from(string_as_ascii_lowercase(feature_name));
-                match MEDIA_FEATURES
-                    .iter()
-                    .enumerate()
-                    .find(|(_, f)| f.name == atom)
-                {
-                    Some((i, f)) => Ok((i, f, range)),
-                    None => Err(()),
-                }
-            };
+        let atom = Atom::from(string_as_ascii_lowercase(feature_name));
 
-            match result {
-                Ok((i, f, r)) => {
-                    feature_index = i;
-                    feature = f;
-                    range = r;
-                },
-                Err(()) => {
-                    return Err(location.new_custom_error(
-                        StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
-                    ));
-                },
-            }
-
-            if !(feature.requirements & !requirements).is_empty() {
+        let (feature_index, feature) = match MEDIA_FEATURES
+            .iter()
+            .enumerate()
+            .find(|(_, f)| f.name == atom)
+        {
+            Some((i, f)) => (i, f),
+            None => {
                 return Err(location.new_custom_error(
                     StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
-                ));
-            }
+                ))
+            },
+        };
 
-            if range.is_some() && !feature.allows_ranges() {
-                return Err(location.new_custom_error(
-                    StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
-                ));
-            }
+        if disabled_by_pref(&feature.name) ||
+            !requirements.contains(feature.requirements) ||
+            (range.is_some() && !feature.allows_ranges())
+        {
+            return Err(location.new_custom_error(
+                StyleParseErrorKind::MediaQueryExpectedFeatureName(ident.clone()),
+            ));
         }
 
         let operator = input.try(consume_operation_or_colon);
         let operator = match operator {
             Err(..) => {
                 // If there's no colon, this is a media query of the
                 // form '(<feature>)', that is, there's no value
                 // specified.
--- a/testing/profiles/unittest-features/user.js
+++ b/testing/profiles/unittest-features/user.js
@@ -9,18 +9,16 @@
 // Enable w3c touch events for testing
 user_pref("dom.w3c_touch_events.enabled", 1);
 // Enable CSS 'contain' for testing
 user_pref("layout.css.contain.enabled", true);
 // Enable CSS Grid 'subgrid' feature for testing
 user_pref("layout.css.grid-template-subgrid-value.enabled", true);
 // Enable CSS initial-letter for testing
 user_pref("layout.css.initial-letter.enabled", true);
-// Enable -webkit-{min|max}-device-pixel-ratio media queries for testing
-user_pref("layout.css.prefixes.device-pixel-ratio-webkit", true);
 // Enable Media Source Extensions for testing
 user_pref("media.mediasource.mp4.enabled", true);
 user_pref("media.mediasource.webm.enabled", true);
 user_pref("media.av1.enabled", true);
 user_pref("media.eme.enabled", true);
 // Enable some form preferences for testing
 user_pref("dom.experimental_forms", true);
 user_pref("dom.forms.color", true);
--- a/testing/web-platform/meta/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.tentative.sub.html.ini
+++ b/testing/web-platform/meta/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade.tentative.sub.html.ini
@@ -24,15 +24,14 @@
   [Https downgrade-upgrade image => No headers]
     expected: NOTRUN
 
   [Https downgrade-upgrade font => No headers]
     expected: NOTRUN
 
   [Https downgrade-upgrade prefetch => No headers]
     expected:
-      if (os == "linux") and not debug and not webrender and not fission and (processor == "x86"): ["TIMEOUT", "FAIL"]
-      if (os == "linux") and not debug and not webrender and fission: ["FAIL", "TIMEOUT"]
+      if (os == "linux"): ["TIMEOUT", "FAIL"]
       FAIL
 
   [Https downgrade-upgrade embed]
     expected: FAIL