mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Uncomment more stuff related to box construction
This commit is contained in:
parent
c08cfbb5f3
commit
9cef3eee65
4 changed files with 226 additions and 202 deletions
|
@ -42,15 +42,24 @@ ${helpers.single_keyword(
|
|||
spec="Internal (not web-exposed)",
|
||||
)}
|
||||
|
||||
${helpers.single_keyword(
|
||||
"position",
|
||||
"static absolute relative fixed" + (" sticky" if engine in ["gecko", "servo-2013"] else ""),
|
||||
engines="gecko servo-2013 servo-2020",
|
||||
animation_value_type="discrete",
|
||||
flags="CREATES_STACKING_CONTEXT ABSPOS_CB",
|
||||
spec="https://drafts.csswg.org/css-position/#position-property",
|
||||
servo_restyle_damage="rebuild_and_reflow",
|
||||
)}
|
||||
<%helpers:single_keyword
|
||||
name="position"
|
||||
values="static absolute relative fixed ${'sticky' if engine in ['gecko', 'servo-2013'] else ''}"
|
||||
engines="gecko servo-2013 servo-2020"
|
||||
animation_value_type="discrete"
|
||||
flags="CREATES_STACKING_CONTEXT ABSPOS_CB"
|
||||
spec="https://drafts.csswg.org/css-position/#position-property"
|
||||
servo_restyle_damage="rebuild_and_reflow"
|
||||
>
|
||||
impl computed_value::T {
|
||||
pub fn is_absolutely_positioned(self) -> bool {
|
||||
match self {
|
||||
Self::Absolute | Self::Fixed => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
</%helpers:single_keyword>
|
||||
|
||||
${helpers.predefined_type(
|
||||
"float",
|
||||
|
|
|
@ -61,6 +61,13 @@ pub enum Float {
|
|||
None,
|
||||
}
|
||||
|
||||
impl Float {
|
||||
/// Returns true if `self` is not `None`.
|
||||
pub fn is_floating(self) -> bool {
|
||||
self != Self::None
|
||||
}
|
||||
}
|
||||
|
||||
impl ToComputedValue for SpecifiedFloat {
|
||||
type ComputedValue = Float;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue