mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Add layout_2020 support for filters and mix-blend-mode
This commit is contained in:
parent
163a4fc7fc
commit
d03560b0f1
54 changed files with 236 additions and 1943 deletions
|
@ -354,41 +354,3 @@ impl<T> flow_relative::Rect<T> {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait ToWebRender {
|
||||
type Type;
|
||||
fn to_webrender(&self) -> Self::Type;
|
||||
}
|
||||
|
||||
impl ToWebRender for PhysicalPoint<Length> {
|
||||
type Type = webrender_api::units::LayoutPoint;
|
||||
fn to_webrender(&self) -> Self::Type {
|
||||
webrender_api::units::LayoutPoint::new(self.x.px(), self.y.px())
|
||||
}
|
||||
}
|
||||
|
||||
impl ToWebRender for PhysicalSize<Length> {
|
||||
type Type = webrender_api::units::LayoutSize;
|
||||
fn to_webrender(&self) -> Self::Type {
|
||||
webrender_api::units::LayoutSize::new(self.width.px(), self.height.px())
|
||||
}
|
||||
}
|
||||
|
||||
impl ToWebRender for PhysicalRect<Length> {
|
||||
type Type = webrender_api::units::LayoutRect;
|
||||
fn to_webrender(&self) -> Self::Type {
|
||||
webrender_api::units::LayoutRect::new(self.origin.to_webrender(), self.size.to_webrender())
|
||||
}
|
||||
}
|
||||
|
||||
impl ToWebRender for PhysicalSides<Length> {
|
||||
type Type = webrender_api::units::LayoutSideOffsets;
|
||||
fn to_webrender(&self) -> Self::Type {
|
||||
webrender_api::units::LayoutSideOffsets::new(
|
||||
self.top.px(),
|
||||
self.right.px(),
|
||||
self.bottom.px(),
|
||||
self.left.px(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue