Add support for position:sticky

This leverages the position:sticky support in WebRender to bring basic
support for position:sticky in Servo. There are still some issues with
nested sticky flows as well as a few other corner cases. Tests are
imported from WPT and can be removed once we update to the latest
version.
This commit is contained in:
Martin Robinson 2017-08-24 09:37:49 +02:00
parent 4725a05bfb
commit bc455c8a1f
84 changed files with 5729 additions and 50 deletions

View file

@ -2521,8 +2521,9 @@ impl Fragment {
return true
}
// Fixed position blocks always create stacking contexts.
if self.style.get_box().position == position::T::fixed {
// Fixed position and sticky position always create stacking contexts.
if self.style().get_box().position == position::T::fixed ||
self.style().get_box().position == position::T::sticky {
return true
}