From decc648c46e5dd1af758cc2900d3e989bbace4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 18 Mar 2020 09:21:44 +0000 Subject: [PATCH] style: Fix number input so that it honors overflow-clip-box-block. This never worked, but it's more visible with the new form controls which have more padding. Make the anonymous div and co a pseudo-element, so that they inherit from the properly in all cases. This works for non-number inputs because the editor root is a direct child of the , but it doesn't for number inputs because there's a flex wrapper in between. This way overflow-clip-box: inherit does what we want. Reset the padding in the inline direction, as the padding for applies to the arrow boxes as well, and thus we'd double-apply it. Differential Revision: https://phabricator.services.mozilla.com/D65271 --- components/style/gecko/pseudo_element.rs | 6 ---- components/style/style_adjuster.rs | 39 ++++++++++++++++++++++-- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs index 8d05dd9bbb1..d989380c02e 100644 --- a/components/style/gecko/pseudo_element.rs +++ b/components/style/gecko/pseudo_element.rs @@ -134,12 +134,6 @@ impl PseudoElement { *self == PseudoElement::FirstLine } - /// Whether this pseudo-element is ::-moz-fieldset-content. - #[inline] - pub fn is_fieldset_content(&self) -> bool { - *self == PseudoElement::FieldsetContent - } - /// Whether this pseudo-element is the ::-moz-color-swatch pseudo. #[inline] pub fn is_color_swatch(&self) -> bool { diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index aed3c5fc980..6fd5a0ace73 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -494,6 +494,35 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { } } + ///