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
Conversation
Heads up! This PR modifies the following files:
|
r? @pcwalton |
components/layout/traversal.rs
Outdated
} | ||
|
||
flow.build_display_list(&mut self.state); | ||
flow::mut_base(flow).restyle_damage.remove(REPOSITION|REPAINT); |
There was a problem hiding this comment.
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.
6655cbc
to
4c39cf3
Compare
@bors-servo r=pcwalton |
📌 Commit 4c39cf3 has been approved by |
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 -->
💔 Test failed - mac-rel-wpt4 |
|
4c39cf3
to
75bf708
Compare
@bors-servo r=pcwalton The test failures were caused by the commit that combined |
📌 Commit 75bf708 has been approved by |
75bf708
to
ca300d6
Compare
@bors-servo r=pcwalton Restored some more cleanup from the reverted commit. |
📌 Commit ca300d6 has been approved by |
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 -->
☀️ 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 |
Various refactorings of the code for traversing flow trees, including:
traverse_postorder_absolute_flows
methodcompute_absolute_position
andbuild_display_list
into a single traversallayout::traversal
moduleAnd some changes to add documentation and more-accurate names:
bottom_up_flow
compute_absolute_position
tocompute_stacking_relative_position
traverse_flow_tree_preorder
toreflow
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is