From 43f69ea1304808cd86de3d1089ab95fae43a14bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 15 Jan 2020 16:52:37 +0000 Subject: [PATCH] Bug 1430141 - Remove hardcoded width. r=jfkthame Now that we're subclassing nsTextControlFrame we can use the regular replaced element intrinsic sizing, rather than just faking it in the UA sheet with a suspicious width declaration. Differential Revision: https://phabricator.services.mozilla.com/D59981 --HG-- extra : moz-landing-system : lando --- .../reftests/forms/input/number/flex-ref.html | 22 ++++++++++++++++++ layout/reftests/forms/input/number/flex.html | 23 +++++++++++++++++++ .../reftests/forms/input/number/reftest.list | 1 + .../ua-style-sheet-input-number-1-ref.html | 10 -------- layout/style/res/forms.css | 4 ---- 5 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 layout/reftests/forms/input/number/flex-ref.html create mode 100644 layout/reftests/forms/input/number/flex.html diff --git a/layout/reftests/forms/input/number/flex-ref.html b/layout/reftests/forms/input/number/flex-ref.html new file mode 100644 index 000000000000..4928292d61e8 --- /dev/null +++ b/layout/reftests/forms/input/number/flex-ref.html @@ -0,0 +1,22 @@ + + + diff --git a/layout/reftests/forms/input/number/flex.html b/layout/reftests/forms/input/number/flex.html new file mode 100644 index 000000000000..c0a6c26642dd --- /dev/null +++ b/layout/reftests/forms/input/number/flex.html @@ -0,0 +1,23 @@ + + + diff --git a/layout/reftests/forms/input/number/reftest.list b/layout/reftests/forms/input/number/reftest.list index 8ab0764c7f92..2d788247a852 100644 --- a/layout/reftests/forms/input/number/reftest.list +++ b/layout/reftests/forms/input/number/reftest.list @@ -23,6 +23,7 @@ fuzzy-if(skiaContent,0-2,0-13) == show-value.html show-value-ref.html # auto width: == number-auto-width-1.html number-auto-width-1-ref.html +== flex.html flex-ref.html # min-height/max-height tests: skip-if(Android) == number-min-height-1.html number-min-height-1-ref.html diff --git a/layout/reftests/writing-mode/ua-style-sheet-input-number-1-ref.html b/layout/reftests/writing-mode/ua-style-sheet-input-number-1-ref.html index c2a8e31e7048..b46b24426783 100644 --- a/layout/reftests/writing-mode/ua-style-sheet-input-number-1-ref.html +++ b/layout/reftests/writing-mode/ua-style-sheet-input-number-1-ref.html @@ -7,16 +7,6 @@ div { padding: 10px; } .a { -moz-appearance:textfield; } .b { -moz-appearance:none; } - -.ltr input[type="number"], -.rtl input[type="number"] { - width: 20ch; -} - -.v-rl input[type="number"] { - height: 20ch; -} -


diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 7d4b90aa732a..1326eb81eee3 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -979,10 +979,6 @@ input[type=range]::-moz-range-thumb { input[type="number"] { -moz-appearance: number-input; - /* Has to revert some properties applied by the generic input rule. */ - inline-size: 20ch; /* It'd be nice if this matched the default inline-size - of , but that's not easy to achieve - due to platform differences. */ } input[type=number]::-moz-number-wrapper {