aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread
diff options
context:
space:
mode:
authorbors-servo <infra@servo.org>2023-05-23 10:51:11 +0200
committerGitHub <noreply@github.com>2023-05-23 10:51:11 +0200
commitec4d90d5729c84337bb3546fb24b13b5942c49fe (patch)
tree52a1e3c9e9bf3c87760c619f8b1a206ffe3e9f0e /components/layout_thread
parenta30f9d6f17262bf1ef90481722624fd2b8d888a0 (diff)
parentc56a81480647805e8ef5567d77a38568ccfcd9f2 (diff)
downloadservo-ec4d90d5729c84337bb3546fb24b13b5942c49fe.tar.gz
servo-ec4d90d5729c84337bb3546fb24b13b5942c49fe.zip
Auto merge of #29745 - mrobinson:compositor-side-scroll-tree, r=mukilan
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. In addition, it removes the use of the deprecated WebRender `scroll()` API. This fixes scrolling on servo.org. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes: - Fix #29402. - Fix #27996. - Fix #27624. - Fix #24028. - Fix #23918. - Fix #21165. - [x] There are tests for these changes
Diffstat (limited to 'components/layout_thread')
-rw-r--r--components/layout_thread/lib.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs
index 1e8bd2848be..a6b57778185 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.