mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
libservo: Add a WebView::take_screenshot()
API and use it for reftests
Co-authored-by: Delan Azabani <dazabani@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
92dd54b1ec
commit
ebb12cb298
25 changed files with 481 additions and 414 deletions
|
@ -471,6 +471,11 @@ impl Window {
|
|||
);
|
||||
})
|
||||
.shortcut(CMD_OR_CONTROL, 'Q', || state.servo().start_shutting_down())
|
||||
.shortcut(Modifiers::empty(), 'P', || {
|
||||
focused_webview.take_screenshot(|image| {
|
||||
println!("Done taking screenshot: {:?}", image.is_ok());
|
||||
});
|
||||
})
|
||||
.otherwise(|| handled = false);
|
||||
handled
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue