Auto merge of #16384 - canaltinova:shape-outside, r=Manishearth

stylo: Implement shape-outside property

shape-outside property implemented.
r=Manishearth in bugzilla

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #15958 and [Bug 1355003](https://bugzilla.mozilla.org/show_bug.cgi?id=1355003)

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16384)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-12 19:04:28 -05:00 committed by GitHub
commit 9d5dde2604
4 changed files with 162 additions and 118 deletions

View file

@ -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,