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
<input> properly in all cases. This works for non-number inputs because the
editor root is a direct child of the <input>, 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 <input type=number> applies to the arrow
boxes as well, and thus we'd double-apply it.

Differential Revision: https://phabricator.services.mozilla.com/D65271
This commit is contained in:
Emilio Cobos Álvarez 2020-03-18 09:21:44 +00:00
parent ece146988c
commit decc648c46
2 changed files with 36 additions and 9 deletions

View file

@ -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 {