From 768db078ef2b1e2675e5ddc929f83e736ee31e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 10 Sep 2020 08:58:09 +0000 Subject: [PATCH] style: Make appearance: button behave like auto. As per https://github.com/w3c/csswg-drafts/issues/5174. Differential Revision: https://phabricator.services.mozilla.com/D89119 --- components/style/properties/data.py | 1 - .../style/properties/longhands/box.mako.rs | 19 -------------- components/style/values/computed/box.rs | 2 +- components/style/values/computed/mod.rs | 2 +- components/style/values/specified/box.rs | 25 ------------------- components/style/values/specified/mod.rs | 2 +- 6 files changed, 3 insertions(+), 48 deletions(-) diff --git a/components/style/properties/data.py b/components/style/properties/data.py index f141160af1a..e2308d93781 100644 --- a/components/style/properties/data.py +++ b/components/style/properties/data.py @@ -334,7 +334,6 @@ class Longhand(object): "BackgroundRepeat", "BorderImageRepeat", "BorderStyle", - "ButtonAppearance", "Clear", "ColumnCount", "Contain", diff --git a/components/style/properties/longhands/box.mako.rs b/components/style/properties/longhands/box.mako.rs index 32a541481e2..ca93fd916ea 100644 --- a/components/style/properties/longhands/box.mako.rs +++ b/components/style/properties/longhands/box.mako.rs @@ -639,25 +639,6 @@ ${helpers.predefined_type( gecko_ffi_name="mDefaultAppearance", )} -// A UA-sheet only property that controls the effect of `appearance: button` -// on the element: `-moz-button-appearance: allow` means the element is rendered -// with button appearance, and `-moz-button-appearance: disallow` is treated -// like `appearance: auto`. -// -// https://github.com/w3c/csswg-drafts/issues/5174 proposes to simplify `button` -// to mean `auto` unconditionally, at which point this property can be removed. -${helpers.predefined_type( - "-moz-button-appearance", - "ButtonAppearance", - "computed::ButtonAppearance::Allow", - engines="gecko", - animation_value_type="none", - needs_context=False, - spec="Internal (not web-exposed)", - enabled_in="ua", - gecko_ffi_name="mButtonAppearance", -)} - ${helpers.single_keyword( "-moz-orient", "inline block horizontal vertical", diff --git a/components/style/values/computed/box.rs b/components/style/values/computed/box.rs index 8054a9bda58..6dbdcf497de 100644 --- a/components/style/values/computed/box.rs +++ b/components/style/values/computed/box.rs @@ -12,7 +12,7 @@ use crate::values::generics::box_::VerticalAlign as GenericVerticalAlign; use crate::values::specified::box_ as specified; pub use crate::values::specified::box_::{AnimationName, Appearance, BreakBetween, BreakWithin}; -pub use crate::values::specified::box_::{ButtonAppearance, Clear as SpecifiedClear}; +pub use crate::values::specified::box_::{Clear as SpecifiedClear}; pub use crate::values::specified::box_::{Float as SpecifiedFloat, Contain, Display, Overflow}; pub use crate::values::specified::box_::{OverflowAnchor, OverflowClipBox, OverscrollBehavior}; pub use crate::values::specified::box_::{ diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index 95fb405e4ba..aa13ff89d7c 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -43,7 +43,7 @@ pub use self::border::{BorderCornerRadius, BorderRadius, BorderSpacing}; pub use self::border::{BorderImageRepeat, BorderImageSideWidth}; pub use self::border::{BorderImageSlice, BorderImageWidth}; pub use self::box_::{AnimationIterationCount, AnimationName, Contain}; -pub use self::box_::{Appearance, BreakBetween, BreakWithin, ButtonAppearance, Clear, Float}; +pub use self::box_::{Appearance, BreakBetween, BreakWithin, Clear, Float}; pub use self::box_::{Display, Overflow, OverflowAnchor, TransitionProperty}; pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize}; pub use self::box_::{ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType}; diff --git a/components/style/values/specified/box.rs b/components/style/values/specified/box.rs index 82bb0ab9df0..b51634d5b3a 100644 --- a/components/style/values/specified/box.rs +++ b/components/style/values/specified/box.rs @@ -1844,31 +1844,6 @@ pub enum Appearance { Count, } -/// The effect of `appearance: button` on an element. -#[derive( - Clone, - Copy, - Debug, - Eq, - Hash, - MallocSizeOf, - Parse, - PartialEq, - SpecifiedValueInfo, - ToCss, - ToComputedValue, - ToResolvedValue, - ToShmem, -)] -#[repr(u8)] -pub enum ButtonAppearance { - /// `appearance: button` means the element is rendered with button - /// appearance. - Allow, - /// `appearance: button` is treated like `appearance: auto`. - Disallow, -} - /// A kind of break between two boxes. /// /// https://drafts.csswg.org/css-break/#break-between diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index 8de81acf8ff..8ddca48d599 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -37,7 +37,7 @@ pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth}; pub use self::border::{BorderImageRepeat, BorderImageSideWidth}; pub use self::border::{BorderRadius, BorderSideWidth, BorderSpacing, BorderStyle}; pub use self::box_::{AnimationIterationCount, AnimationName, Contain, Display}; -pub use self::box_::{Appearance, BreakBetween, BreakWithin, ButtonAppearance}; +pub use self::box_::{Appearance, BreakBetween, BreakWithin}; pub use self::box_::{Clear, Float, Overflow, OverflowAnchor}; pub use self::box_::{OverflowClipBox, OverscrollBehavior, Perspective, Resize}; pub use self::box_::{ScrollSnapAlign, ScrollSnapAxis, ScrollSnapStrictness, ScrollSnapType};