mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Handle 3- and 4- valued <position>s in specified style
This commit is contained in:
parent
f84e01ecaf
commit
4eb93c85bc
3 changed files with 182 additions and 48 deletions
|
@ -265,8 +265,10 @@ impl Circle {
|
|||
} else {
|
||||
// Defaults to origin
|
||||
Position {
|
||||
horizontal: LengthOrPercentage::Percentage(Percentage(0.5)),
|
||||
vertical: LengthOrPercentage::Percentage(Percentage(0.5)),
|
||||
horiz_keyword: None,
|
||||
horiz_position: Some(LengthOrPercentage::Percentage(Percentage(0.5))),
|
||||
vert_keyword: None,
|
||||
vert_position: Some(LengthOrPercentage::Percentage(Percentage(0.5))),
|
||||
}
|
||||
};
|
||||
Ok(Circle {
|
||||
|
@ -329,8 +331,10 @@ impl Ellipse {
|
|||
} else {
|
||||
// Defaults to origin
|
||||
Position {
|
||||
horizontal: LengthOrPercentage::Percentage(Percentage(0.5)),
|
||||
vertical: LengthOrPercentage::Percentage(Percentage(0.5)),
|
||||
horiz_keyword: None,
|
||||
horiz_position: Some(LengthOrPercentage::Percentage(Percentage(0.5))),
|
||||
vert_keyword: None,
|
||||
vert_position: Some(LengthOrPercentage::Percentage(Percentage(0.5))),
|
||||
}
|
||||
};
|
||||
Ok(Ellipse {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue