mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
2020: paint background-color
This commit is contained in:
parent
4e8eeda976
commit
cfc3ffcd54
8 changed files with 143 additions and 24 deletions
|
@ -332,3 +332,12 @@ impl From<physical::Rect<Length>> for Rect<CSSPixel> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<physical::Rect<Length>> for webrender_api::units::LayoutRect {
|
||||
fn from(r: physical::Rect<Length>) -> Self {
|
||||
Rect {
|
||||
origin: Point::new(r.top_left.x.px(), r.top_left.y.px()),
|
||||
size: Size::new(r.size.x.px(), r.size.y.px()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue