diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index fe7ef0d9878..93d99358320 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -1223,7 +1223,7 @@ impl IOCompositor { } /// Render the WebRender scene to the active `RenderingContext`. If successful, trigger - /// the next round of animations. + /// the next round of animations. Return false if unable to render. pub fn render(&mut self) -> bool { self.global .borrow() diff --git a/components/servo/lib.rs b/components/servo/lib.rs index dd2b3965ac5..9bbe6f53ec7 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -1065,6 +1065,7 @@ impl Servo { if let Err(e) = response_sender.send(Err(())) { error!("Sending reply to create png failed {e:?}"); } + return; } } diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 4dbfe5bd325..7e882fd1b73 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -2312,6 +2312,11 @@ impl Handler { } fn take_screenshot(&self, rect: Option>) -> WebDriverResult { + // Spec: Take screenshot after running the animation frame callbacks. + let _ = self.handle_execute_async_script(JavascriptCommandParameters { + script: "requestAnimationFrame(() => arguments[0]());".to_string(), + args: None, + }); let webview_id = self.webview_id()?; let mut img = None; diff --git a/tests/wpt/meta/webdriver/tests/classic/take_element_screenshot/scroll_into_view.py.ini b/tests/wpt/meta/webdriver/tests/classic/take_element_screenshot/scroll_into_view.py.ini deleted file mode 100644 index 3c21fb97f05..00000000000 --- a/tests/wpt/meta/webdriver/tests/classic/take_element_screenshot/scroll_into_view.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[scroll_into_view.py] - [test_scroll_into_view] - expected: FAIL