Add layout_2020 support for transformations

This commit is contained in:
Martin Robinson 2020-02-19 09:46:09 +01:00
parent 9a760cfc02
commit 80b29380f1
238 changed files with 250 additions and 6319 deletions

View file

@ -4,6 +4,7 @@
use crate::geom::{PhysicalPoint, PhysicalRect, PhysicalSides, PhysicalSize};
use style::computed_values::mix_blend_mode::T as ComputedMixBlendMode;
use style::computed_values::transform_style::T as ComputedTransformStyle;
use style::values::computed::Filter as ComputedFilter;
use style::values::computed::Length;
use webrender_api as wr;
@ -57,6 +58,16 @@ impl ToWebRender for ComputedMixBlendMode {
}
}
impl ToWebRender for ComputedTransformStyle {
type Type = wr::TransformStyle;
fn to_webrender(&self) -> Self::Type {
match *self {
ComputedTransformStyle::Flat => wr::TransformStyle::Flat,
ComputedTransformStyle::Preserve3d => wr::TransformStyle::Preserve3D,
}
}
}
impl ToWebRender for PhysicalPoint<Length> {
type Type = webrender_api::units::LayoutPoint;
fn to_webrender(&self) -> Self::Type {