Auto merge of #14703 - canaltinova:perspective-transform, r=Wafflespeanut

Add gecko glue for perspective/transform properties

<!-- Please describe your changes on the following line: -->
To be able to add glue for these properties,  we needed to change their structs. They are moved from effects to box and added stylo glue.
This PR covers these properties:
- perspective
- perspective-origin
- backface-visibility
- transform-box
- transform-style
- transform-origin

---
<!-- 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

<!-- Either: -->
- [X] These changes do not require tests because they are stylo changes

<!-- 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/14703)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-12-26 21:48:52 -08:00 committed by GitHub
commit a6d206eb66
8 changed files with 282 additions and 226 deletions

View file

@ -1567,9 +1567,9 @@ impl FragmentDisplayListBuilding for Fragment {
let overflow = base_flow.overflow.paint.translate(&-border_box_offset);
let transform = self.transform_matrix(&border_box);
let perspective = match self.style().get_effects().perspective {
let perspective = match self.style().get_box().perspective {
Either::First(length) => {
let perspective_origin = self.style().get_effects().perspective_origin;
let perspective_origin = self.style().get_box().perspective_origin;
let perspective_origin =
Point2D::new(model::specified(perspective_origin.horizontal,
border_box.size.width).to_f32_px(),
@ -1822,7 +1822,7 @@ impl FragmentDisplayListBuilding for Fragment {
Some(ref operations) => operations,
};
let transform_origin = &self.style.get_effects().transform_origin;
let transform_origin = &self.style.get_box().transform_origin;
let transform_origin_x = model::specified(transform_origin.horizontal,
stacking_relative_border_box.size
.width).to_f32_px();

View file

@ -2370,7 +2370,7 @@ impl Fragment {
// TODO(mrobinson): Determine if this is necessary, since blocks with
// transformations already create stacking contexts.
if let Either::First(ref _length) = self.style().get_effects().perspective {
if let Either::First(ref _length) = self.style().get_box().perspective {
return true
}