mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Don't built stacking contexts or display lists for empty blocks.
This commit is contained in:
parent
4094d16323
commit
08427ccee5
6 changed files with 50 additions and 1 deletions
|
@ -2730,6 +2730,12 @@ impl Fragment {
|
|||
self.style().get_box().perspective != Perspective::None
|
||||
}
|
||||
|
||||
/// Returns true if this fragment has a transform applied that causes it to take up no space.
|
||||
pub fn has_non_invertible_transform(&self) -> bool {
|
||||
self.transform_matrix(&Rect::default())
|
||||
.map_or(false, |matrix| !matrix.is_invertible())
|
||||
}
|
||||
|
||||
/// Returns true if this fragment establishes a new stacking context and false otherwise.
|
||||
pub fn establishes_stacking_context(&self) -> bool {
|
||||
// Text fragments shouldn't create stacking contexts.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue