mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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
This commit is contained in:
parent
ad0f63769c
commit
768db078ef
6 changed files with 3 additions and 48 deletions
|
@ -334,7 +334,6 @@ class Longhand(object):
|
|||
"BackgroundRepeat",
|
||||
"BorderImageRepeat",
|
||||
"BorderStyle",
|
||||
"ButtonAppearance",
|
||||
"Clear",
|
||||
"ColumnCount",
|
||||
"Contain",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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_::{
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue