From 49e1237f27a0f68b0613db9f1e7dd8d093cd4198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 28 Jan 2021 07:08:34 +0000 Subject: [PATCH] Bug 1689098 - Make inputs, selects, and button actually have the same block-axis padding as claimed by our forms.css comments. r=dholbert Combobox select has the block-axis padding in the comboboxcontrol frame. Moving it fixes bug 1560824 and should be better, so will do that there. 1px block axis padding on buttons matches Chrome too, so shouldn't be a problem compat-wise. Differential Revision: https://phabricator.services.mozilla.com/D103244 --- .../apz/test/mochitest/helper_drag_click.html | 2 +- layout/forms/test/mochitest.ini | 1 + .../test/test_unstyled_control_height.html | 22 +++++++++++++++++++ .../ua-style-sheet-button-1a-ref.html | 4 ++-- .../ua-style-sheet-input-color-1-ref.html | 4 ++-- layout/style/res/forms.css | 2 +- 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 layout/forms/test/test_unstyled_control_height.html diff --git a/gfx/layers/apz/test/mochitest/helper_drag_click.html b/gfx/layers/apz/test/mochitest/helper_drag_click.html index f8ff85654d31..7c6f91b97957 100644 --- a/gfx/layers/apz/test/mochitest/helper_drag_click.html +++ b/gfx/layers/apz/test/mochitest/helper_drag_click.html @@ -39,6 +39,6 @@ waitUntilApzStable() - + diff --git a/layout/forms/test/mochitest.ini b/layout/forms/test/mochitest.ini index b998839e3082..c077de5e0b84 100644 --- a/layout/forms/test/mochitest.ini +++ b/layout/forms/test/mochitest.ini @@ -64,3 +64,4 @@ skip-if = toolkit == 'android' [test_select_key_navigation_bug1498769.html] [test_select_collapsed_page_keys.html] skip-if = os == 'mac' # select control keyboard behavior is different +[test_unstyled_control_height.html] diff --git a/layout/forms/test/test_unstyled_control_height.html b/layout/forms/test/test_unstyled_control_height.html new file mode 100644 index 000000000000..c8d590f757be --- /dev/null +++ b/layout/forms/test/test_unstyled_control_height.html @@ -0,0 +1,22 @@ + + + +
+ + + +
+ diff --git a/layout/reftests/writing-mode/ua-style-sheet-button-1a-ref.html b/layout/reftests/writing-mode/ua-style-sheet-button-1a-ref.html index 7567da08a67d..7ab2d841b0f0 100644 --- a/layout/reftests/writing-mode/ua-style-sheet-button-1a-ref.html +++ b/layout/reftests/writing-mode/ua-style-sheet-button-1a-ref.html @@ -10,12 +10,12 @@ .rtl button, .ltr input[type="button"], .rtl input[type="button"] { - padding: 0px 8px; + padding: 1px 8px; } .v-rl button, .v-rl input[type="button"] { - padding: 8px 0px; + padding: 8px 1px; }
diff --git a/layout/reftests/writing-mode/ua-style-sheet-input-color-1-ref.html b/layout/reftests/writing-mode/ua-style-sheet-input-color-1-ref.html index 35b73b0d35c3..494cc6805e02 100644 --- a/layout/reftests/writing-mode/ua-style-sheet-input-color-1-ref.html +++ b/layout/reftests/writing-mode/ua-style-sheet-input-color-1-ref.html @@ -10,13 +10,13 @@ .rtl input[type="color"] { width: 64px; height: 23px; - padding: 0px 8px; + padding: 1px 8px; } .v-rl input[type="color"] { height: 64px; width: 23px; - padding: 8px 0px; + padding: 8px 1px; } @supports -moz-bool-pref("widget.disable-native-theme-for-content") { diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 61a125cf40b0..be97bca4d0f9 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -529,7 +529,7 @@ input:is([type=color], [type=reset], [type=button], [type=submit]) { /* The sum of border and padding on block-start and block-end must be the same here, for text inputs, and for