mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Use reference frames explicitly for fixed positioning
Now that WebRender gives us reference frame ClipIds, we can use those to implement fixed positioning in Servo. This will allow us to remove the feature from WebRender entirely.
This commit is contained in:
parent
11a89bcc47
commit
32f00ef821
4 changed files with 160 additions and 50 deletions
|
@ -2474,6 +2474,12 @@ impl Fragment {
|
|||
stacking_relative_border_box.size.height - border_padding.vertical()))
|
||||
}
|
||||
|
||||
/// Returns true if this fragment may establish a reference frame.
|
||||
pub fn can_establish_reference_frame(&self) -> bool {
|
||||
!self.style().get_box().transform.0.is_empty() ||
|
||||
self.style().get_box().perspective != Perspective::None
|
||||
}
|
||||
|
||||
/// Returns true if this fragment has a filter, transform, or perspective property set.
|
||||
pub fn has_filter_transform_or_perspective(&self) -> bool {
|
||||
!self.style().get_box().transform.0.is_empty() ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue