mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement the unitless length quirk for physical size properties
This commit is contained in:
parent
0e7308e6dc
commit
65f74ea934
3 changed files with 11 additions and 25 deletions
|
@ -1360,7 +1360,16 @@ impl LengthOrPercentageOrAuto {
|
|||
/// Parse a non-negative length, percentage, or auto.
|
||||
#[inline]
|
||||
pub fn parse_non_negative(context: &ParserContext, input: &mut Parser) -> Result<LengthOrPercentageOrAuto, ()> {
|
||||
Self::parse_internal(context, input, AllowedLengthType::NonNegative, AllowQuirks::No)
|
||||
Self::parse_non_negative_quirky(context, input, AllowQuirks::No)
|
||||
}
|
||||
|
||||
/// Parse a non-negative length, percentage, or auto.
|
||||
#[inline]
|
||||
pub fn parse_non_negative_quirky(context: &ParserContext,
|
||||
input: &mut Parser,
|
||||
allow_quirks: AllowQuirks)
|
||||
-> Result<Self, ()> {
|
||||
Self::parse_internal(context, input, AllowedLengthType::NonNegative, allow_quirks)
|
||||
}
|
||||
|
||||
/// Returns the `auto` value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue