Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSequential layout bug with (possibly) RTL direction #11818
Comments
|
It seems like there are two main issues:
|
|
This could have something to do with dirty bits. Perhaps we are checking different dirty bits in parallel mode and sequential mode and incorrectly bailing out earlier in the latter? |
|
Would disabling incremental layout make the problem go away in that case? That seems like an easy test. |
|
Yes, it's worth a shot! |
|
When I force it to combine sequential restyle with parallel layout, I get both outputs depending on whether Satan manages to get into my computer before Hades blocks the entry off. Both of these screenshots were produced by running this command:
And I used this patch: diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index 403f30a..b023187 100644
--- a/components/layout_thread/lib.rs
+++ b/components/layout_thread/lib.rs
@@ -1155,17 +1155,8 @@ impl LayoutThread {
self.profiler_metadata(),
self.time_profiler_chan.clone(),
|| {
- // Perform CSS selector matching and flow construction.
- match self.parallel_traversal {
- None => {
- sequential::traverse_dom::<ServoLayoutNode, RecalcStyleAndConstructFlows>(
- node, &shared_layout_context);
- }
- Some(ref mut traversal) => {
- parallel::traverse_dom::<ServoLayoutNode, RecalcStyleAndConstructFlows>(
- node, &shared_layout_context, traversal);
- }
- }
+ sequential::traverse_dom::<ServoLayoutNode, RecalcStyleAndConstructFlows>(
+ node, &shared_layout_context);
});
// TODO(pcwalton): Measure energy usage of text shaping, perhaps?I don't think there's anything interesting about the combination of parallel layout and sequential restyle, except for how it forces the race to go. |
Add a flag to dump the computed style values I used this to trace #11818 to a style bug, rather than a layout bug. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not fix any issues - [X] These changes do not require tests because debugging <!-- 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/12831) <!-- Reviewable:end -->
Fix a cached style cascade bug that only manifested in sequential mode When copying cached styles, keep the `writing_mode` up to date. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11818 (github issue number if applicable). - [...] There are tests for these changes NOTE TO THE REVIEWER: This PR contains a test that works, but I need to run the test in sequential mode (couldn't figure out how to make it show up in parallel mode). What do I need to do to make the test harness pass `-y1` to Servo? <!-- 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/12839) <!-- Reviewable:end -->
Fix a cached style cascade bug that only manifested in sequential mode When copying cached styles, keep the `writing_mode` up to date. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11818 (github issue number if applicable). - [...] There are tests for these changes NOTE TO THE REVIEWER: This PR contains a test that works, but I need to run the test in sequential mode (couldn't figure out how to make it show up in parallel mode). What do I need to do to make the test harness pass `-y1` to Servo? <!-- 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/12839) <!-- Reviewable:end -->
Fix a cached style cascade bug that only manifested in sequential mode When copying cached styles, keep the `writing_mode` up to date. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11818 (github issue number if applicable). - [X] There are tests for these changes EDIT: The test is now working. I ran it with the first commit (the actual fix) reverted and it failed. <!-- 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/12839) <!-- Reviewable:end -->
Fix a cached style cascade bug that only manifested in sequential mode When copying cached styles, keep the `writing_mode` up to date. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11818 (github issue number if applicable). - [X] There are tests for these changes EDIT: The test is now working. I ran it with the first commit (the actual fix) reverted and it failed. <!-- 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/12839) <!-- Reviewable:end -->
I used this to trace servo#11818 to a style bug, rather than a layout bug.



When we use the sequential layout traversal, there's an error with overconstrained_block.html and div_align.html.
Discovered while testing #11713