mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
stylo: Implement shape-outside property
This commit is contained in:
parent
df67977704
commit
d0619a7c5c
4 changed files with 162 additions and 118 deletions
|
@ -463,14 +463,23 @@ pub mod basic_shape {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<ShapeBox> for StyleGeometryBox {
|
||||
fn from(reference: ShapeBox) -> Self {
|
||||
use gecko_bindings::structs::StyleGeometryBox::*;
|
||||
match reference {
|
||||
ShapeBox::ContentBox => ContentBox,
|
||||
ShapeBox::PaddingBox => PaddingBox,
|
||||
ShapeBox::BorderBox => BorderBox,
|
||||
ShapeBox::MarginBox => MarginBox,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<GeometryBox> for StyleGeometryBox {
|
||||
fn from(reference: GeometryBox) -> Self {
|
||||
use gecko_bindings::structs::StyleGeometryBox::*;
|
||||
match reference {
|
||||
GeometryBox::ShapeBox(ShapeBox::ContentBox) => ContentBox,
|
||||
GeometryBox::ShapeBox(ShapeBox::PaddingBox) => PaddingBox,
|
||||
GeometryBox::ShapeBox(ShapeBox::BorderBox) => BorderBox,
|
||||
GeometryBox::ShapeBox(ShapeBox::MarginBox) => MarginBox,
|
||||
GeometryBox::ShapeBox(shape_box) => From::from(shape_box),
|
||||
GeometryBox::FillBox => FillBox,
|
||||
GeometryBox::StrokeBox => StrokeBox,
|
||||
GeometryBox::ViewBox => ViewBox,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue