mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
style: Make the generic size not use euclid under the hood.
The euclid size is not really used for anything. Also rename it to Size2D to avoid cbindgen conflicts with values::length::Size. Differential Revision: https://phabricator.services.mozilla.com/D20959
This commit is contained in:
parent
ebeb7b228f
commit
aad4dac5b4
4 changed files with 32 additions and 55 deletions
|
@ -12,7 +12,7 @@ use crate::values::generics::border::BorderImageSlice as GenericBorderImageSlice
|
|||
use crate::values::generics::border::BorderRadius as GenericBorderRadius;
|
||||
use crate::values::generics::border::BorderSpacing as GenericBorderSpacing;
|
||||
use crate::values::generics::rect::Rect;
|
||||
use crate::values::generics::size::Size;
|
||||
use crate::values::generics::size::Size2D;
|
||||
use crate::values::specified::length::{NonNegativeLength, NonNegativeLengthPercentage};
|
||||
use crate::values::specified::{AllowQuirks, NonNegativeNumber, NonNegativeNumberOrPercentage};
|
||||
use cssparser::Parser;
|
||||
|
@ -228,7 +228,7 @@ impl Parse for BorderCornerRadius {
|
|||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
Size::parse_with(context, input, NonNegativeLengthPercentage::parse)
|
||||
Size2D::parse_with(context, input, NonNegativeLengthPercentage::parse)
|
||||
.map(GenericBorderCornerRadius)
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ impl Parse for BorderSpacing {
|
|||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
Size::parse_with(context, input, |context, input| {
|
||||
Size2D::parse_with(context, input, |context, input| {
|
||||
NonNegativeLength::parse_quirky(context, input, AllowQuirks::Yes).map(From::from)
|
||||
})
|
||||
.map(GenericBorderSpacing)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue