diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index 943bd0f27ff..18a46bc18f2 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -615,22 +615,19 @@ ${helpers.predefined_type( spec="https://drafts.csswg.org/css-contain/#contain-property", )} -// Non-standard ${helpers.predefined_type( - "-moz-appearance", + "appearance", "Appearance", "computed::Appearance::None", engines="gecko", - alias="-webkit-appearance", - spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance)", + alias="-moz-appearance -webkit-appearance", + spec="https://drafts.csswg.org/css-ui-4/#propdef-appearance", animation_value_type="discrete", gecko_ffi_name="mAppearance", )} -// A UA-sheet only property that is always set to the same value as -// -moz-appearance. Used to record telemetry for when author sheets -// override the value of -moz-appearance; see -// nsIFrame::RecordAppearanceTelemetry. +// The inherent widget type of an element, selected by specifying +// `appearance: auto`. ${helpers.predefined_type( "-moz-default-appearance", "Appearance", diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 712e0d68c4b..b33458a0f9b 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -763,10 +763,10 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { where E: TElement, { - use crate::properties::longhands::_moz_appearance::computed_value::T as Appearance; + use crate::properties::longhands::appearance::computed_value::T as Appearance; use crate::properties::longhands::line_height::computed_value::T as LineHeight; - if self.style.get_box().clone__moz_appearance() == Appearance::Menulist { + if self.style.get_box().clone_appearance() == Appearance::Menulist { if self.style.get_inherited_text().clone_line_height() == LineHeight::normal() { return; } diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index 6199ed2275d..afe1fee3303 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -1525,6 +1525,11 @@ pub enum Resize { pub enum Appearance { /// No appearance at all. None, + /// Default appearance for the element. + /// + /// This value doesn't make sense for -moz-default-appearance, but we don't bother to guard + /// against parsing it. + Auto, /// A typical dialog button. Button, /// Various arrows that go in buttons