diff options
author | Martin Robinson <mrobinson@igalia.com> | 2017-08-24 09:37:49 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2017-09-05 09:10:55 +0200 |
commit | bc455c8a1f5f355323c63e5d1639df2fcaaba5df (patch) | |
tree | 8cbe1bfbe8145242736759ed39c1cdd8b42eb683 /components/layout/webrender_helpers.rs | |
parent | 4725a05bfba0b588d19af8bc5cfe960bda1ea880 (diff) | |
download | servo-bc455c8a1f5f355323c63e5d1639df2fcaaba5df.tar.gz servo-bc455c8a1f5f355323c63e5d1639df2fcaaba5df.zip |
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.
Diffstat (limited to 'components/layout/webrender_helpers.rs')
-rw-r--r-- | components/layout/webrender_helpers.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/layout/webrender_helpers.rs b/components/layout/webrender_helpers.rs index 6e5a774e283..6370043542f 100644 --- a/components/layout/webrender_helpers.rs +++ b/components/layout/webrender_helpers.rs @@ -493,10 +493,11 @@ impl WebRenderDisplayItemConverter for DisplayItem { builder.push_clip_id(item.scroll_root.parent_id); let our_id = item.scroll_root.id; + let item_rect = item.scroll_root.clip.main.to_rectf(); let webrender_id = match item.scroll_root.root_type { ScrollRootType::Clip => { builder.define_clip(Some(our_id), - item.scroll_root.clip.main.to_rectf(), + item_rect, item.scroll_root.clip.get_complex_clips(), None) } @@ -508,6 +509,9 @@ impl WebRenderDisplayItemConverter for DisplayItem { None, scroll_sensitivity) } + ScrollRootType::StickyFrame(sticky_frame_info) => { + builder.define_sticky_frame(Some(our_id), item_rect, sticky_frame_info) + } }; debug_assert!(our_id == webrender_id); |