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
This commit is contained in:
Martin Robinson 2023-11-29 10:03:24 +01:00 committed by GitHub
parent bab2b58216
commit a05598402e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 248 additions and 1206 deletions

View file

@ -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