Repository navigation
Don't create empty stacking contexts in display lists - #26758
Conversation
|
Heads up! This PR modifies the following files:
|
|
r? @mrobinson |
|
@bors-servo try=wpt |
Don't create empty stacking contexts in display lists A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26592 and fix #26590 - [x] There are tests for these changes
|
@bors-servo retry try=wpt-2020 |
Don't create empty stacking contexts in display lists A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26592 and fix #26590 - [x] There are tests for these changes
|
💔 Test failed - status-taskcluster |
|
@bors-servo try=wpt-2020 |
Don't create empty stacking contexts in display lists A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26592 and fix #26590 - [x] There are tests for these changes
|
💔 Test failed - status-taskcluster |
634d969 to
bbfdf7e
Compare
|
@bors-servo try=wpt-2020 |
Don't create empty stacking contexts in display lists A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26592 and fix #26590 - [x] There are tests for these changes
|
No need to review this yet. A lot of tests are failing that I need to investigate. |
|
@bors-servo try=wpt |
|
☀️ Test successful - status-taskcluster |
92bc291 to
c7b91b8
Compare
|
@mrobinson This PR is now ready for review. |
c7b91b8 to
a83cd7d
Compare
mrobinson
left a comment
There was a problem hiding this comment.
Nice! I think there is one check that is redudant, but otherwise this looks correct.
| let transform = self | ||
| .transform_matrix(&Rect::default()) | ||
| .unwrap_or(LayoutTransform::identity()); | ||
| !transform.is_invertible() |
There was a problem hiding this comment.
This could potentially be:
self.transform_matrix(&Rect::default())
.map(|matrix| transform.is_invertible())
.unwrap_or_else(false)
That would avoid creating an extra transformation matrix. Testing for invertability is sometimes expensive.
| } | ||
|
|
||
| /// Returns true if the given style contains a transform that is not invertible. | ||
| pub(crate) fn has_non_invertible_transform( |
There was a problem hiding this comment.
If you made this a method that took &self then I think you could avoid passing the style here.
| } | ||
|
|
||
| fn build(&mut self, builder: &mut DisplayListBuilder) { | ||
| // If this box fragment has a transform applied that makes it take up no space, |
There was a problem hiding this comment.
I think you can omit this check here, since you will not be adding this fragment to the StackingContextTree.
a83cd7d to
93306ec
Compare
93306ec to
2a83b80
Compare
|
@bors-servo r=mrobinson |
|
📌 Commit 2a83b80 has been approved by |
Don't create empty stacking contexts in display lists A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26592 and fix #26590 - [x] There are tests for these changes
|
💔 Test failed - status-taskcluster |
|
☀️ Test successful - status-taskcluster |
A recent change to euclid exposed that our display lists can contain Rects that contain NaN values. These NaNs originate from creating stacking contexts with transforms that scale the horizontal or vertical dimensions to 0. WebRender isn't prepared to handle these, so we need to not produce these empty stacking contexts when building the display list.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors