diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-05-15 15:48:12 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-05-19 09:05:48 +0200 |
commit | c56a81480647805e8ef5567d77a38568ccfcd9f2 (patch) | |
tree | 87e8836fe5fbee2762f5a25b36873898d6c9be0f /components/layout_thread/lib.rs | |
parent | 918557ad6d04cd2bd73516e9ccb9019bdaa53500 (diff) | |
download | servo-c56a81480647805e8ef5567d77a38568ccfcd9f2.tar.gz servo-c56a81480647805e8ef5567d77a38568ccfcd9f2.zip |
Add a compositor-side scroll tree
This will allow the compositor to properly chain scrolling requests up
when a node has reached the extent of the scroll area. This fixes
scrolling on servo.org.
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index bf4ff1b85bc..5adc4560b15 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -1064,21 +1064,19 @@ impl LayoutThread { debug!("Layout done!"); - // TODO: Avoid the temporary conversion and build webrender sc/dl directly! - let (builder, compositor_info, is_contentful) = - display_list.convert_to_webrender(self.id); - - let viewport_size = Size2D::new( + let viewport_size = webrender_api::units::LayoutSize::new( self.viewport_size.width.to_f32_px(), self.viewport_size.height.to_f32_px(), ); + // TODO: Avoid the temporary conversion and build webrender sc/dl directly! + let (builder, compositor_info, is_contentful) = + display_list.convert_to_webrender(self.id, viewport_size); + let mut epoch = self.epoch.get(); epoch.next(); self.epoch.set(epoch); - let viewport_size = webrender_api::units::LayoutSize::from_untyped(viewport_size); - // Observe notifications about rendered frames if needed right before // sending the display list to WebRender in order to set time related // Progressive Web Metrics. |