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
|
@ -1063,6 +1063,15 @@ pub enum JavaScriptEvaluationError {
|
|||
SerializationError,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
pub enum ScreenshotCaptureError {
|
||||
/// The screenshot request failed to read the screenshot image from the `WebView`'s
|
||||
/// `RenderingContext`.
|
||||
CouldNotReadImage,
|
||||
/// The WebView that this screenshot request was made for no longer exists.
|
||||
WebViewDoesNotExist,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
pub struct RgbColor {
|
||||
pub red: u8,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue