mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement the unitless length quirk for font-size
This commit is contained in:
parent
ba59fafb44
commit
0e7308e6dc
5 changed files with 30 additions and 18 deletions
|
@ -1204,7 +1204,16 @@ impl LengthOrPercentage {
|
|||
/// Parse a non-negative length.
|
||||
#[inline]
|
||||
pub fn parse_non_negative(context: &ParserContext, input: &mut Parser) -> Result<LengthOrPercentage, ()> {
|
||||
Self::parse_internal(context, input, AllowedLengthType::NonNegative, AllowQuirks::No)
|
||||
Self::parse_non_negative_quirky(context, input, AllowQuirks::No)
|
||||
}
|
||||
|
||||
/// Parse a non-negative length, with quirks.
|
||||
#[inline]
|
||||
pub fn parse_non_negative_quirky(context: &ParserContext,
|
||||
input: &mut Parser,
|
||||
allow_quirks: AllowQuirks)
|
||||
-> Result<LengthOrPercentage, ()> {
|
||||
Self::parse_internal(context, input, AllowedLengthType::NonNegative, allow_quirks)
|
||||
}
|
||||
|
||||
/// Parse a length, treating dimensionless numbers as pixels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue