mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Tidy and sprinkle some comments.
This commit is contained in:
parent
3e27459ad3
commit
190e9b9715
3 changed files with 15 additions and 6 deletions
|
@ -825,8 +825,10 @@ impl LengthOrPercentage {
|
|||
/// Parse a length, treating dimensionless numbers as pixels
|
||||
///
|
||||
/// <https://www.w3.org/TR/SVG2/types.html#presentation-attribute-css-value>
|
||||
pub fn parse_numbers_are_pixels<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<LengthOrPercentage, ParseError<'i>> {
|
||||
pub fn parse_numbers_are_pixels<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<LengthOrPercentage, ParseError<'i>> {
|
||||
if let Ok(lop) = input.try(|i| Self::parse(context, i)) {
|
||||
return Ok(lop)
|
||||
}
|
||||
|
@ -840,9 +842,10 @@ impl LengthOrPercentage {
|
|||
/// Parse a non-negative length, treating dimensionless numbers as pixels
|
||||
///
|
||||
/// This is nonstandard behavior used by Firefox for SVG
|
||||
pub fn parse_numbers_are_pixels_non_negative<'i, 't>(context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>)
|
||||
-> Result<LengthOrPercentage, ParseError<'i>> {
|
||||
pub fn parse_numbers_are_pixels_non_negative<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<LengthOrPercentage, ParseError<'i>> {
|
||||
if let Ok(lop) = input.try(|i| Self::parse_non_negative(context, i)) {
|
||||
return Ok(lop)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue