imagebitmap: Add missing basic functionality

Add missing basic functionality for ImageBitmap
https://html.spec.whatwg.org/multipage/#imagebitmap
including new variant of creation bitmap with source rectangle
https://html.spec.whatwg.org/multipage/#dom-createimagebitmap
and cropping bitmap data with formatting (partially)
https://html.spec.whatwg.org/multipage/#cropped-to-the-source-rectangle-with-formatting

For now the following functionality not implemented:
 - image orientation support (such as EXIF metadata)
 - scale down/up (resize option)
 - color space conversion

Add ImageBitmap/HMTLVideoElement to CanvasImageSource for Canvas2D
https://html.spec.whatwg.org/multipage/#canvasimagesource

Add ImageBitmap to TexImageSource for WebGL
https://registry.khronos.org/webgl/specs/latest/1.0/index.html

Testing: Covered by existed WPT tests
 - html/canvas/element/manual/imagebitmap/*
 - html/canvas/element/manual/wide-gamut-canvas/*
 - html/semantics/embedded-content/the-canvas-element/*
 - webgl/tests/conformance/textures/image_bitmap_from*

Fixes: https://github.com/servo/servo/issues/34112

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-04-30 09:08:25 +03:00
parent 859a0ffbd5
commit 0ac02c4934
84 changed files with 1171 additions and 1258 deletions

2
Cargo.lock generated
View file

@ -7142,8 +7142,10 @@ version = "0.0.1"
dependencies = [
"euclid",
"ipc-channel",
"malloc_size_of_derive",
"pixels",
"serde",
"servo_malloc_size_of",
]
[[package]]

View file

@ -31,6 +31,20 @@ pub enum PixelFormat {
BGRA8,
}
// Computes total bytes length, returning None if overflow occurred or exceed the limit.
pub fn rgba8_bytes_length(width: usize, height: usize) -> Option<usize> {
// TODO: use configurable option from servo_config.prefs.
// Maximum allowed memory allocation size (u32::MAX ~ 4096MB).
const MAX_BYTES_LENGTH: usize = 4294967295;
// The color components of each pixel must be stored in four sequential
// elements in the order of red, green, blue, and then alpha.
4usize
.checked_mul(width)
.and_then(|v| v.checked_mul(height))
.filter(|v| *v <= MAX_BYTES_LENGTH)
}
pub fn rgba8_get_rect(pixels: &[u8], size: Size2D<u64>, rect: Rect<u64>) -> Cow<[u8]> {
assert!(!rect.is_empty());
assert!(Rect::from_size(size).contains_rect(&rect));
@ -54,6 +68,69 @@ pub fn rgba8_get_rect(pixels: &[u8], size: Size2D<u64>, rect: Rect<u64>) -> Cow<
data.into()
}
// Copy pixels from source to destination target without scaling.
pub fn rgba8_copy(
src_pixels: &[u8],
src_size: Size2D<u64>,
src_rect: Rect<u64>,
dst_pixels: &mut [u8],
dst_size: Size2D<u64>,
dst_rect: Rect<u64>,
) {
assert!(!src_rect.is_empty());
assert!(!dst_rect.is_empty());
assert!(Rect::from_size(src_size).contains_rect(&src_rect));
assert!(Rect::from_size(dst_size).contains_rect(&dst_rect));
assert!(src_rect.size == dst_rect.size);
assert_eq!(src_pixels.len() % 4, 0);
assert_eq!(dst_pixels.len() % 4, 0);
let use_fast_copy = (Rect::from(src_size) == src_rect) &&
(Rect::from(dst_size) == dst_rect) &&
(src_rect == dst_rect);
if use_fast_copy {
dst_pixels.copy_from_slice(src_pixels);
return;
}
let src_first_column_start = src_rect.origin.x as usize * 4;
let src_row_length = src_size.width as usize * 4;
let src_first_row_start = src_rect.origin.y as usize * src_row_length;
let dst_first_column_start = dst_rect.origin.x as usize * 4;
let dst_row_length = dst_size.width as usize * 4;
let dst_first_row_start = dst_rect.origin.y as usize * dst_row_length;
let (chunk_length, chunk_count) = (
src_rect.size.width as usize * 4,
src_rect.size.height as usize,
);
for i in 0..chunk_count {
let src = &src_pixels[src_first_row_start + i * src_row_length..][src_first_column_start..]
[..chunk_length];
let dst = &mut dst_pixels[dst_first_row_start + i * dst_row_length..]
[dst_first_column_start..][..chunk_length];
dst.copy_from_slice(src);
}
}
pub fn rgba8_flip_y_inplace(pixels: &mut [u8], size: Size2D<u64>) {
assert_eq!(pixels.len() % 4, 0);
let (left, right) = pixels.split_at_mut(pixels.len() / 2);
let row_length = size.width as usize * 4;
let half_height = (size.height / 2) as usize;
for i in 0..half_height {
let top = &mut left[i * row_length..][..row_length];
let bottom = &mut right[(half_height - i - 1) * row_length..][..row_length];
top.swap_with_slice(bottom);
}
}
// TODO(pcwalton): Speed up with SIMD, or better yet, find some way to not do this.
pub fn rgba8_byte_swap_colors_inplace(pixels: &mut [u8]) {
assert!(pixels.len() % 4 == 0);

View file

@ -54,6 +54,8 @@ use crate::dom::dommatrix::DOMMatrix;
use crate::dom::element::{Element, cors_setting_for_element};
use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlcanvaselement::HTMLCanvasElement;
use crate::dom::htmlvideoelement::HTMLVideoElement;
use crate::dom::imagebitmap::ImageBitmap;
use crate::dom::imagedata::ImageData;
use crate::dom::node::{Node, NodeTraits};
use crate::dom::offscreencanvas::OffscreenCanvas;
@ -310,14 +312,18 @@ impl CanvasState {
self.origin_clean.set(false)
}
// https://html.spec.whatwg.org/multipage/#the-image-argument-is-not-origin-clean
/// <https://html.spec.whatwg.org/multipage/#the-image-argument-is-not-origin-clean>
fn is_origin_clean(&self, image: CanvasImageSource) -> bool {
match image {
CanvasImageSource::HTMLCanvasElement(canvas) => canvas.origin_is_clean(),
CanvasImageSource::OffscreenCanvas(canvas) => canvas.origin_is_clean(),
CanvasImageSource::HTMLImageElement(image) => {
image.same_origin(GlobalScope::entry().origin())
},
CanvasImageSource::HTMLVideoElement(video) => {
video.same_origin(GlobalScope::entry().origin())
},
CanvasImageSource::HTMLCanvasElement(canvas) => canvas.origin_is_clean(),
CanvasImageSource::ImageBitmap(bitmap) => bitmap.origin_is_clean(),
CanvasImageSource::OffscreenCanvas(canvas) => canvas.origin_is_clean(),
CanvasImageSource::CSSStyleValue(_) => true,
}
}
@ -430,6 +436,14 @@ impl CanvasState {
}
let result = match image {
CanvasImageSource::HTMLVideoElement(ref video) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if !video.is_usable() {
return Ok(());
}
self.draw_html_video_element(video, htmlcanvas, sx, sy, sw, sh, dx, dy, dw, dh)
},
CanvasImageSource::HTMLCanvasElement(ref canvas) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if canvas.get_size().is_empty() {
@ -438,6 +452,14 @@ impl CanvasState {
self.draw_html_canvas_element(canvas, htmlcanvas, sx, sy, sw, sh, dx, dy, dw, dh)
},
CanvasImageSource::ImageBitmap(ref bitmap) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if bitmap.is_detached() {
return Err(Error::InvalidState);
}
self.draw_image_bitmap(bitmap, htmlcanvas, sx, sy, sw, sh, dx, dy, dw, dh)
},
CanvasImageSource::OffscreenCanvas(ref canvas) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if canvas.get_size().is_empty() {
@ -490,6 +512,51 @@ impl CanvasState {
result
}
#[allow(clippy::too_many_arguments)]
fn draw_html_video_element(
&self,
video: &HTMLVideoElement,
canvas: Option<&HTMLCanvasElement>,
sx: f64,
sy: f64,
sw: Option<f64>,
sh: Option<f64>,
dx: f64,
dy: f64,
dw: Option<f64>,
dh: Option<f64>,
) -> ErrorResult {
let Some(snapshot) = video.get_current_frame_data() else {
return Ok(());
};
let video_size = snapshot.size().to_f64();
let dw = dw.unwrap_or(video_size.width);
let dh = dh.unwrap_or(video_size.height);
let sw = sw.unwrap_or(video_size.width);
let sh = sh.unwrap_or(video_size.height);
// Step 4. Establish the source and destination rectangles.
let (source_rect, dest_rect) =
self.adjust_source_dest_rects(video_size, sx, sy, sw, sh, dx, dy, dw, dh);
if !is_rect_valid(source_rect) || !is_rect_valid(dest_rect) {
return Ok(());
}
let smoothing_enabled = self.state.borrow().image_smoothing_enabled;
self.send_canvas_2d_msg(Canvas2dMsg::DrawImage(
snapshot.as_ipc(),
dest_rect,
source_rect,
smoothing_enabled,
));
self.mark_as_dirty(canvas);
Ok(())
}
#[allow(clippy::too_many_arguments)]
fn draw_offscreen_canvas(
&self,
@ -661,6 +728,51 @@ impl CanvasState {
Ok(())
}
#[allow(clippy::too_many_arguments)]
fn draw_image_bitmap(
&self,
bitmap: &ImageBitmap,
canvas: Option<&HTMLCanvasElement>,
sx: f64,
sy: f64,
sw: Option<f64>,
sh: Option<f64>,
dx: f64,
dy: f64,
dw: Option<f64>,
dh: Option<f64>,
) -> ErrorResult {
let Some(snapshot) = bitmap.bitmap_data() else {
return Ok(());
};
let bitmap_size = snapshot.size().to_f64();
let dw = dw.unwrap_or(bitmap_size.width);
let dh = dh.unwrap_or(bitmap_size.height);
let sw = sw.unwrap_or(bitmap_size.width);
let sh = sh.unwrap_or(bitmap_size.height);
// Step 4. Establish the source and destination rectangles.
let (source_rect, dest_rect) =
self.adjust_source_dest_rects(bitmap_size, sx, sy, sw, sh, dx, dy, dw, dh);
if !is_rect_valid(source_rect) || !is_rect_valid(dest_rect) {
return Ok(());
}
let smoothing_enabled = self.state.borrow().image_smoothing_enabled;
self.send_canvas_2d_msg(Canvas2dMsg::DrawImage(
snapshot.as_ipc(),
dest_rect,
source_rect,
smoothing_enabled,
));
self.mark_as_dirty(canvas);
Ok(())
}
pub(crate) fn mark_as_dirty(&self, canvas: Option<&HTMLCanvasElement>) {
if let Some(canvas) = canvas {
canvas.mark_as_dirty();
@ -958,7 +1070,7 @@ impl CanvasState {
))
}
// https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern
/// <https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern>
pub(crate) fn create_pattern(
&self,
global: &GlobalScope,
@ -968,7 +1080,7 @@ impl CanvasState {
) -> Fallible<Option<DomRoot<CanvasPattern>>> {
let snapshot = match image {
CanvasImageSource::HTMLImageElement(ref image) => {
// https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if !image.is_usable()? {
return Ok(None);
}
@ -980,10 +1092,36 @@ impl CanvasState {
})
.ok_or(Error::InvalidState)?
},
CanvasImageSource::HTMLVideoElement(ref video) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if !video.is_usable() {
return Ok(None);
}
video.get_current_frame_data().ok_or(Error::InvalidState)?
},
CanvasImageSource::HTMLCanvasElement(ref canvas) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if canvas.get_size().is_empty() {
return Err(Error::InvalidState);
}
canvas.get_image_data().ok_or(Error::InvalidState)?
},
CanvasImageSource::ImageBitmap(ref bitmap) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if bitmap.is_detached() {
return Err(Error::InvalidState);
}
bitmap.bitmap_data().ok_or(Error::InvalidState)?
},
CanvasImageSource::OffscreenCanvas(ref canvas) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if canvas.get_size().is_empty() {
return Err(Error::InvalidState);
}
canvas.get_image_data().ok_or(Error::InvalidState)?
},
CanvasImageSource::CSSStyleValue(ref value) => value

View file

@ -29,9 +29,10 @@ use crossbeam_channel::Sender;
use devtools_traits::{PageError, ScriptToDevtoolsControlMsg};
use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg;
use euclid::default::{Point2D, Rect, Size2D};
use http::HeaderMap;
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory};
use ipc_channel::router::ROUTER;
use js::glue::{IsWrapper, UnwrapObjectDynamic};
use js::jsapi::{
@ -59,9 +60,11 @@ use net_traits::{
CoreResourceMsg, CoreResourceThread, FetchResponseListener, IpcSend, ReferrerPolicy,
ResourceThreads, fetch_async,
};
use pixels::PixelFormat;
use profile_traits::{ipc as profile_ipc, mem as profile_mem, time as profile_time};
use script_bindings::interfaces::GlobalScopeHelpers;
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
use snapshot::Snapshot;
use timers::{TimerEventId, TimerEventRequest, TimerSource};
use url::Origin;
use uuid::Uuid;
@ -79,7 +82,7 @@ use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::BroadcastC
use crate::dom::bindings::codegen::Bindings::EventSourceBinding::EventSource_Binding::EventSourceMethods;
use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
use crate::dom::bindings::codegen::Bindings::ImageBitmapBinding::{
ImageBitmapOptions, ImageBitmapSource,
ImageBitmapOptions, ImageBitmapSource, ImageOrientation, PremultiplyAlpha,
};
use crate::dom::bindings::codegen::Bindings::NotificationBinding::NotificationPermissionCallback;
use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{
@ -2964,64 +2967,407 @@ impl GlobalScope {
result == CheckResult::Blocked
}
/// <https://html.spec.whatwg.org/multipage/#cropped-to-the-source-rectangle-with-formatting>
fn crop_and_transform_bitmap_data(
&self,
input: Snapshot,
mut sx: i32,
mut sy: i32,
sw: Option<i32>,
sh: Option<i32>,
options: &ImageBitmapOptions,
) -> Option<Snapshot> {
let input_size = input.size().to_u32();
// If either sw or sh are negative, then the top-left corner of this rectangle
// will be to the left or above the (sx, sy) point.
let sw = sw.map_or(input_size.width as i32, |w| {
if w < 0 {
sx = sx.saturating_add(w);
w.saturating_abs()
} else {
w
}
});
let sh = sh.map_or(input_size.height as i32, |h| {
if h < 0 {
sy = sy.saturating_add(h);
h.saturating_abs()
} else {
h
}
});
// Step 2.
let source_rect = Rect::new(Point2D::new(sx, sy), Size2D::new(sw, sh));
// In the case the source is too large, we should fail, and that is not defined.
// <https://github.com/whatwg/html/issues/3323>
let Some(source_bytes_length) = pixels::rgba8_bytes_length(
source_rect.size.width as usize,
source_rect.size.height as usize,
) else {
// The requested source bytes length exceeds the supported range.
return None;
};
// Step 3-4.
let output_size = match (options.resizeWidth, options.resizeHeight) {
(Some(width), Some(height)) => Size2D::new(width, height),
(Some(width), None) => {
let height =
source_rect.size.height as f64 * width as f64 / source_rect.size.width as f64;
Size2D::new(width, height.round() as u32)
},
(None, Some(height)) => {
let width =
source_rect.size.width as f64 * height as f64 / source_rect.size.height as f64;
Size2D::new(width.round() as u32, height)
},
(None, None) => source_rect.size.to_u32(),
};
// In the case the output is too large, we should fail, and that is not defined.
// <https://github.com/whatwg/html/issues/3323>
let Some(_) =
pixels::rgba8_bytes_length(output_size.width as usize, output_size.height as usize)
else {
// The requested output bytes length exceeds the supported range.
return None;
};
// TODO: Take into account the image orientation (such as EXIF metadata).
// Step 5.
let input_rect = Rect::new(Point2D::zero(), input_size.to_i32());
let input_cropped_rect = source_rect
.intersection(&input_rect)
.unwrap_or(Rect::zero());
// Early out for empty tranformations.
if input_cropped_rect.is_empty() {
return Some(Snapshot::cleared(output_size.cast()));
}
// Step 6.
let mut output = Snapshot::from_vec(
source_rect.size.cast(),
input.format(),
input.alpha_mode(),
vec![0; source_bytes_length],
);
let source_cropped_origin = Point2D::new(
input_cropped_rect.origin.x - source_rect.origin.x,
input_cropped_rect.origin.y - source_rect.origin.y,
);
let source_cropped_rect = Rect::new(source_cropped_origin, input_cropped_rect.size);
pixels::rgba8_copy(
input.data(),
input_size.cast(),
input_cropped_rect.cast(),
output.data_mut(),
source_rect.size.cast(),
source_cropped_rect.cast(),
);
// TODO: Step 7. Scale output to the size specified by outputWidth and outputHeight.
// Step 8.
if options.imageOrientation == ImageOrientation::FlipY {
let output_size = output.size().cast();
pixels::rgba8_flip_y_inplace(output.data_mut(), output_size);
}
// TODO: Step 9. Color space conversion.
// Step 10.
match options.premultiplyAlpha {
PremultiplyAlpha::Default | PremultiplyAlpha::Premultiply => {
output.transform(
snapshot::AlphaMode::Transparent {
premultiplied: true,
},
snapshot::PixelFormat::BGRA,
);
},
PremultiplyAlpha::None => {
output.transform(
snapshot::AlphaMode::Transparent {
premultiplied: false,
},
snapshot::PixelFormat::BGRA,
);
},
}
Some(output)
}
/// <https://html.spec.whatwg.org/multipage/#dom-createimagebitmap>
#[allow(clippy::too_many_arguments)]
pub(crate) fn create_image_bitmap(
&self,
image: ImageBitmapSource,
sx: i32,
sy: i32,
sw: Option<i32>,
sh: Option<i32>,
options: &ImageBitmapOptions,
can_gc: CanGc,
) -> Rc<Promise> {
let in_realm_proof = AlreadyInRealm::assert::<crate::DomTypeHolder>();
let p = Promise::new_in_current_realm(InRealm::Already(&in_realm_proof), can_gc);
// Step 1.
if sw.is_some_and(|w| w == 0) {
p.reject_error(
Error::Range("'sw' must be a non-zero value".to_owned()),
can_gc,
);
return p;
}
if sh.is_some_and(|h| h == 0) {
p.reject_error(
Error::Range("'sh' must be a non-zero value".to_owned()),
can_gc,
);
return p;
}
// Step 2.
if options.resizeWidth.is_some_and(|w| w == 0) {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
if options.resizeHeight.is_some_and(|w| w == 0) {
if options.resizeHeight.is_some_and(|h| h == 0) {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
// Step 3-6.
match image {
ImageBitmapSource::HTMLCanvasElement(ref canvas) => {
// https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument
if !canvas.is_valid() {
ImageBitmapSource::HTMLImageElement(ref image) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if !image.is_usable().is_ok_and(|u| u) {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
if let Some(snapshot) = canvas.get_image_data() {
let size = snapshot.size().cast();
// If no ImageBitmap object can be constructed, then the promise is rejected instead.
let Some(img) = image.image_data() else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let size = Size2D::new(img.width, img.height);
let format = match img.format {
PixelFormat::BGRA8 => snapshot::PixelFormat::BGRA,
PixelFormat::RGBA8 => snapshot::PixelFormat::RGBA,
pixel_format => {
unimplemented!("unsupported pixel format ({:?})", pixel_format)
},
};
let alpha_mode = snapshot::AlphaMode::Transparent {
premultiplied: false,
};
let source_data = Snapshot::from_shared_memory(
size.cast(),
format,
alpha_mode,
IpcSharedMemory::from_bytes(img.first_frame().bytes),
);
let Some(bitmap_data) =
self.crop_and_transform_bitmap_data(source_data, sx, sy, sw, sh, options)
else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let bitmap_size = bitmap_data.size().cast();
let image_bitmap =
ImageBitmap::new(self, size.width, size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(snapshot.to_vec());
image_bitmap.set_origin_clean(canvas.origin_is_clean());
p.resolve_native(&(image_bitmap), can_gc);
ImageBitmap::new(self, bitmap_size.width, bitmap_size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(bitmap_data);
image_bitmap.set_origin_clean(image.same_origin(GlobalScope::entry().origin()));
p.resolve_native(&image_bitmap, can_gc);
},
ImageBitmapSource::HTMLVideoElement(ref video) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if !video.is_usable() {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
p
if video.is_network_state_empty() {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
// If no ImageBitmap object can be constructed, then the promise is rejected instead.
let Some(source_data) = video.get_current_frame_data() else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let Some(bitmap_data) =
self.crop_and_transform_bitmap_data(source_data, sx, sy, sw, sh, options)
else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let bitmap_size = bitmap_data.size().cast();
let image_bitmap =
ImageBitmap::new(self, bitmap_size.width, bitmap_size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(bitmap_data);
image_bitmap.set_origin_clean(video.same_origin(GlobalScope::entry().origin()));
p.resolve_native(&image_bitmap, can_gc);
},
ImageBitmapSource::HTMLCanvasElement(ref canvas) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if canvas.get_size().is_empty() {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
// If no ImageBitmap object can be constructed, then the promise is rejected instead.
let Some(source_data) = canvas.get_image_data() else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let Some(bitmap_data) =
self.crop_and_transform_bitmap_data(source_data, sx, sy, sw, sh, options)
else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let bitmap_size = bitmap_data.size().cast();
let image_bitmap =
ImageBitmap::new(self, bitmap_size.width, bitmap_size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(bitmap_data);
image_bitmap.set_origin_clean(canvas.origin_is_clean());
p.resolve_native(&image_bitmap, can_gc);
},
ImageBitmapSource::ImageBitmap(ref bitmap) => {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if bitmap.is_detached() {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
// If no ImageBitmap object can be constructed, then the promise is rejected instead.
let Some(source_data) = bitmap.bitmap_data() else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let Some(bitmap_data) =
self.crop_and_transform_bitmap_data(source_data, sx, sy, sw, sh, options)
else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let bitmap_size = bitmap_data.size().cast();
let image_bitmap =
ImageBitmap::new(self, bitmap_size.width, bitmap_size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(bitmap_data);
image_bitmap.set_origin_clean(bitmap.origin_is_clean());
p.resolve_native(&image_bitmap, can_gc);
},
ImageBitmapSource::OffscreenCanvas(ref canvas) => {
// https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument
if !canvas.is_valid() {
// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
if canvas.get_size().is_empty() {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
if let Some(snapshot) = canvas.get_image_data() {
let size = snapshot.size().cast();
// If no ImageBitmap object can be constructed, then the promise is rejected instead.
let Some(source_data) = canvas.get_image_data() else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let Some(bitmap_data) =
self.crop_and_transform_bitmap_data(source_data, sx, sy, sw, sh, options)
else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let bitmap_size = bitmap_data.size().cast();
let image_bitmap =
ImageBitmap::new(self, size.width, size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(snapshot.to_vec());
ImageBitmap::new(self, bitmap_size.width, bitmap_size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(bitmap_data);
image_bitmap.set_origin_clean(canvas.origin_is_clean());
p.resolve_native(&(image_bitmap), can_gc);
}
p
p.resolve_native(&image_bitmap, can_gc);
},
_ => {
ImageBitmapSource::Blob(_) => {
// TODO: implement support of Blob object as ImageBitmapSource
p.reject_error(Error::InvalidState, can_gc);
},
ImageBitmapSource::ImageData(ref image_data) => {
// If IsDetachedBuffer(image_data.[[ViewedArrayBuffer]]) is true,
// then return a promise rejected with an "InvalidStateError" DOMException.
if image_data.is_detached() {
p.reject_error(Error::InvalidState, can_gc);
return p;
}
let alpha_mode = snapshot::AlphaMode::Transparent {
premultiplied: false,
};
let source_data = Snapshot::from_shared_memory(
image_data.get_size().cast(),
snapshot::PixelFormat::RGBA,
alpha_mode,
image_data.to_shared_memory(),
);
let Some(bitmap_data) =
self.crop_and_transform_bitmap_data(source_data, sx, sy, sw, sh, options)
else {
p.reject_error(Error::InvalidState, can_gc);
return p;
};
let bitmap_size = bitmap_data.size().cast();
let image_bitmap =
ImageBitmap::new(self, bitmap_size.width, bitmap_size.height, can_gc).unwrap();
image_bitmap.set_bitmap_data(bitmap_data);
p.resolve_native(&image_bitmap, can_gc);
},
ImageBitmapSource::CSSStyleValue(_) => {
// TODO: CSSStyleValue is not part of ImageBitmapSource
// <https://html.spec.whatwg.org/multipage/#imagebitmapsource>
p.reject_error(Error::NotSupported, can_gc);
p
},
}
// Step 7.
p
}
pub(crate) fn fire_timer(&self, handle: TimerEventId, can_gc: CanGc) {

View file

@ -361,7 +361,10 @@ impl HTMLCanvasElement {
Some(context) => context.get_image_data(),
None => {
let size = self.get_size();
if size.width == 0 || size.height == 0 {
if size.is_empty() ||
pixels::rgba8_bytes_length(size.width as usize, size.height as usize)
.is_none()
{
None
} else {
Some(Snapshot::cleared(size.cast()))

View file

@ -38,7 +38,7 @@ use servo_media::player::audio::AudioRenderer;
use servo_media::player::video::{VideoFrame, VideoFrameRenderer};
use servo_media::player::{PlaybackState, Player, PlayerError, PlayerEvent, SeekLock, StreamType};
use servo_media::{ClientContextId, ServoMedia, SupportsMediaType};
use servo_url::ServoUrl;
use servo_url::{MutableOrigin, ServoUrl};
use webrender_api::{
ExternalImageData, ExternalImageId, ExternalImageType, ImageBufferKind, ImageDescriptor,
ImageDescriptorFlags, ImageFormat, ImageKey,
@ -494,6 +494,10 @@ impl HTMLMediaElement {
}
}
pub(crate) fn network_state(&self) -> NetworkState {
self.network_state.get()
}
pub(crate) fn get_ready_state(&self) -> ReadyState {
self.ready_state.get()
}
@ -2069,6 +2073,15 @@ impl HTMLMediaElement {
}
}
}
pub(crate) fn same_origin(&self, origin: &MutableOrigin) -> bool {
// TODO: Step 8.6. Update the media data with the contents of response.
// <https://html.spec.whatwg.org/multipage/#concept-media-load-resource>
match self.resource_url.borrow().as_ref() {
Some(url) => url.origin().same_origin(origin),
None => self.owner_document().origin().same_origin(origin),
}
}
}
// XXX Placeholder for [https://github.com/servo/servo/issues/22293]

View file

@ -9,7 +9,6 @@ use content_security_policy as csp;
use dom_struct::dom_struct;
use euclid::default::Size2D;
use html5ever::{LocalName, Prefix, local_name, ns};
use ipc_channel::ipc;
use js::rust::HandleObject;
use net_traits::image_cache::{
ImageCache, ImageCacheResult, ImageOrMetadataAvailable, ImageResponder, ImageResponse,
@ -22,7 +21,8 @@ use net_traits::{
};
use script_layout_interface::{HTMLMediaData, MediaMetadata};
use servo_media::player::video::VideoFrame;
use servo_url::ServoUrl;
use servo_url::{MutableOrigin, ServoUrl};
use snapshot::Snapshot;
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use crate::document_loader::{LoadBlocker, LoadType};
@ -37,7 +37,7 @@ use crate::dom::bindings::str::DOMString;
use crate::dom::document::Document;
use crate::dom::element::{AttributeMutation, Element, LayoutElementHelpers};
use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlmediaelement::{HTMLMediaElement, ReadyState};
use crate::dom::htmlmediaelement::{HTMLMediaElement, NetworkState, ReadyState};
use crate::dom::node::{Node, NodeTraits};
use crate::dom::performanceresourcetiming::InitiatorType;
use crate::dom::virtualmethods::VirtualMethods;
@ -133,9 +133,7 @@ impl HTMLVideoElement {
sent_resize
}
pub(crate) fn get_current_frame_data(
&self,
) -> Option<(Option<ipc::IpcSharedMemory>, Size2D<u32>)> {
pub(crate) fn get_current_frame_data(&self) -> Option<Snapshot> {
let frame = self.htmlmediaelement.get_current_frame();
if frame.is_some() {
*self.last_frame.borrow_mut() = frame;
@ -145,11 +143,19 @@ impl HTMLVideoElement {
Some(frame) => {
let size = Size2D::new(frame.get_width() as u32, frame.get_height() as u32);
if !frame.is_gl_texture() {
let data = Some(ipc::IpcSharedMemory::from_bytes(&frame.get_data()));
Some((data, size))
let alpha_mode = snapshot::AlphaMode::Transparent {
premultiplied: false,
};
Some(Snapshot::from_vec(
size.cast(),
snapshot::PixelFormat::BGRA,
alpha_mode,
frame.get_data().to_vec(),
))
} else {
// XXX(victor): here we only have the GL texture ID.
Some((None, size))
Some(Snapshot::cleared(size.cast()))
}
},
None => None,
@ -273,6 +279,22 @@ impl HTMLVideoElement {
},
}
}
/// <https://html.spec.whatwg.org/multipage/#check-the-usability-of-the-image-argument>
pub(crate) fn is_usable(&self) -> bool {
!matches!(
self.htmlmediaelement.get_ready_state(),
ReadyState::HaveNothing | ReadyState::HaveMetadata
)
}
pub(crate) fn is_network_state_empty(&self) -> bool {
self.htmlmediaelement.network_state() == NetworkState::Empty
}
pub(crate) fn same_origin(&self, origin: &MutableOrigin) -> bool {
self.htmlmediaelement.same_origin(origin)
}
}
impl HTMLVideoElementMethods<crate::DomTypeHolder> for HTMLVideoElement {

View file

@ -3,9 +3,10 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::cell::Cell;
use std::vec::Vec;
use dom_struct::dom_struct;
use euclid::default::Size2D;
use snapshot::Snapshot;
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::ImageBitmapBinding::ImageBitmapMethods;
@ -24,17 +25,18 @@ pub(crate) struct ImageBitmap {
///
/// If this is `None`, then the bitmap data has been released by calling
/// [`close`](https://html.spec.whatwg.org/multipage/#dom-imagebitmap-close)
bitmap_data: DomRefCell<Option<Vec<u8>>>,
#[no_trace]
bitmap_data: DomRefCell<Option<Snapshot>>,
origin_clean: Cell<bool>,
}
impl ImageBitmap {
fn new_inherited(width_arg: u32, height_arg: u32) -> ImageBitmap {
fn new_inherited(width: u32, height: u32) -> ImageBitmap {
ImageBitmap {
reflector_: Reflector::new(),
width: width_arg,
height: height_arg,
bitmap_data: DomRefCell::new(Some(vec![])),
width,
height,
bitmap_data: DomRefCell::new(Some(Snapshot::cleared(Size2D::new(width, width).cast()))),
origin_clean: Cell::new(true),
}
}
@ -52,17 +54,25 @@ impl ImageBitmap {
Ok(reflect_dom_object(imagebitmap, global, can_gc))
}
pub(crate) fn set_bitmap_data(&self, data: Vec<u8>) {
pub(crate) fn bitmap_data(&self) -> Option<Snapshot> {
self.bitmap_data.borrow().clone()
}
pub(crate) fn set_bitmap_data(&self, data: Snapshot) {
*self.bitmap_data.borrow_mut() = Some(data);
}
pub(crate) fn origin_is_clean(&self) -> bool {
self.origin_clean.get()
}
pub(crate) fn set_origin_clean(&self, origin_is_clean: bool) {
self.origin_clean.set(origin_is_clean);
}
/// Return the value of the [`[[Detached]]`](https://html.spec.whatwg.org/multipage/#detached)
/// internal slot
fn is_detached(&self) -> bool {
pub(crate) fn is_detached(&self) -> bool {
self.bitmap_data.borrow().is_none()
}
}

View file

@ -41,14 +41,9 @@ impl ImageData {
mut data: Option<Vec<u8>>,
can_gc: CanGc,
) -> Fallible<DomRoot<ImageData>> {
// The color components of each pixel must be stored in four sequential
// elements in the order of red, green, blue, and then alpha.
let len = 4u32
.checked_mul(width)
.and_then(|v| v.checked_mul(height))
.ok_or(Error::Range(
"The requested image size exceeds the supported range".to_owned(),
))?;
let len = pixels::rgba8_bytes_length(width as usize, height as usize).ok_or(
Error::Range("The requested image size exceeds the supported range".to_owned()),
)?;
unsafe {
let cx = GlobalScope::get_cx();
@ -129,18 +124,15 @@ impl ImageData {
return Err(Error::IndexSize);
}
// The color components of each pixel must be stored in four sequential
// elements in the order of red, green, blue, and then alpha.
// Please note when a too-large ImageData is created using a constructor
// Please note when a too large ImageData is created using a constructor
// historically throwns an IndexSizeError, instead of RangeError.
let len = 4u32
.checked_mul(width)
.and_then(|v| v.checked_mul(height))
.ok_or(Error::IndexSize)?;
let len =
pixels::rgba8_bytes_length(width as usize, height as usize).ok_or(Error::IndexSize)?;
let cx = GlobalScope::get_cx();
let heap_typed_array = create_heap_buffer_source_with_length::<ClampedU8>(cx, len, can_gc)?;
let heap_typed_array =
create_heap_buffer_source_with_length::<ClampedU8>(cx, len as u32, can_gc)?;
let imagedata = Box::new(ImageData {
reflector_: Reflector::new(),
@ -153,6 +145,11 @@ impl ImageData {
imagedata, global, proto, can_gc,
))
}
pub(crate) fn is_detached(&self) -> bool {
self.data.is_detached_buffer(GlobalScope::get_cx())
}
#[allow(unsafe_code)]
pub(crate) fn to_shared_memory(&self) -> IpcSharedMemory {
IpcSharedMemory::from_bytes(unsafe { self.as_slice() })

View file

@ -92,7 +92,10 @@ impl OffscreenCanvas {
Some(context) => context.get_image_data(),
None => {
let size = self.get_size();
if size.width == 0 || size.height == 0 {
if size.is_empty() ||
pixels::rgba8_bytes_length(size.width as usize, size.height as usize)
.is_none()
{
None
} else {
Some(Snapshot::cleared(size))
@ -117,10 +120,6 @@ impl OffscreenCanvas {
Some(context)
}
pub(crate) fn is_valid(&self) -> bool {
self.Width() != 0 && self.Height() != 0
}
pub(crate) fn placeholder(&self) -> Option<&HTMLCanvasElement> {
self.placeholder.as_deref()
}

View file

@ -32,12 +32,11 @@ use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::{
WebGL2RenderingContextConstants as constants, WebGL2RenderingContextMethods,
};
use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{
WebGLContextAttributes, WebGLRenderingContextMethods,
TexImageSource, WebGLContextAttributes, WebGLRenderingContextMethods,
};
use crate::dom::bindings::codegen::UnionTypes::{
ArrayBufferViewOrArrayBuffer, Float32ArrayOrUnrestrictedFloatSequence,
HTMLCanvasElementOrOffscreenCanvas,
ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, Int32ArrayOrLongSequence,
HTMLCanvasElementOrOffscreenCanvas, Int32ArrayOrLongSequence,
Uint32ArrayOrUnsignedLongSequence,
};
use crate::dom::bindings::error::{ErrorResult, Fallible};
@ -3023,7 +3022,7 @@ impl WebGL2RenderingContextMethods<crate::DomTypeHolder> for WebGL2RenderingCont
internal_format: i32,
format: u32,
data_type: u32,
source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement,
source: TexImageSource,
) -> ErrorResult {
self.base
.TexImage2D_(target, level, internal_format, format, data_type, source)
@ -3118,7 +3117,7 @@ impl WebGL2RenderingContextMethods<crate::DomTypeHolder> for WebGL2RenderingCont
border: i32,
format: u32,
type_: u32,
source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement,
source: TexImageSource,
) -> Fallible<()> {
if self.bound_pixel_unpack_buffer.get().is_some() {
self.base.webgl_error(InvalidOperation);
@ -3301,7 +3300,7 @@ impl WebGL2RenderingContextMethods<crate::DomTypeHolder> for WebGL2RenderingCont
yoffset: i32,
format: u32,
data_type: u32,
source: ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement,
source: TexImageSource,
) -> ErrorResult {
self.base
.TexSubImage2D_(target, level, xoffset, yoffset, format, data_type, source)

View file

@ -575,6 +575,23 @@ impl WebGLRenderingContext {
pub(crate) fn get_image_pixels(&self, source: TexImageSource) -> Fallible<Option<TexPixels>> {
Ok(Some(match source {
TexImageSource::ImageBitmap(bitmap) => {
if !bitmap.origin_is_clean() {
return Err(Error::Security);
}
if let Some(snapshot) = bitmap.bitmap_data() {
let snapshot = snapshot.as_ipc();
let size = snapshot.size().cast();
let format = match snapshot.format() {
snapshot::PixelFormat::RGBA => PixelFormat::RGBA8,
snapshot::PixelFormat::BGRA => PixelFormat::BGRA8,
};
let premultiply = snapshot.alpha_mode().is_premultiplied();
TexPixels::new(snapshot.to_ipc_shared_memory(), size, format, premultiply)
} else {
return Ok(None);
}
},
TexImageSource::ImageData(image_data) => TexPixels::new(
image_data.to_shared_memory(),
image_data.get_size(),
@ -642,14 +659,31 @@ impl WebGLRenderingContext {
return Ok(None);
}
},
TexImageSource::HTMLVideoElement(video) => match video.get_current_frame_data() {
Some((data, size)) => {
let data = data.unwrap_or_else(|| {
IpcSharedMemory::from_bytes(&vec![0; size.area() as usize * 4])
});
TexPixels::new(data, size, PixelFormat::BGRA8, false)
TexImageSource::HTMLVideoElement(video) => {
let document = match self.canvas {
HTMLCanvasElementOrOffscreenCanvas::HTMLCanvasElement(ref canvas) => {
canvas.owner_document()
},
None => return Ok(None),
HTMLCanvasElementOrOffscreenCanvas::OffscreenCanvas(ref _canvas) => {
// TODO: Support retrieving image pixels here for OffscreenCanvas
return Ok(None);
},
};
if !video.same_origin(document.origin()) {
return Err(Error::Security);
}
if let Some(snapshot) = video.get_current_frame_data() {
let snapshot = snapshot.as_ipc();
let size = snapshot.size().cast();
let format: PixelFormat = match snapshot.format() {
snapshot::PixelFormat::RGBA => PixelFormat::RGBA8,
snapshot::PixelFormat::BGRA => PixelFormat::BGRA8,
};
TexPixels::new(snapshot.to_ipc_shared_memory(), size, format, false)
} else {
return Ok(None);
}
},
}))
}

View file

@ -1190,7 +1190,7 @@ impl WindowMethods<crate::DomTypeHolder> for Window {
self.as_global_scope().queue_function_as_microtask(callback);
}
// https://html.spec.whatwg.org/multipage/#dom-createimagebitmap
/// <https://html.spec.whatwg.org/multipage/#dom-createimagebitmap>
fn CreateImageBitmap(
&self,
image: ImageBitmapSource,
@ -1199,7 +1199,30 @@ impl WindowMethods<crate::DomTypeHolder> for Window {
) -> Rc<Promise> {
let p = self
.as_global_scope()
.create_image_bitmap(image, options, can_gc);
.create_image_bitmap(image, 0, 0, None, None, options, can_gc);
p
}
/// <https://html.spec.whatwg.org/multipage/#dom-createimagebitmap>
fn CreateImageBitmap_(
&self,
image: ImageBitmapSource,
sx: i32,
sy: i32,
sw: i32,
sh: i32,
options: &ImageBitmapOptions,
can_gc: CanGc,
) -> Rc<Promise> {
let p = self.as_global_scope().create_image_bitmap(
image,
sx,
sy,
Some(sw),
Some(sh),
options,
can_gc,
);
p
}

View file

@ -446,7 +446,7 @@ impl WorkerGlobalScopeMethods<crate::DomTypeHolder> for WorkerGlobalScope {
.queue_function_as_microtask(callback);
}
// https://html.spec.whatwg.org/multipage/#dom-createimagebitmap
/// <https://html.spec.whatwg.org/multipage/#dom-createimagebitmap>
fn CreateImageBitmap(
&self,
image: ImageBitmapSource,
@ -455,7 +455,30 @@ impl WorkerGlobalScopeMethods<crate::DomTypeHolder> for WorkerGlobalScope {
) -> Rc<Promise> {
let p = self
.upcast::<GlobalScope>()
.create_image_bitmap(image, options, can_gc);
.create_image_bitmap(image, 0, 0, None, None, options, can_gc);
p
}
/// <https://html.spec.whatwg.org/multipage/#dom-createimagebitmap>
fn CreateImageBitmap_(
&self,
image: ImageBitmapSource,
sx: i32,
sy: i32,
sw: i32,
sh: i32,
options: &ImageBitmapOptions,
can_gc: CanGc,
) -> Rc<Promise> {
let p = self.upcast::<GlobalScope>().create_image_bitmap(
image,
sx,
sy,
Some(sw),
Some(sh),
options,
can_gc,
);
p
}

View file

@ -642,7 +642,7 @@ DOMInterfaces = {
},
'Window': {
'canGc': ['Stop', 'Fetch', 'Scroll', 'Scroll_','ScrollBy', 'ScrollBy_', 'Stop', 'Fetch', 'Open', 'CreateImageBitmap', 'TrustedTypes', 'WebdriverCallback', 'WebdriverException'],
'canGc': ['Stop', 'Fetch', 'Scroll', 'Scroll_','ScrollBy', 'ScrollBy_', 'Stop', 'Fetch', 'Open', 'CreateImageBitmap', 'CreateImageBitmap_', 'TrustedTypes', 'WebdriverCallback', 'WebdriverException'],
'inRealms': ['Fetch', 'GetOpener', 'WebdriverCallback', 'WebdriverException'],
'additionalTraits': ['crate::interfaces::WindowHelpers'],
},
@ -654,7 +654,7 @@ DOMInterfaces = {
'WorkerGlobalScope': {
'inRealms': ['Fetch'],
'canGc': ['Fetch', 'CreateImageBitmap', 'ImportScripts', 'TrustedTypes'],
'canGc': ['Fetch', 'CreateImageBitmap', 'CreateImageBitmap_', 'ImportScripts', 'TrustedTypes'],
},
'Worklet': {

View file

@ -9,9 +9,9 @@
typedef HTMLImageElement HTMLOrSVGImageElement;
typedef (HTMLOrSVGImageElement or
/*HTMLVideoElement or*/
HTMLVideoElement or
HTMLCanvasElement or
/*ImageBitmap or*/
ImageBitmap or
OffscreenCanvas or
/*VideoFrame or*/
/*CSSImageValue*/ CSSStyleValue) CanvasImageSource;

View file

@ -24,7 +24,8 @@ typedef unsigned long GLuint;
typedef unrestricted float GLfloat;
typedef unrestricted float GLclampf;
typedef (ImageData or
typedef (ImageBitmap or
ImageData or
HTMLImageElement or
HTMLCanvasElement or
HTMLVideoElement) TexImageSource;

View file

@ -26,8 +26,9 @@ interface mixin WindowOrWorkerGlobalScope {
// ImageBitmap
[Pref="dom_imagebitmap_enabled"]
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {});
// Promise<ImageBitmap> createImageBitmap(
// ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options);
[Pref="dom_imagebitmap_enabled"]
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh,
optional ImageBitmapOptions options = {});
// structured cloning
[Throws]

View file

@ -15,5 +15,7 @@ path = "lib.rs"
[dependencies]
euclid = { workspace = true }
ipc-channel = { workspace = true }
malloc_size_of = { workspace = true }
malloc_size_of_derive = { workspace = true }
serde = { workspace = true }
pixels = { path = "../../pixels" }

View file

@ -6,17 +6,18 @@ use std::ops::{Deref, DerefMut};
use euclid::default::Size2D;
use ipc_channel::ipc::IpcSharedMemory;
use malloc_size_of_derive::MallocSizeOf;
use pixels::Multiply;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)]
pub enum PixelFormat {
#[default]
RGBA,
BGRA,
}
#[derive(Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)]
pub enum AlphaMode {
/// Internal data is opaque (alpha is cleared to 1)
Opaque,
@ -48,7 +49,7 @@ impl AlphaMode {
}
}
#[derive(Debug)]
#[derive(Clone, Debug, MallocSizeOf)]
pub enum Data {
// TODO: https://github.com/servo/servo/issues/36594
//IPC(IpcSharedMemory),
@ -84,7 +85,7 @@ pub type IpcSnapshot = Snapshot<IpcSharedMemory>;
///
/// Inspired by snapshot for concept in WebGPU spec:
/// <https://gpuweb.github.io/gpuweb/#abstract-opdef-get-a-copy-of-the-image-contents-of-a-context>
#[derive(Debug, Deserialize, Serialize)]
#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
pub struct Snapshot<T = Data> {
size: Size2D<u64>,
/// internal data (can be any format it will be converted on use if needed)
@ -194,6 +195,10 @@ impl Snapshot<Data> {
&self.data
}
pub fn data_mut(&mut self) -> &mut [u8] {
&mut self.data
}
/// Convert inner data of snapshot to target format and alpha mode.
/// If data is already in target format and alpha mode no work will be done.
pub fn transform(&mut self, target_alpha_mode: AlphaMode, target_format: PixelFormat) {

View file

@ -1,3 +0,0 @@
[2d.drawImage.broken.html]
[Canvas test: 2d.drawImage.broken]
expected: FAIL

View file

@ -1,2 +0,0 @@
[drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html]
expected: FAIL

View file

@ -1,16 +0,0 @@
[createImageBitmap-bounds.html]
[createImageBitmap: clipping to the bitmap]
expected: FAIL
[simple clip inside]
expected: FAIL
[clip outside negative]
expected: FAIL
[clip outside positive]
expected: FAIL
[clip inside using negative width and height]
expected: FAIL

View file

@ -1,8 +1,5 @@
[createImageBitmap-colorSpaceConversion.html]
expected: ERROR
[createImageBitmap from a bitmap HTMLImageElement, and drawImage on the created ImageBitmap with colorSpaceConversion: none]
expected: FAIL
[createImageBitmap from a Blob, and drawImage on the created ImageBitmap with colorSpaceConversion: none]
expected: FAIL

View file

@ -1,4 +0,0 @@
[createImageBitmap-drawImage-closed.html]
[attempt to draw a closed ImageBitmap to a 2d canvas throws INVALID_STATE_ERR]
expected: FAIL

View file

@ -6,12 +6,6 @@
[createImageBitmap from a vector HTMLImageElement resized, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an OffscreenCanvas, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLCanvasElement, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap HTMLImageElement resized, and drawImage on the created ImageBitmap]
expected: FAIL
@ -54,9 +48,6 @@
[createImageBitmap from a bitmap HTMLImageElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector SVGImageElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
@ -81,21 +72,12 @@
[createImageBitmap from a vector HTMLImageElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageData, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLCanvasElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement from a data URL with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
@ -126,9 +108,6 @@
[createImageBitmap from a bitmap SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageData with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
@ -147,18 +126,9 @@
[createImageBitmap from an HTMLVideoElement from a data URL, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap HTMLImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement from a data URL resized, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL

View file

@ -1,28 +1,27 @@
[createImageBitmap-exif-orientation.html]
expected: ERROR
[createImageBitmap with EXIF rotation, imageOrientation none, and no cropping]
expected: TIMEOUT
[createImageBitmap with EXIF rotation, imageOrientation flipY, and no cropping]
expected: TIMEOUT
expected: FAIL
[createImageBitmap with EXIF rotation, imageOrientation none, and cropping]
expected: TIMEOUT
[createImageBitmap with EXIF rotation, imageOrientation flipY, and cropping]
expected: TIMEOUT
expected: FAIL
[createImageBitmap with EXIF rotation, imageOrientation from-image, and no cropping]
expected: TIMEOUT
expected: FAIL
[createImageBitmap with EXIF rotation, imageOrientation from-image, and cropping]
expected: TIMEOUT
expected: FAIL
[createImageBitmap with EXIF rotation, imageOrientation from-image, no cropping, and resize]
expected: TIMEOUT
expected: FAIL
[createImageBitmap with EXIF rotation, imageOrientation flipY, cropping, and resize]
expected: TIMEOUT
expected: FAIL
[createImageBitmap with EXIF rotation, imageOrientation flipY, cropping, and nonuniform resize]
expected: TIMEOUT
expected: FAIL

View file

@ -15,9 +15,6 @@
[createImageBitmap from an HTMLVideoElement from a data URL imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an OffscreenCanvas imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
@ -27,24 +24,12 @@
[createImageBitmap from a Blob imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLCanvasElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageData imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an OffscreenCanvas imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an ImageBitmap imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: FAIL
@ -66,18 +51,12 @@
[createImageBitmap from a bitmap SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: TIMEOUT
[createImageBitmap from an HTMLCanvasElement imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement from a data URL imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap HTMLImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector HTMLImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
@ -87,14 +66,5 @@
[createImageBitmap from a vector SVGImageElement imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an OffscreenCanvas imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageData imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob imageOrientation: "from-image", and drawImage on the created ImageBitmap]
expected: FAIL

View file

@ -1,151 +1,49 @@
[createImageBitmap-invalid-args.html]
expected: CRASH
expected: ERROR
[createImageBitmap with a vector HTMLImageElement source and sw set to 0]
expected: FAIL
[createImageBitmap with an HTMLCanvasElement source and sw set to 0]
expected: FAIL
[createImageBitmap with a vector HTMLImageElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with a broken image source.]
expected: NOTRUN
[createImageBitmap with WebGLRenderingContext image source.]
expected: NOTRUN
[createImageBitmap with a Blob source and sw set to 0]
expected: NOTRUN
[createImageBitmap with an available but zero height image source.]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement source and sh set to 0]
expected: FAIL
[createImageBitmap with a vector HTMLImageElement source and sh set to 0]
expected: FAIL
[createImageBitmap with a Blob source and sh set to 0]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement from a data URL source and sw set to 0]
expected: FAIL
[createImageBitmap with null image source.]
expected: NOTRUN
[createImageBitmap with an ImageData source and sh set to 0]
expected: NOTRUN
[createImageBitmap with undefined image source.]
expected: NOTRUN
[createImageBitmap with an undecodable blob source.]
expected: NOTRUN
[createImageBitmap with an available but undecodable image source.]
expected: NOTRUN
expected: FAIL
[createImageBitmap with an HTMLVideoElement from a data URL source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an HTMLVideoElement source and sw set to 0]
expected: FAIL
[createImageBitmap with a vector SVGImageElement source and oversized (unallocatable) crop region]
expected: NOTRUN
[createImageBitmap with an HTMLCanvasElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with an ImageBitmap source and oversized (unallocatable) crop region]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with a bitmap HTMLImageElement source and sh set to 0]
expected: FAIL
[createImageBitmap with an ImageData source and sw set to 0]
expected: NOTRUN
[createImageBitmap with an invalid OffscreenCanvas source.]
expected: NOTRUN
[createImageBitmap with an OffscreenCanvas source and sh set to 0]
expected: NOTRUN
[createImageBitmap with an OffscreenCanvas source and sw set to 0]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement from a data URL source and sh set to 0]
expected: FAIL
[createImageBitmap with an ImageData source and oversized (unallocatable) crop region]
expected: NOTRUN
[createImageBitmap with ArrayBuffer image source.]
expected: NOTRUN
[createImageBitmap with a bitmap SVGImageElement source and oversized (unallocatable) crop region]
expected: NOTRUN
[createImageBitmap with an oversized canvas source.]
expected: NOTRUN
[createImageBitmap with Uint8Array image source.]
expected: NOTRUN
expected: FAIL
[createImageBitmap with a vector SVGImageElement source and sh set to 0]
expected: NOTRUN
[createImageBitmap with an HTMLCanvasElement source and sh set to 0]
expected: FAIL
[createImageBitmap with a closed ImageBitmap.]
expected: NOTRUN
[createImageBitmap with a bitmap HTMLImageElement source and oversized (unallocatable) crop region]
expected: FAIL
[createImageBitmap with empty image source.]
expected: NOTRUN
[createImageBitmap with empty video source.]
expected: NOTRUN
[createImageBitmap with a bitmap SVGImageElement source and sw set to 0]
expected: TIMEOUT
[createImageBitmap with an ImageBitmap source and sh set to 0]
expected: NOTRUN
[createImageBitmap with an available but zero width image source.]
expected: NOTRUN
[createImageBitmap with a vector SVGImageElement source and sw set to 0]
expected: NOTRUN
[createImageBitmap with a Blob source and oversized (unallocatable) crop region]
expected: NOTRUN
[createImageBitmap with a bitmap SVGImageElement source and sh set to 0]
expected: NOTRUN
[createImageBitmap with an ImageBitmap source and sw set to 0]
expected: NOTRUN
[createImageBitmap with a bitmap HTMLImageElement source and sw set to 0]
expected: FAIL
[createImageBitmap with an OffscreenCanvas source and oversized (unallocatable) crop region]
expected: NOTRUN
[createImageBitmap with an available but zero width image source.]
expected: FAIL
[createImageBitmap with CanvasRenderingContext2D image source.]
expected: NOTRUN
[createImageBitmap with a vector SVGImageElement source and sw set to 0]
expected: FAIL
[createImageBitmap with a bitmap SVGImageElement source and sh set to 0]
expected: FAIL
[createImageBitmap with a vector HTMLImageElement source and a value of 0 int resizeWidth]
expected: FAIL
@ -153,56 +51,23 @@
[createImageBitmap with a vector HTMLImageElement source and a value between 0 and 1 in resizeWidth]
expected: FAIL
[createImageBitmap with an OffscreenCanvas source and a value of 0 in resizeHeight]
expected: NOTRUN
[createImageBitmap with a bitmap SVGImageElement source and a value of 0 in resizeHeight]
expected: NOTRUN
[createImageBitmap with an ImageData source and a value between 0 and 1 in resizeWidth]
expected: NOTRUN
[createImageBitmap with a vector SVGImageElement source and a value of 0 int resizeWidth]
expected: NOTRUN
[createImageBitmap with an ImageBitmap source and a value between 0 and 1 in resizeWidth]
expected: NOTRUN
[createImageBitmap with an ImageBitmap source and a value of 0 int resizeWidth]
expected: NOTRUN
[createImageBitmap with an ImageData source and a value of 0 in resizeHeight]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement source and a value between 0 and 1 in resizeWidth]
expected: FAIL
[createImageBitmap with an OffscreenCanvas source and a value between 0 and 1 in resizeWidth]
expected: NOTRUN
[createImageBitmap with a vector SVGImageElement source and a value of 0 int resizeWidth]
expected: FAIL
[createImageBitmap with a vector SVGImageElement source and a value between 0 and 1 in resizeHeight]
expected: NOTRUN
[createImageBitmap with a Blob source and a value of 0 int resizeWidth]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement source and a value of 0 in resizeHeight]
expected: FAIL
[createImageBitmap with an HTMLVideoElement from a data URL source and a value between 0 and 1 in resizeWidth]
expected: FAIL
[createImageBitmap with a vector SVGImageElement source and a value of 0 in resizeHeight]
expected: NOTRUN
expected: FAIL
[createImageBitmap with a bitmap SVGImageElement source and a value between 0 and 1 in resizeHeight]
expected: NOTRUN
[createImageBitmap with a Blob source and a value between 0 and 1 in resizeHeight]
expected: NOTRUN
[createImageBitmap with a Blob source and a value between 0 and 1 in resizeWidth]
expected: NOTRUN
expected: FAIL
[createImageBitmap with a vector HTMLImageElement source and a value between 0 and 1 in resizeHeight]
expected: FAIL
@ -210,47 +75,20 @@
[createImageBitmap with an HTMLVideoElement from a data URL source and a value of 0 in resizeHeight]
expected: FAIL
[createImageBitmap with an ImageBitmap source and a value of 0 in resizeHeight]
expected: NOTRUN
[createImageBitmap with an ImageBitmap source and a value between 0 and 1 in resizeHeight]
expected: NOTRUN
[createImageBitmap with a bitmap SVGImageElement source and a value between 0 and 1 in resizeWidth]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement source and a value between 0 and 1 in resizeHeight]
expected: FAIL
[createImageBitmap with an HTMLVideoElement source and a value of 0 int resizeWidth]
expected: FAIL
[createImageBitmap with an OffscreenCanvas source and a value of 0 int resizeWidth]
expected: NOTRUN
[createImageBitmap with a vector HTMLImageElement source and a value of 0 in resizeHeight]
expected: FAIL
[createImageBitmap with an OffscreenCanvas source and a value between 0 and 1 in resizeHeight]
expected: NOTRUN
[createImageBitmap with a bitmap SVGImageElement source and a value of 0 int resizeWidth]
expected: NOTRUN
expected: FAIL
[createImageBitmap with an HTMLVideoElement from a data URL source and a value of 0 int resizeWidth]
expected: FAIL
[createImageBitmap with an ImageData source and a value between 0 and 1 in resizeHeight]
expected: NOTRUN
[createImageBitmap with an HTMLVideoElement from a data URL source and a value between 0 and 1 in resizeHeight]
expected: FAIL
[createImageBitmap with an ImageData source and a value of 0 int resizeWidth]
expected: NOTRUN
[createImageBitmap with a vector SVGImageElement source and a value between 0 and 1 in resizeWidth]
expected: NOTRUN
[createImageBitmap with a Blob source and a value of 0 in resizeHeight]
expected: NOTRUN
expected: FAIL

View file

@ -1,5 +1,4 @@
[createImageBitmap-origin.sub.html]
expected: TIMEOUT
[redirected to cross-origin HTMLVideoElement: origin unclear 2dContext.drawImage]
expected: FAIL
@ -9,9 +8,6 @@
[unclean HTMLCanvasElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[unclean HTMLCanvasElement: origin unclear getImageData]
expected: FAIL
[cross-origin HTMLVideoElement: origin unclear getImageData]
expected: FAIL
@ -24,15 +20,9 @@
[redirected to same-origin HTMLVideoElement: origin unclear getImageData]
expected: FAIL
[cross-origin HTMLImageElement: origin unclear 2dContext.drawImage]
expected: FAIL
[cross-origin SVGImageElement: origin unclear 2dContext.drawImage]
expected: FAIL
[cross-origin HTMLImageElement: origin unclear getImageData]
expected: FAIL
[cross-origin HTMLImageElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
@ -48,17 +38,8 @@
[redirected to cross-origin HTMLVideoElement: origin unclear getImageData]
expected: FAIL
[unclean ImageBitmap: origin unclear getImageData]
expected: FAIL
[unclean HTMLCanvasElement: origin unclear 2dContext.drawImage]
expected: FAIL
[cross-origin HTMLVideoElement: origin unclear 2dContext.drawImage]
expected: FAIL
[unclean ImageBitmap: origin unclear 2dContext.drawImage]
expected: FAIL
[cross-origin SVGImageElement: origin unclear getImageData]
expected: FAIL

View file

@ -1,37 +1,9 @@
[createImageBitmap-premultiplyAlpha.html]
expected: ERROR
[createImageBitmap: from ImageData, unpremultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from ImageData, premultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from ImageData, default, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D, unpremultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D, premultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D, default, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D willReadFrequently:true, unpremultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D willReadFrequently:true, premultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D willReadFrequently:true, default, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D willReadFrequently:false, unpremultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D willReadFrequently:false, premultiplied, drawn to canvas]
expected: FAIL
[createImageBitmap: from Canvas2D willReadFrequently:false, default, drawn to canvas]
expected: FAIL

View file

@ -23,9 +23,6 @@
[Serialize ImageBitmap created from a bitmap HTMLImageElement]
expected: FAIL
[Serializing a non-origin-clean ImageBitmap throws.]
expected: FAIL
[Serialize ImageBitmap created from an ImageData]
expected: FAIL

View file

@ -1,21 +0,0 @@
[createImageBitmap-sizeOverflow.html]
[createImageBitmap does not crash or reject the promise when passing very large sh]
expected: FAIL
[createImageBitmap does not crash or reject the promise when passing very large sy]
expected: FAIL
[createImageBitmap does not crash or reject the promise when passing very large sx]
expected: FAIL
[createImageBitmap does not crash or reject the promise when passing very large sw]
expected: FAIL
[createImageBitmap does not crash or reject the promise when passing very large sx, sy, sw and sh]
expected: FAIL
[createImageBitmap throws an InvalidStateError error with big imageBitmap scaled up in big height]
expected: FAIL
[createImageBitmap throws an InvalidStateError error with big imageBitmap scaled up in big width]
expected: FAIL

View file

@ -31,6 +31,3 @@
[Transfer ImageBitmap created from an HTMLVideoElement]
expected: FAIL
[Transferring a non-origin-clean ImageBitmap throws.]
expected: FAIL

View file

@ -1,2 +0,0 @@
[canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html]
expected: ERROR

View file

@ -1,625 +1,624 @@
[canvas-display-p3-drawImage-ImageBitmap-cloned.html]
expected: ERROR
[sRGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL

View file

@ -1,625 +1,408 @@
[canvas-display-p3-drawImage-ImageBitmap-image.html]
expected: ERROR
[sRGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
[sRGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FF0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FF0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FF0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FF0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FF0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000FF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BB0000CC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-FF000000.jpg, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Generic-CMYK-BE000000.jpg, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[sRGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
[Display-P3-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-FFFF00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000FFFF.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context srgb, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData srgb, cropSource=true]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=false]
expected: TIMEOUT
expected: FAIL
[Adobe-RGB-BBBC00000000CCCC.png, Context display-p3, ImageData display-p3, cropSource=true]
expected: TIMEOUT
expected: FAIL

View file

@ -1,70 +1,34 @@
[canvas-display-p3-drawImage-ImageBitmap-video.html]
[sRGB-FF0100, Context srgb, ImageData srgb, cropSource=false]
expected: FAIL
[sRGB-FF0100, Context srgb, ImageData srgb, cropSource=true]
expected: FAIL
[sRGB-FF0100, Context srgb, ImageData display-p3, cropSource=false]
expected: FAIL
[sRGB-FF0100, Context srgb, ImageData display-p3, cropSource=true]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData srgb, cropSource=false]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData srgb, cropSource=true]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData display-p3, cropSource=false]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData display-p3, cropSource=true]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData srgb, cropSource=false]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData srgb, cropSource=true]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData display-p3, cropSource=false]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData display-p3, cropSource=true]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData srgb, cropSource=false]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData srgb, cropSource=true]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData display-p3, cropSource=false]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData display-p3, cropSource=true]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData srgb, cropSource=false]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData srgb, cropSource=true]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData display-p3, cropSource=false]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData display-p3, cropSource=true]
expected: FAIL
[Rec2020-3FF000000, Context display-p3, ImageData srgb, cropSource=false]
expected: FAIL
[Rec2020-3FF000000, Context display-p3, ImageData srgb, cropSource=true]
expected: FAIL
[Rec2020-3FF000000, Context display-p3, ImageData display-p3, cropSource=false]
expected: FAIL

View file

@ -1,70 +1,34 @@
[canvas-display-p3-drawImage-video.html]
[sRGB-FF0100, Context srgb, ImageData srgb, scaleImage=false]
expected: FAIL
[sRGB-FF0100, Context srgb, ImageData srgb, scaleImage=true]
expected: FAIL
[sRGB-FF0100, Context srgb, ImageData display-p3, scaleImage=false]
expected: FAIL
[sRGB-FF0100, Context srgb, ImageData display-p3, scaleImage=true]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData srgb, scaleImage=false]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData srgb, scaleImage=true]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData display-p3, scaleImage=false]
expected: FAIL
[sRGB-FF0100, Context display-p3, ImageData display-p3, scaleImage=true]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData srgb, scaleImage=false]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData srgb, scaleImage=true]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData display-p3, scaleImage=false]
expected: FAIL
[sRGB-BB0000, Context srgb, ImageData display-p3, scaleImage=true]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData srgb, scaleImage=false]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData srgb, scaleImage=true]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData display-p3, scaleImage=false]
expected: FAIL
[sRGB-BB0000, Context display-p3, ImageData display-p3, scaleImage=true]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData srgb, scaleImage=false]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData srgb, scaleImage=true]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData display-p3, scaleImage=false]
expected: FAIL
[Rec2020-3FF000000, Context srgb, ImageData display-p3, scaleImage=true]
expected: FAIL
[Rec2020-3FF000000, Context display-p3, ImageData srgb, scaleImage=false]
expected: FAIL
[Rec2020-3FF000000, Context display-p3, ImageData srgb, scaleImage=true]
expected: FAIL
[Rec2020-3FF000000, Context display-p3, ImageData display-p3, scaleImage=false]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.video.invalid.html]
[Verify test doesn't crash with invalid video.]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.drawImage.broken.html]
[OffscreenCanvas test: 2d.drawImage.broken]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.drawImage.broken.worker.html]
[2d]
expected: FAIL

View file

@ -1,5 +1,4 @@
[security.pattern.fillStyle.sub.html]
expected: TIMEOUT
[cross-origin SVGImageElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean]
expected: FAIL
@ -10,31 +9,16 @@
expected: FAIL
[redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean]
expected: TIMEOUT
[unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean]
expected: NOTRUN
[unclean ImageBitmap: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean]
expected: NOTRUN
[cross-origin HTMLImageElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
expected: FAIL
[cross-origin SVGImageElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
expected: FAIL
[cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
expected: FAIL
[redirected to cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
expected: FAIL
[redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
[unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
[unclean ImageBitmap: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean]
expected: NOTRUN
expected: FAIL

View file

@ -1,4 +0,0 @@
[tex-2d-alpha-alpha-unsigned_byte.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
expected: ERROR
[Overall test]
expected: NOTRUN

View file

@ -1,3 +0,0 @@
[tex-2d-alpha-alpha-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-alpha-alpha-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-alpha-alpha-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,3 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
[WebGL test #1]
expected: FAIL

View file

@ -1,10 +0,0 @@
[tex-2d-alpha-alpha-unsigned_byte.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN
[WebGL test #1]
expected: FAIL
[WebGL test #3]
expected: FAIL

View file

@ -1,4 +0,0 @@
[tex-2d-luminance-luminance-unsigned_byte.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgb-rgb-unsigned_byte.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgb-rgb-unsigned_short_5_6_5.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgba-rgba-unsigned_byte.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html]
expected: TIMEOUT
[Overall test]
expected: NOTRUN

View file

@ -13,3 +13,6 @@
[WebGL test #588]
expected: FAIL
[WebGL test #52]
expected: FAIL