Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and simplify layout traversal code #18004

Merged
merged 7 commits into from Aug 8, 2017

Conversation

mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Aug 8, 2017

Various refactorings of the code for traversing flow trees, including:

  • Add a generic inorder traversal method
  • Remove unused traverse_postorder_absolute_flows method
  • Combine compute_absolute_position and build_display_list into a single traversal
  • Move all generic traversal code into the layout::traversal module

And some changes to add documentation and more-accurate names:

  • Fix spelling of bottom_up_flow
  • Rename compute_absolute_position to compute_stacking_relative_position
  • Change the mis-named traverse_flow_tree_preorder to reflow

  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because they are refactoring only

This change is Reviewable

@highfive
Copy link

highfive commented Aug 8, 2017

Heads up! This PR modifies the following files:

  • @emilio: components/layout/table_caption.rs, components/layout/traversal.rs, components/layout/list_item.rs, components/layout/table_rowgroup.rs, components/layout/table_wrapper.rs and 11 more

@highfive
Copy link

highfive commented Aug 8, 2017

warning Warning warning

  • These commits modify layout code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 8, 2017
@mbrubeck
Copy link
Contributor Author

mbrubeck commented Aug 8, 2017

r? @pcwalton

@highfive highfive assigned pcwalton and unassigned nox Aug 8, 2017
}

flow.build_display_list(&mut self.state);
flow::mut_base(flow).restyle_damage.remove(REPOSITION|REPAINT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space before and after | here. r=me with that.

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 8, 2017
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Aug 8, 2017
@mbrubeck
Copy link
Contributor Author

mbrubeck commented Aug 8, 2017

@bors-servo r=pcwalton

@bors-servo
Copy link
Contributor

📌 Commit 4c39cf3 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 8, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 4c39cf3 with merge 2ae0d5b...

bors-servo pushed a commit that referenced this pull request Aug 8, 2017
Clean up and simplify layout traversal code

Various refactorings of the code for traversing flow trees, including:

* Add a generic inorder traversal method
* Remove unused `traverse_postorder_absolute_flows` method
* Combine `compute_absolute_position` and `build_display_list` into a single traversal
* Move all generic traversal code into the `layout::traversal` module

And some changes to add documentation and more-accurate names:

* Fix spelling of `bottom_up_flow`
* Rename `compute_absolute_position` to `compute_stacking_relative_position`
* Change the mis-named `traverse_flow_tree_preorder` to `reflow`

---
- [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 are refactoring only

<!-- 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/18004)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt4

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 8, 2017
@jdm
Copy link
Member

jdm commented Aug 8, 2017

  ▶ FAIL [expected PASS] /_mozilla/css/block_formatting_context_a.html
  └   → /_mozilla/css/block_formatting_context_a.html 4f82eff118ac3494d13f2dcbed10537815c6c124
/_mozilla/css/block_formatting_context_ref.html 798c3ed5bc0a93b79656ab76662d72f27e5a3d9a
Testing 4f82eff118ac3494d13f2dcbed10537815c6c124 == 798c3ed5bc0a93b79656ab76662d72f27e5a3d9a

  ▶ FAIL [expected PASS] /_mozilla/css/block_formatting_context_containing_floats_a.html
  └   → /_mozilla/css/block_formatting_context_containing_floats_a.html fe931b15fcd01cb6215644766fead1d7758e4799
/_mozilla/css/block_formatting_context_containing_floats_ref.html 365d87e8e576068d1a9db20fd8a1a758b0ad6503
Testing fe931b15fcd01cb6215644766fead1d7758e4799 == 365d87e8e576068d1a9db20fd8a1a758b0ad6503

  ▶ FAIL [expected PASS] /_mozilla/css/block_formatting_context_complex_a.html
  └   → /_mozilla/css/block_formatting_context_complex_a.html 9b49b486903a867d57275fb0369e61ab01014173
/_mozilla/css/block_formatting_context_complex_ref.html 7db3890ea65aa38d696dfe9158ddf671d9de72a1
Testing 9b49b486903a867d57275fb0369e61ab01014173 == 7db3890ea65aa38d696dfe9158ddf671d9de72a1

  ▶ FAIL [expected PASS] /_mozilla/css/block_formatting_context_float_placement_a.html
  └   → /_mozilla/css/block_formatting_context_float_placement_a.html 2177ddd2b4f6c0c305ef3fd67774be0b4ec899a5
/_mozilla/css/block_formatting_context_float_placement_ref.html 95d8b200e8dc159ac7397a048beadbd095e31144
Testing 2177ddd2b4f6c0c305ef3fd67774be0b4ec899a5 == 95d8b200e8dc159ac7397a048beadbd095e31144

  ▶ FAIL [expected PASS] /_mozilla/css/block_formatting_context_overflow_a.html
  └   → /_mozilla/css/block_formatting_context_overflow_a.html 07408e1c6e656cec765d55461be9e81ec8c4a2d6
/_mozilla/css/block_formatting_context_overflow_ref.html 8ac708ce02c77d747e658035f55419ce386b17f2
Testing 07408e1c6e656cec765d55461be9e81ec8c4a2d6 == 8ac708ce02c77d747e658035f55419ce386b17f2

  ▶ FAIL [expected PASS] /_mozilla/css/block_formatting_context_relative_a.html
  └   → /_mozilla/css/block_formatting_context_relative_a.html 48424147e92b5fdc86a5a91ebfe8cc675adff8a9
/_mozilla/css/block_formatting_context_ref.html 798c3ed5bc0a93b79656ab76662d72f27e5a3d9a
Testing 48424147e92b5fdc86a5a91ebfe8cc675adff8a9 == 798c3ed5bc0a93b79656ab76662d72f27e5a3d9a

  ▶ PASS [expected FAIL] /_mozilla/css/blur_a.html

  ▶ FAIL [expected PASS] /_mozilla/css/box_shadow_blur_fixed.html
  └   → /_mozilla/css/box_shadow_blur_fixed.html 8526671e6dc509f779909babc1fe9cff76ab3138
/_mozilla/css/box_shadow_blur_fixed_ref.html c79c2f08e0bfa1e9df3c2b8e7988ad89668b7784
Testing 8526671e6dc509f779909babc1fe9cff76ab3138 == c79c2f08e0bfa1e9df3c2b8e7988ad89668b7784

  ▶ FAIL [expected PASS] /_mozilla/css/clip_a.html
  └   → /_mozilla/css/clip_a.html ec50f88c098c7b230ef4f8d5c4561b795696ee32
/_mozilla/css/clip_ref.html d0f888c42eb18596904b09c8271cd7afccab1d5b
Testing ec50f88c098c7b230ef4f8d5c4561b795696ee32 == d0f888c42eb18596904b09c8271cd7afccab1d5b

  ▶ FAIL [expected PASS] /_mozilla/css/ellipsis_font_panic.html
  └   → /_mozilla/css/ellipsis_font_panic.html 2f96a36a603719ecf28d20a721f4126e3e32a6b4
/_mozilla/css/ellipsis_font_panic-ref.html 67bb5184b43d0c3e3776bb819fe1c967f1fe4f93
Testing 2f96a36a603719ecf28d20a721f4126e3e32a6b4 == 67bb5184b43d0c3e3776bb819fe1c967f1fe4f93

  ▶ FAIL [expected PASS] /_mozilla/css/img_width_style_intrinsic_width_a.html
  └   → /_mozilla/css/img_width_style_intrinsic_width_a.html 7dc00c5e03ce33c3ac2cf9fb6d48fc5815f43735
/_mozilla/css/img_width_style_intrinsic_width_ref.html 244eaf46b725f8925c51a3c0d93eb50f5c02b024
Testing 7dc00c5e03ce33c3ac2cf9fb6d48fc5815f43735 == 244eaf46b725f8925c51a3c0d93eb50f5c02b024

  ▶ FAIL [expected PASS] /_mozilla/css/inline_absolute_hypothetical_clip_a.html
  └   → /_mozilla/css/inline_absolute_hypothetical_clip_a.html d002247e6a79b49d9ec7693466883e37960dad60
/_mozilla/css/inline_absolute_hypothetical_clip_ref.html 3696b325d7b6f9870976d06bd7e39981b05d084a
Testing d002247e6a79b49d9ec7693466883e37960dad60 == 3696b325d7b6f9870976d06bd7e39981b05d084a

  ▶ FAIL [expected PASS] /_mozilla/css/inline_block_overflow_hidden_a.html
  └   → /_mozilla/css/inline_block_overflow_hidden_a.html 94e9ba231864c05e9dd61d8db33207fb85ad071f
/_mozilla/css/inline_block_overflow_hidden_ref.html 2ced5bf7487dfedb4614d62c84d84bf5235d4ec6
Testing 94e9ba231864c05e9dd61d8db33207fb85ad071f == 2ced5bf7487dfedb4614d62c84d84bf5235d4ec6

  ▶ FAIL [expected PASS] /_mozilla/css/inline_stacking_context.html
  └   → /_mozilla/css/inline_stacking_context.html 4082d5be25d295358a9650d43d6c37e3ca3b11c0
/_mozilla/css/inline_stacking_context_ref.html 13f996cd50a7d3b48c9073e32453fb62e045c431
Testing 4082d5be25d295358a9650d43d6c37e3ca3b11c0 == 13f996cd50a7d3b48c9073e32453fb62e045c431

  ▶ FAIL [expected PASS] /_mozilla/css/input_selection_a.html
  └   → /_mozilla/css/input_selection_a.html 201b58401496d16d65583fa248bb9c4f3383703c
/_mozilla/css/input_selection_ref.html 687fea6257fdf4a7145f37640c9bfead303e1307
Testing 201b58401496d16d65583fa248bb9c4f3383703c == 687fea6257fdf4a7145f37640c9bfead303e1307

  ▶ FAIL [expected PASS] /_mozilla/css/list_item_overflow.html
  └   → /_mozilla/css/list_item_overflow.html cb684abcf72ddd27e284243e3392afe8a5040f5f
/_mozilla/css/list_item_overflow_ref.html 03129aff89ccd55ce9c70345042bfdb40b2ce5a8
Testing cb684abcf72ddd27e284243e3392afe8a5040f5f == 03129aff89ccd55ce9c70345042bfdb40b2ce5a8

  ▶ FAIL [expected PASS] /_mozilla/css/list_style_fixed_inside_a.html
  └   → /_mozilla/css/list_style_fixed_inside_a.html 94480f2c151502c1bc08f7290ca9ec72d3c55351
/_mozilla/css/list_style_fixed_inside_ref.html edd64a5a8deffb6dbcf9793096ef41e885f5f9e6
Testing 94480f2c151502c1bc08f7290ca9ec72d3c55351 == edd64a5a8deffb6dbcf9793096ef41e885f5f9e6

  ▶ FAIL [expected PASS] /_mozilla/css/opacity_simple_a.html
  └   → /_mozilla/css/opacity_simple_a.html 711031cae048f6e85151a3b03c5409e09b1fa9e9
/_mozilla/css/opacity_simple_ref.html 7e587c5e07996707ac06d29a5e2dd2443b3c7172
Testing 711031cae048f6e85151a3b03c5409e09b1fa9e9 == 7e587c5e07996707ac06d29a5e2dd2443b3c7172

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_auto.html
  └   → /_mozilla/css/overflow_auto.html 5fc5daa41d2f7c5a6cadeb9512b4ee0bb01b0b85
/_mozilla/css/overflow_simple_b.html 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6
Testing 5fc5daa41d2f7c5a6cadeb9512b4ee0bb01b0b85 == 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_clipping.html
  └   → /_mozilla/css/overflow_clipping.html ead8180c4ce22e24d7b14d19be92da354185f309
/_mozilla/css/overflow_clipping_ref.html 4ab4e360619244c97da324adb1f874f36626ca00
Testing ead8180c4ce22e24d7b14d19be92da354185f309 == 4ab4e360619244c97da324adb1f874f36626ca00

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_hidden_clip.html
  └   → /_mozilla/css/overflow_hidden_clip.html 37f278d76fe0c90969348a33f03c20ee961e39bb
/_mozilla/css/overflow_hidden_clip_ref.html 4a260e896b8d27619ff4a2fbc6a65c34a90d6cd2
Testing 37f278d76fe0c90969348a33f03c20ee961e39bb == 4a260e896b8d27619ff4a2fbc6a65c34a90d6cd2

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_border_radius.html
  └   → /_mozilla/css/overflow_border_radius.html 31092796b65a3c2fab62641b9c4f4c29807c8eb3
/_mozilla/css/overflow_border_radius_ref.html de0e602c1c9ba1a96f5ed9af8c5b45e25b60d31c
Testing 31092796b65a3c2fab62641b9c4f4c29807c8eb3 == de0e602c1c9ba1a96f5ed9af8c5b45e25b60d31c

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_position_abs_simple_a.html
  └   → /_mozilla/css/overflow_position_abs_simple_a.html 314d194a3928aeb71b6b37421f080e1d509c7930
/_mozilla/css/overflow_position_abs_simple_b.html 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6
Testing 314d194a3928aeb71b6b37421f080e1d509c7930 == 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_position_rel_inline_block.html
  └   → /_mozilla/css/overflow_position_rel_inline_block.html 38753d5bc881a3865835a6f04b6245fcf26b2ad3
/_mozilla/css/overflow_position_rel_inline_block_ref.html 2d5103c1d79069b6628ffe931d05456e5b9244b2
Testing 38753d5bc881a3865835a6f04b6245fcf26b2ad3 == 2d5103c1d79069b6628ffe931d05456e5b9244b2

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_scroll.html
  └   → /_mozilla/css/overflow_scroll.html 5fc5daa41d2f7c5a6cadeb9512b4ee0bb01b0b85
/_mozilla/css/overflow_simple_b.html 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6
Testing 5fc5daa41d2f7c5a6cadeb9512b4ee0bb01b0b85 == 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_simple_a.html
  └   → /_mozilla/css/overflow_simple_a.html 5fc5daa41d2f7c5a6cadeb9512b4ee0bb01b0b85
/_mozilla/css/overflow_simple_b.html 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6
Testing 5fc5daa41d2f7c5a6cadeb9512b4ee0bb01b0b85 == 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_transformed_sc.html
  └   → /_mozilla/css/overflow_transformed_sc.html 8fed8d23b7ddbc41c932c6574e4f1d3bc3aad6c5
/_mozilla/css/overflow_transformed_sc_ref.html c390fe7f16c0c8ac284080ea5fdffc379abeab9b
Testing 8fed8d23b7ddbc41c932c6574e4f1d3bc3aad6c5 == c390fe7f16c0c8ac284080ea5fdffc379abeab9b

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_transformed_sc_rotate.html
  └   → /_mozilla/css/overflow_transformed_sc_rotate.html 038ae425a3a28bf311023e2f924f36da784a1d01
/_mozilla/css/overflow_transformed_sc_rotate_ref.html 7df96ca632ece395ebfecc210a38768320ee4110
Testing 038ae425a3a28bf311023e2f924f36da784a1d01 == 7df96ca632ece395ebfecc210a38768320ee4110

  ▶ FAIL [expected PASS] /_mozilla/css/overflow_xy_a.html
  └   → /_mozilla/css/overflow_xy_a.html 314d194a3928aeb71b6b37421f080e1d509c7930
/_mozilla/css/overflow_xy_ref.html 0cdea97738e004fdb6ce082ac0094c30dafb711c
Testing 314d194a3928aeb71b6b37421f080e1d509c7930 == 0cdea97738e004fdb6ce082ac0094c30dafb711c

  ▶ FAIL [expected PASS] /_mozilla/css/position_fixed_a.html
  └   → /_mozilla/css/position_fixed_a.html e022dbfafcaf458d8dc6a8c3ff30816b8ac86e24
/_mozilla/css/position_fixed_b.html 41f4f8740bc8a5e447b694f41b6dccb18fe15a70
Testing e022dbfafcaf458d8dc6a8c3ff30816b8ac86e24 == 41f4f8740bc8a5e447b694f41b6dccb18fe15a70

  ▶ FAIL [expected PASS] /_mozilla/css/position_fixed_overflow_a.html
  └   → /_mozilla/css/position_fixed_overflow_a.html 37a61736347b0d96d38a8991c227b272747d106a
/_mozilla/css/position_fixed_overflow_b.html 7bba41417c6eab5040443ca60ff7d64041d4886a
Testing 37a61736347b0d96d38a8991c227b272747d106a == 7bba41417c6eab5040443ca60ff7d64041d4886a

  ▶ FAIL [expected PASS] /_mozilla/css/position_fixed_static_y_a.html
  └   → /_mozilla/css/position_fixed_static_y_a.html fc0a1b0ac011a551cfe850ff8917c9c55b0df4db
/_mozilla/css/position_fixed_static_y_b.html 6e4c4c1e6c12f984a92023b29d6c1d4645c506f2
Testing fc0a1b0ac011a551cfe850ff8917c9c55b0df4db == 6e4c4c1e6c12f984a92023b29d6c1d4645c506f2

  ▶ FAIL [expected PASS] /_mozilla/css/position_fixed_tile_edge.html
  └   → /_mozilla/css/position_fixed_tile_edge.html c27fceaefb00ffb19c1d924e559efb24f2d1c545
/_mozilla/css/position_fixed_tile_edge_ref.html 151110622df370e341f6d6c3cc455b5c7cbddad8
Testing c27fceaefb00ffb19c1d924e559efb24f2d1c545 == 151110622df370e341f6d6c3cc455b5c7cbddad8

  ▶ FAIL [expected PASS] /_mozilla/css/pseudo_content_with_layers.html
  └   → /_mozilla/css/pseudo_content_with_layers.html 98777ec597a39caa88e07552a6572f97fbcc813c
/_mozilla/css/pseudo_content_with_layers_ref.html be55332cad2b61c42f2e0e81bc1dcc3977ef38ab
Testing 98777ec597a39caa88e07552a6572f97fbcc813c == be55332cad2b61c42f2e0e81bc1dcc3977ef38ab

  ▶ FAIL [expected PASS] /_mozilla/css/stacked_layers.html
  └   → /_mozilla/css/stacked_layers.html 564d807fbf0a77f6c1e931129bdc6fc5ec5d5ec2
/_mozilla/css/stacked_layers_ref.html 6837a3290609b605c45754a5f8beaa3384f092be
Testing 564d807fbf0a77f6c1e931129bdc6fc5ec5d5ec2 == 6837a3290609b605c45754a5f8beaa3384f092be

  ▶ FAIL [expected PASS] /_mozilla/css/stacking_context_rtl.html
  └   → /_mozilla/css/stacking_context_rtl.html 5aa4f4c895140399d86dc620eaef3088e6ddbf6e
/_mozilla/css/stacking_context_rtl-ref.html 189364d1b70fb922d8a17ab7704557514a7fb6d2
Testing 5aa4f4c895140399d86dc620eaef3088e6ddbf6e == 189364d1b70fb922d8a17ab7704557514a7fb6d2

  ▶ FAIL [expected PASS] /_mozilla/css/text_overflow_reflow.html
  └   → /_mozilla/css/text_overflow_reflow.html 30d87bf59a8a4241439669a58dae28e82eb0ac56
/_mozilla/css/text_overflow_reflow_ref.html 23b755622cc81841a23cc8431a6546dfb1401c66
Testing 30d87bf59a8a4241439669a58dae28e82eb0ac56 == 23b755622cc81841a23cc8431a6546dfb1401c66

  ▶ FAIL [expected PASS] /_mozilla/css/transform_3d.html
  └   → /_mozilla/css/transform_3d.html 11d232ff8895d697f3068d36292712decdd3b0f2
/_mozilla/css/transform_3d_ref.html 77e09b2d340114a94a3cab4e8df0fee60f06f14c
Testing 11d232ff8895d697f3068d36292712decdd3b0f2 == 77e09b2d340114a94a3cab4e8df0fee60f06f14c

  ▶ FAIL [expected PASS] /_mozilla/css/transform_scroll_layer.html
  └   → /_mozilla/css/transform_scroll_layer.html adc2c36e3cbd25d722925d0fda54d541def392bb
/_mozilla/css/transform_scroll_layer_ref.html 6c5e3690d4dee019270f52fd929bc93e383c6ba5
Testing adc2c36e3cbd25d722925d0fda54d541def392bb == 6c5e3690d4dee019270f52fd929bc93e383c6ba5

  ▶ FAIL [expected PASS] /_mozilla/css/transform_simple_a.html
  └   → /_mozilla/css/transform_simple_a.html faa0958ff0ee0baef42b58811a91eb374cede0af
/_mozilla/css/transform_simple_ref.html c4b57a6d0949a88eb84ab20e9b0264811522c8ab
Testing faa0958ff0ee0baef42b58811a91eb374cede0af == c4b57a6d0949a88eb84ab20e9b0264811522c8ab

  ▶ FAIL [expected PASS] /_mozilla/css/translate_clip.html
  └   → /_mozilla/css/translate_clip.html c8e2f4d1c276be65aeef478c9f2002b3da78aaa6
/_mozilla/css/translate_clip_ref.html 314d194a3928aeb71b6b37421f080e1d509c7930
Testing c8e2f4d1c276be65aeef478c9f2002b3da78aaa6 == 314d194a3928aeb71b6b37421f080e1d509c7930

  ▶ FAIL [expected PASS] /_mozilla/css/iframe/stacking_context.html
  └   → /_mozilla/css/iframe/stacking_context.html 6404828730ab6ebb15212e5e18ef63d5435ae469
/_mozilla/css/iframe/stacking_context_ref.html cd216a954c1781a77e94e9b9c404fddc13666b21
Testing 6404828730ab6ebb15212e5e18ef63d5435ae469 == cd216a954c1781a77e94e9b9c404fddc13666b21

  ▶ FAIL [expected PASS] /_mozilla/mozilla/details_ui_opened.html
  └   → /_mozilla/mozilla/details_ui_opened.html d8d26c284541a1505791f079973b22beb6081e6a
/_mozilla/mozilla/details_ui_opened_ref.html e5f7c2d2db73bb0092a876d136ab976f37ba821b
Testing d8d26c284541a1505791f079973b22beb6081e6a == e5f7c2d2db73bb0092a876d136ab976f37ba821b

  ▶ FAIL [expected PASS] /_mozilla/mozilla/scrolling_div_background_borders.html
  └   → /_mozilla/mozilla/scrolling_div_background_borders.html f2f724dafa84ac0285610221bcdf55f1b99c7637
/_mozilla/mozilla/scrolling_div_background_borders_ref.html 4255bb9040a093c2a6a87b459fa70c01c821b970
Testing f2f724dafa84ac0285610221bcdf55f1b99c7637 == 4255bb9040a093c2a6a87b459fa70c01c821b970

  ▶ FAIL [expected PASS] /_mozilla/mozilla/simple_scroll_to_fragment.html
  └   → /_mozilla/mozilla/simple_scroll_to_fragment.html 4e902b1c3b81638251998280899856ea35f58c29
/_mozilla/mozilla/simple_scroll_to_fragment_ref.html 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6
Testing 4e902b1c3b81638251998280899856ea35f58c29 == 7949e80732fa0f4afdbae3b1cad96ccd75bb04f6

  ▶ Unexpected subtest result in /_mozilla/mozilla/element_parentOffset.html:
  │ FAIL [expected PASS] Untitled
  │   → assert_equals: expected 125 but got -25
  │ 
  │ @http://web-platform.test:8000/_mozilla/mozilla/element_parentOffset.html:44:17
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1406:20
  │ test@http://web-platform.test:8000/resources/testharness.js:497:9
  └ @http://web-platform.test:8000/_mozilla/mozilla/element_parentOffset.html:37:15

  ▶ Unexpected subtest result in /_mozilla/mozilla/getBoundingClientRect.html:
  │ FAIL [expected PASS] Untitled 1
  │   → assert_equals: expected 55 but got 0
  │ 
  │ test_rect@http://web-platform.test:8000/_mozilla/mozilla/getBoundingClientRect.html:58:7
  │ @http://web-platform.test:8000/_mozilla/mozilla/getBoundingClientRect.html:83:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1406:20
  │ test@http://web-platform.test:8000/resources/testharness.js:497:9
  └ @http://web-platform.test:8000/_mozilla/mozilla/getBoundingClientRect.html:82:5

  ▶ Unexpected subtest result in /_mozilla/mozilla/hit_test_multiple_sc.html:
  │ FAIL [expected PASS] Hit testing works for following stacking contexts
  │   → assert_true: Should be the second stacking context expected true got false
  │ 
  │ window.onload<@http://web-platform.test:8000/_mozilla/mozilla/hit_test_multiple_sc.html:22:5
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1406:20
  └ Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1430:20

  ▶ Unexpected subtest result in /_mozilla/mozilla/scrollBy.html:
  │ FAIL [expected PASS] Ensure that the window.scrollBy function affects scroll position as expected
  │   → assert_equals: expected Element node <html><head><meta charset="utf-8">
<title>Ensure that the... but got Element node <a id="link" href="http://mozilla.org">This is some link ...
  │ 
  │ @http://web-platform.test:8000/_mozilla/mozilla/scrollBy.html:21:9
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1406:20
  │ test@http://web-platform.test:8000/resources/testharness.js:497:9
  └ @http://web-platform.test:8000/_mozilla/mozilla/scrollBy.html:10:5

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 8, 2017
@mbrubeck
Copy link
Contributor Author

mbrubeck commented Aug 8, 2017

@bors-servo r=pcwalton

The test failures were caused by the commit that combined compute_absolute_position and build_display_list into a single traversal. Reverted that change (except for a few minor parts that I extracted into separate commits).

@bors-servo
Copy link
Contributor

📌 Commit 75bf708 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 8, 2017
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 8, 2017
@mbrubeck
Copy link
Contributor Author

mbrubeck commented Aug 8, 2017

@bors-servo r=pcwalton

Restored some more cleanup from the reverted commit.

@bors-servo
Copy link
Contributor

📌 Commit ca300d6 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 8, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit ca300d6 with merge ed3c2b9...

bors-servo pushed a commit that referenced this pull request Aug 8, 2017
Clean up and simplify layout traversal code

Various refactorings of the code for traversing flow trees, including:

* Add a generic inorder traversal method
* Remove unused `traverse_postorder_absolute_flows` method
* Combine `compute_absolute_position` and `build_display_list` into a single traversal
* Move all generic traversal code into the `layout::traversal` module

And some changes to add documentation and more-accurate names:

* Fix spelling of `bottom_up_flow`
* Rename `compute_absolute_position` to `compute_stacking_relative_position`
* Change the mis-named `traverse_flow_tree_preorder` to `reflow`

---
- [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 are refactoring only

<!-- 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/18004)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: pcwalton
Pushing ed3c2b9 to master...

@bors-servo bors-servo merged commit ca300d6 into servo:master Aug 8, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants