[tbb-commits] [tor-browser/tor-browser-68.1.0esr-9.0-2] Bug 1583660 - Reinstate default background color / size for -moz-range-track on Android. r=jwatt a=lizzard

gk at torproject.org gk at torproject.org
Tue Oct 8 07:34:31 UTC 2019


commit 339576fa544c87058d34337547fea2d5c0c926da
Author: Mats Palmgren <mats at mozilla.com>
Date:   Wed Oct 2 21:04:32 2019 +0000

    Bug 1583660 - Reinstate default background color / size for -moz-range-track on Android.  r=jwatt a=lizzard
    
    This reverts the changes from bug 1481593 / bug 1317870 which broke
    the default rendering on Android only (since it doesn't have
    a native theme for <input type=range>).
    
    Differential Revision: https://phabricator.services.mozilla.com/D47345
    
    --HG--
    extra : source : 34a3e14b45b5e4ac77af2acbbfe57225385e5d1e
---
 layout/reftests/forms/input/range/reftest.list     |  2 ++
 .../input/range/track-default-rendering-ref.html   | 25 ++++++++++++++++++++++
 .../forms/input/range/track-default-rendering.html | 22 +++++++++++++++++++
 mobile/android/themes/geckoview/content.css        | 19 ++++++++++++++++
 4 files changed, 68 insertions(+)

diff --git a/layout/reftests/forms/input/range/reftest.list b/layout/reftests/forms/input/range/reftest.list
index e4faf2361f23..24b153395795 100644
--- a/layout/reftests/forms/input/range/reftest.list
+++ b/layout/reftests/forms/input/range/reftest.list
@@ -57,3 +57,5 @@ skip-if(Android) == range-border-background.html range-border-background-ref.htm
 == range-percent-intrinsic-size-2b.html range-percent-intrinsic-size-2b-ref.html
 
 == auto-size.html auto-size-ref.html
+!= track-default-rendering.html track-default-rendering-ref.html
+
diff --git a/layout/reftests/forms/input/range/track-default-rendering-ref.html b/layout/reftests/forms/input/range/track-default-rendering-ref.html
new file mode 100644
index 000000000000..d702d021c5c5
--- /dev/null
+++ b/layout/reftests/forms/input/range/track-default-rendering-ref.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1524573 -->
+<html><head>
+  <meta charset="utf-8">
+  <title>Testcase for bug 1583660</title>
+  <style>
+    input::-moz-range-thumb {
+      visibility:hidden;
+    }
+    input::-moz-range-track {
+      background: transparent;
+    }
+  </style>
+</head>
+<body>
+
+<input type=range>
+<input type=range orient=vertical>
+
+</body>
+</html>
diff --git a/layout/reftests/forms/input/range/track-default-rendering.html b/layout/reftests/forms/input/range/track-default-rendering.html
new file mode 100644
index 000000000000..997b83d20271
--- /dev/null
+++ b/layout/reftests/forms/input/range/track-default-rendering.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1524573 -->
+<html><head>
+  <meta charset="utf-8">
+  <title>Testcase for bug 1583660</title>
+  <style>
+    input::-moz-range-thumb {
+      visibility:hidden;
+    }
+  </style>
+</head>
+<body>
+
+<input type=range>
+<input type=range orient=vertical>
+
+</body>
+</html>
diff --git a/mobile/android/themes/geckoview/content.css b/mobile/android/themes/geckoview/content.css
index 57c56a626f42..70193cb218b4 100644
--- a/mobile/android/themes/geckoview/content.css
+++ b/mobile/android/themes/geckoview/content.css
@@ -296,6 +296,25 @@ button:-moz-native-anonymous.datetime-reset-button {
   display: none;
 }
 
+input[type=range]::-moz-range-track {
+  background-color: #999;
+}
+
+input[type=range][orient=block]::-moz-range-track {
+  inline-size: 0.2em;
+  block-size: 100%;
+}
+
+input[type=range][orient=horizontal]::-moz-range-track {
+  width: 100%;
+  height: 0.2em;
+}
+
+input[type=range][orient=vertical]::-moz-range-track {
+  width: 0.2em;
+  height: 100%;
+}
+
 /* Override accessiblecaret css in layout/style/ua.css */
 div:-moz-native-anonymous.moz-accessiblecaret > #text-overlay,
 div:-moz-native-anonymous.moz-accessiblecaret > #image {



More information about the tbb-commits mailing list