diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-11-29 10:03:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 09:03:24 +0000 |
commit | a05598402e8b21948e1ee9567dca76a491bd266e (patch) | |
tree | a74aca7e7862100030ce94f34d448087329eaa1a /components/layout | |
parent | bab2b58216f8845b3ecc8e0eaeba3b7175034f64 (diff) | |
download | servo-a05598402e8b21948e1ee9567dca76a491bd266e.tar.gz servo-a05598402e8b21948e1ee9567dca76a491bd266e.zip |
Add initial support for sticky positioning for non-legacy layout (#30686)
* Add initial support for sticky positioning for non-legacy layout
Many tests still fail for a variety of reasons. One of the primary ones
is that CSSOM currently does not return correct values for elements
positioned by sticky nodes. This requires changes to WebRender to work
properly.
* Fix an assertion failure in the legacy layout sticky code
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/display_list/builder.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs index 207bb16266c..22a6934e117 100644 --- a/components/layout/display_list/builder.rs +++ b/components/layout/display_list/builder.rs @@ -2593,11 +2593,10 @@ impl BlockFlow { // order to properly calculate max offsets we need to compare our size and // position in our parent's coordinate system. let border_box_in_parent = self.stacking_relative_border_box(CoordinateSystem::Parent); - let margins = self.fragment.margin.to_physical( - self.base - .early_absolute_position_info - .relative_containing_block_mode, - ); + let margins = self + .fragment + .margin + .to_physical(self.fragment.style.writing_mode); // Position:sticky elements are always restricted based on the size and position of // their containing block, which for sticky items is like relative and statically |