Skip to content

Commit 4945c0b

Browse files
authored
Auto merge of servo#29475 - mrobinson:fix-layout-2020-build, r=mukilan
Fix the layout 2020 build after euclid upgrade The euclid upgrade included some backward incompatible changes to the API. This changes updates a few function calls that used the old names. <!-- Please describe your changes on the following line: --> --- <!-- 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 do not require tests because they do not change behavior. <!-- 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. -->
2 parents 7dfc031 + 2440f71 commit 4945c0b

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

components/layout_2020/display_list/stacking_context.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl StackingContext {
355355
if let Some(transformed) = reference_frame_data
356356
.transform
357357
.inverse()
358-
.and_then(|inversed| inversed.transform_rect(&painting_area))
358+
.and_then(|inversed| inversed.outer_transformed_rect(&painting_area))
359359
{
360360
painting_area = transformed
361361
} else {
@@ -850,12 +850,12 @@ impl BoxFragment {
850850
.px();
851851
let transform_origin_z = transform_origin.depth.px();
852852

853-
let pre_transform = LayoutTransform::create_translation(
853+
let pre_transform = LayoutTransform::translation(
854854
transform_origin_x,
855855
transform_origin_y,
856856
transform_origin_z,
857857
);
858-
let post_transform = LayoutTransform::create_translation(
858+
let post_transform = LayoutTransform::translation(
859859
-transform_origin_x,
860860
-transform_origin_y,
861861
-transform_origin_z,
@@ -883,16 +883,10 @@ impl BoxFragment {
883883
.px(),
884884
);
885885

886-
let pre_transform = LayoutTransform::create_translation(
887-
perspective_origin.x,
888-
perspective_origin.y,
889-
0.0,
890-
);
891-
let post_transform = LayoutTransform::create_translation(
892-
-perspective_origin.x,
893-
-perspective_origin.y,
894-
0.0,
895-
);
886+
let pre_transform =
887+
LayoutTransform::translation(perspective_origin.x, perspective_origin.y, 0.0);
888+
let post_transform =
889+
LayoutTransform::translation(-perspective_origin.x, -perspective_origin.y, 0.0);
896890

897891
let perspective_matrix = LayoutTransform::from_untyped(
898892
&transform::create_perspective_matrix(length.px()),

0 commit comments

Comments
 (0)