servo/components/layout
bors-servo 89971910cf Auto merge of #18016 - BorisChiou:stylo/transform/rotate, r=heycam
stylo: Don't apply the rotation if it cannot be normalized.

According to the spec, the computed value of transform is as specified, but
with relative lengths converted into absolute lengths, so in Gecko, we do
nothing while computing the value of rotate3d(), and do normalization in
ProcessRotate3D(). If the direction cannot be normalized, we treat it as
an identity matrix.

However, in Servo, we do normalization in to_computed_value(), and looks
like we are trying to normalize any kind of direction vectors, so according
to the spec, let's move the normalization into Fragment::transform_matrix(),
and return an identity matrix if we cannot normalize its direction vector.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1388216](https://bugzilla.mozilla.org/show_bug.cgi?id=1388216).
- [X] These changes do not require tests because the added test is on Gecko side.

<!-- 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/18016)
<!-- Reviewable:end -->
2017-08-08 22:33:03 -05:00
..
animation.rs Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be backed out." 2017-07-20 17:26:53 +02:00
block.rs Allow CalculateStackingRelativePositions to short-circuit 2017-08-08 11:20:16 -07:00
Cargo.toml Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
construct.rs Bug 1374233 - Part 2: Add NonNegativeAu. 2017-08-04 14:21:57 +08:00
context.rs Speculatively evaluate paint functions during style. 2017-07-31 13:02:28 -05:00
data.rs layout: Stop doing unsafe transmutes between refcell references. 2017-05-25 10:31:40 +02:00
display_list_builder.rs Auto merge of #17845 - asajeffrey:script-paint-worklet-background-size, r=glennw 2017-08-07 16:54:35 -05:00
flex.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
floats.rs Untry 2017-06-18 13:21:51 +02:00
flow.rs Allow CalculateStackingRelativePositions to short-circuit 2017-08-08 11:20:16 -07:00
flow_list.rs Untry 2017-06-18 13:21:51 +02:00
flow_ref.rs Migrated -Z trace-layout to serde_json 2016-11-07 15:54:07 +08:00
fragment.rs Don't apply the rotation if it cannot be normalized. 2017-08-08 18:47:43 +08:00
generated_content.rs Code organization: Move all generic traversal code to layout::traversal 2017-08-08 10:53:19 -07:00
incremental.rs Force reflow in the sequential fallback of block format context 2017-04-23 08:32:25 +08:00
inline.rs Allow CalculateStackingRelativePositions to short-circuit 2017-08-08 11:20:16 -07:00
layout_debug.rs Update serde to 0.9 (fixes #15325) 2017-02-18 21:09:46 +01:00
lib.rs Replace all uses of the style::stylearc alias with servo_arc. 2017-07-19 09:29:05 +02:00
linked_list.rs Move util::linked_list to layout 2016-06-29 17:23:04 +02:00
list_item.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
model.rs stylo: Use ComputedValuesInner instead of ComputedValues when we don't need it 2017-07-17 18:02:25 -07:00
multicol.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
opaque_node.rs Introduce LayoutJS<Node>::opaque() to replace OpaqueNodeMethods::from_jsmanaged(). 2016-06-20 19:08:02 +02:00
parallel.rs Change the mis-named 'traverse_flow_tree_preorder' to 'reflow' 2017-08-08 10:53:20 -07:00
persistent_list.rs Move util::persistent_list to layout 2016-02-20 19:20:38 +01:00
query.rs Auto merge of #17783 - BorisChiou:stylo/animation/restrictions, r=nox 2017-08-07 11:05:17 -05:00
sequential.rs Change the mis-named 'traverse_flow_tree_preorder' to 'reflow' 2017-08-08 10:53:20 -07:00
table.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
table_caption.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
table_cell.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
table_colgroup.rs Fix fixed position items with parents with CSS clips 2017-08-03 17:52:02 +02:00
table_row.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
table_rowgroup.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
table_wrapper.rs Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
text.rs Bug 1374233 - Part 12: Implement ToAnimatedValue for LineHeight. 2017-08-04 14:23:28 +08:00
traversal.rs Allow CalculateStackingRelativePositions to short-circuit 2017-08-08 11:20:16 -07:00
webrender_helpers.rs Auto merge of #17783 - BorisChiou:stylo/animation/restrictions, r=nox 2017-08-07 11:05:17 -05:00
wrapper.rs script: Move the layout_wrapper outside of script. 2017-07-15 16:41:12 +02:00