Auto merge of #25916 - ferjm:canvas.layout.2020, r=nox

Render HTML <canvas> elements on layout 2020

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #25885
- [X] There are tests for these changes
This commit is contained in:
bors-servo 2020-03-06 07:24:03 -05:00 committed by GitHub
commit 85ed7d3883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
190 changed files with 1644 additions and 44 deletions

1
Cargo.lock generated
View file

@ -2908,6 +2908,7 @@ version = "0.0.1"
dependencies = [
"app_units",
"atomic_refcell",
"canvas_traits",
"cssparser",
"embedder_traits",
"euclid",

View file

@ -15,6 +15,7 @@ doctest = false
[dependencies]
app_units = "0.7"
atomic_refcell = "0.1"
canvas_traits = {path = "../canvas_traits"}
cssparser = "0.27"
embedder_traits = {path = "../embedder_traits"}
euclid = "0.20"

View file

@ -5,7 +5,7 @@
use crate::context::LayoutContext;
use crate::element_data::{LayoutBox, LayoutDataForElement};
use crate::geom::PhysicalSize;
use crate::replaced::ReplacedContent;
use crate::replaced::{CanvasInfo, CanvasSource, ReplacedContent};
use crate::style_ext::{Display, DisplayGeneratingBox, DisplayInside, DisplayOutside};
use crate::wrapper::GetRawData;
use atomic_refcell::{AtomicRefCell, AtomicRefMut};
@ -14,9 +14,10 @@ use net_traits::image::base::Image as NetImage;
use script_layout_interface::wrapper_traits::{
LayoutNode, ThreadSafeLayoutElement, ThreadSafeLayoutNode,
};
use script_layout_interface::HTMLCanvasDataSource;
use servo_arc::Arc as ServoArc;
use std::marker::PhantomData as marker;
use std::sync::Arc;
use std::sync::{Arc, Mutex};
use style::dom::{OpaqueNode, TNode};
use style::properties::ComputedValues;
use style::selector_parser::PseudoElement;
@ -354,6 +355,7 @@ pub(crate) trait NodeExt<'dom>: 'dom + Copy + LayoutNode + Send + Sync {
/// Returns the image if its loaded, and its size in image pixels
/// adjusted for `image_density`.
fn as_image(self) -> Option<(Option<Arc<NetImage>>, PhysicalSize<f64>)>;
fn as_canvas(self) -> Option<(CanvasInfo, PhysicalSize<f64>)>;
fn first_child(self) -> Option<Self>;
fn next_sibling(self) -> Option<Self>;
fn parent_node(self) -> Option<Self>;
@ -399,6 +401,24 @@ where
Some((resource, PhysicalSize::new(width, height)))
}
fn as_canvas(self) -> Option<(CanvasInfo, PhysicalSize<f64>)> {
let node = self.to_threadsafe();
let canvas_data = node.canvas_data()?;
let source = match canvas_data.source {
HTMLCanvasDataSource::WebGL(texture_id) => CanvasSource::WebGL(texture_id),
HTMLCanvasDataSource::Image(ipc_sender) => {
CanvasSource::Image(ipc_sender.map(|renderer| Arc::new(Mutex::new(renderer))))
},
};
Some((
CanvasInfo {
source,
canvas_id: canvas_data.canvas_id,
},
PhysicalSize::new(canvas_data.width.into(), canvas_data.height.into()),
))
}
fn first_child(self) -> Option<Self> {
TNode::first_child(&self)
}

View file

@ -10,15 +10,19 @@ use crate::geom::PhysicalSize;
use crate::sizing::ContentSizes;
use crate::style_ext::ComputedValuesExt;
use crate::ContainingBlock;
use canvas_traits::canvas::{CanvasId, CanvasMsg, FromLayoutMsg};
use ipc_channel::ipc::{self, IpcSender};
use net_traits::image::base::Image;
use net_traits::image_cache::{ImageOrMetadataAvailable, UsePlaceholder};
use servo_arc::Arc as ServoArc;
use std::sync::Arc;
use std::fmt;
use std::sync::{Arc, Mutex};
use style::properties::ComputedValues;
use style::servo::url::ComputedUrl;
use style::values::computed::{Length, LengthOrAuto};
use style::values::CSSFloat;
use style::Zero;
use webrender_api::ImageKey;
#[derive(Debug, Serialize)]
pub(crate) struct ReplacedContent {
@ -44,33 +48,69 @@ pub(crate) struct IntrinsicSizes {
pub ratio: Option<CSSFloat>,
}
#[derive(Serialize)]
pub(crate) enum CanvasSource {
WebGL(ImageKey),
Image(Option<Arc<Mutex<IpcSender<CanvasMsg>>>>),
}
impl fmt::Debug for CanvasSource {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"{}",
match *self {
CanvasSource::WebGL(_) => "WebGL",
CanvasSource::Image(_) => "Image",
}
)
}
}
#[derive(Debug, Serialize)]
pub(crate) struct CanvasInfo {
pub source: CanvasSource,
pub canvas_id: CanvasId,
}
#[derive(Debug, Serialize)]
pub(crate) enum ReplacedContentKind {
Image(Option<Arc<Image>>),
Canvas(CanvasInfo),
}
impl ReplacedContent {
pub fn for_element<'dom>(element: impl NodeExt<'dom>) -> Option<Self> {
if let Some((image, intrinsic_size_in_dots)) = element.as_image() {
// FIXME: should 'image-resolution' (when implemented) be used *instead* of
// `script::dom::htmlimageelement::ImageRequest::current_pixel_density`?
let (kind, intrinsic_size_in_dots) = {
if let Some((image, intrinsic_size_in_dots)) = element.as_image() {
(ReplacedContentKind::Image(image), intrinsic_size_in_dots)
} else if let Some((canvas_info, intrinsic_size_in_dots)) = element.as_canvas() {
(
ReplacedContentKind::Canvas(canvas_info),
intrinsic_size_in_dots,
)
} else {
return None;
}
};
// https://drafts.csswg.org/css-images-4/#the-image-resolution
let dppx = 1.0;
// FIXME: should 'image-resolution' (when implemented) be used *instead* of
// `script::dom::htmlimageelement::ImageRequest::current_pixel_density`?
let width = (intrinsic_size_in_dots.width as CSSFloat) / dppx;
let height = (intrinsic_size_in_dots.height as CSSFloat) / dppx;
return Some(Self {
kind: ReplacedContentKind::Image(image),
intrinsic: IntrinsicSizes {
width: Some(Length::new(width)),
height: Some(Length::new(height)),
// FIXME https://github.com/w3c/csswg-drafts/issues/4572
ratio: Some(width / height),
},
});
}
None
// https://drafts.csswg.org/css-images-4/#the-image-resolution
let dppx = 1.0;
let width = (intrinsic_size_in_dots.width as CSSFloat) / dppx;
let height = (intrinsic_size_in_dots.height as CSSFloat) / dppx;
return Some(Self {
kind,
intrinsic: IntrinsicSizes {
width: Some(Length::new(width)),
height: Some(Length::new(height)),
// FIXME https://github.com/w3c/csswg-drafts/issues/4572
ratio: Some(width / height),
},
});
}
pub fn from_image_url<'dom>(
@ -160,6 +200,34 @@ impl ReplacedContent {
})
.into_iter()
.collect(),
ReplacedContentKind::Canvas(canvas_info) => {
let image_key = match canvas_info.source {
CanvasSource::WebGL(image_key) => image_key,
CanvasSource::Image(ref ipc_renderer) => match *ipc_renderer {
Some(ref ipc_renderer) => {
let ipc_renderer = ipc_renderer.lock().unwrap();
let (sender, receiver) = ipc::channel().unwrap();
ipc_renderer
.send(CanvasMsg::FromLayout(
FromLayoutMsg::SendData(sender),
canvas_info.canvas_id,
))
.unwrap();
receiver.recv().unwrap().image_key
},
None => return vec![],
},
};
vec![Fragment::Image(ImageFragment {
debug_id: DebugId::new(),
style: style.clone(),
rect: Rect {
start_corner: Vec2::zero(),
size,
},
image_key,
})]
},
}
}

View file

@ -5,6 +5,8 @@ skip: true
skip: false
[mozilla]
skip: false
[2dcontext]
skip: false
[css]
skip: true
[CSS2]

View file

@ -0,0 +1,4 @@
[2d.voidreturn.html]
[void methods return undefined]
expected: FAIL

View file

@ -0,0 +1,13 @@
[getContextAttributes.html]
[Test context creation attributes alpha: true]
expected: FAIL
[Test context creation attributes alpha: false]
expected: FAIL
[Test default context creation attributes]
expected: FAIL
[Test context creation attributes desynchronized: false]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.drawImage.svg.html]
[drawImage() of an SVG image]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.drawImage.zerosource.image.html]
[drawImage with zero-sized source rectangle from image throws INDEX_SIZE_ERR]
expected: FAIL

View file

@ -0,0 +1,34 @@
[drawimage_canvas.html]
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 99,84 should be black.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 70,70 should be blue.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 69,69 should be red.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 99,70 should be blue.]
expected: FAIL
[Test scenario 10: sx = 0, sy = 0, sw = 50, sh = 50, dx = 0, dy = 0, dw = 200, dh = 200 --- Pixel 20,99 should be black.]
expected: FAIL
[Test scenario 10: sx = 0, sy = 0, sw = 50, sh = 50, dx = 0, dy = 0, dw = 200, dh = 200 --- Pixel 99,20 should be black.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 99,99 should be black.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 70,99 should be blue.]
expected: FAIL
[Test scenario 10: sx = 0, sy = 0, sw = 50, sh = 50, dx = 0, dy = 0, dw = 200, dh = 200 --- Pixel 20,20 should be black.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 84,99 should be black.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 82,82 should be blue.]
expected: FAIL

View file

@ -0,0 +1,13 @@
[drawimage_html_image.html]
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 99,99 should be light purple.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 69,69 should be red.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 99,70 should be light purple.]
expected: FAIL
[Test scenario 12: sx = -20, sy = -20, sw = 50, sh = 50, dx = 20, dy = 20, dw = 125, dh = 125 --- Pixel 70,99 should be light purple.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[drawimage_svg_image_1.html]
[Load a 100x100 image to a SVG image and draw it to a 100x100 canvas.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[drawimage_svg_image_with_foreign_object_does_not_taint.html]
expected: TIMEOUT
[Canvas should not be tainted after drawing SVG including <foreignObject>]
expected: TIMEOUT

View file

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

View file

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

View file

@ -0,0 +1,2 @@
[drawImage-from-element-swap-width-height.html]
expected: FAIL

View file

@ -0,0 +1,4 @@
[drawFocusIfNeeded_001.html]
[drawFocusIfNeeded draws a focus ring.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[drawFocusIfNeeded_002.html]
[drawFocusIfNeeded does not draw a focus ring if the element is not in focus.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[drawFocusIfNeeded_003.html]
[drawFocusIfNeeded does not draw a focus ring if the element is not a descendant of the context.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[drawFocusIfNeeded_004.html]
[drawFocusIfNeeded does draw a focus ring if the element is in focus.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[drawFocusIfNeeded_005.html]
[drawFocusIfNeeded does draw a focus ring if the element is in focus and the user activated a particular focus ring.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.fillRect.shadow.html]
[fillRect draws shadows]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.strokeRect.shadow.html]
[strokeRect draws shadows]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.center.html]
[textAlign center is the center of the em squares (not the bounding box)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.end.ltr.html]
[textAlign end with ltr is the right edge]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.end.rtl.html]
[textAlign end with rtl is the left edge]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.left.html]
[textAlign left is the left of the first em square (not the bounding box)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.right.html]
[textAlign right is the right of the last em square (not the bounding box)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.start.ltr.html]
[textAlign start with ltr is the left edge]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.align.start.rtl.html]
[textAlign start with rtl is the right edge]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.fill.maxWidth.bound.html]
[fillText handles maxWidth based on line size, not bounding box size]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.fontface.html]
[Canvas test: 2d.text.draw.fontface]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.fontface.notinpage.html]
[@font-face fonts should work even if they are not used in the page]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.fontface.repeat.html]
[Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.space.basic.html]
[U+0020 is rendered the correct size (1em wide)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.space.collapse.nonspace.html]
[Non-space characters are not converted to U+0020 and collapsed]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.draw.stroke.unaffected.html]
[strokeText does not start a new path or subpath]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.actualBoundingBox.html]
[Testing actualBoundingBox]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.advances.html]
[Testing width advances]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.baselines.html]
[Testing baselines]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.emHeights.html]
[Testing emHeights]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.fontBoundingBox.html]
[Testing fontBoundingBox]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.width.basic.html]
[The width of character is same as font used]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.text.measure.width.empty.html]
[The empty string has zero width]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.fillStyle.parse.current.basic.html]
[currentColor is computed from the canvas element]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.fillStyle.parse.current.changed.html]
[currentColor is computed when the attribute is set, not when it is painted]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.fillStyle.parse.current.notrendered.html]
[currentColor is computed from the canvas element even when element is not rendered]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.fillStyle.parse.system.html]
[Canvas test: 2d.fillStyle.parse.system]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.interpolate.zerosize.strokeText.html]
[Canvas test: 2d.gradient.interpolate.zerosize.strokeText]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.cone.behind.html]
[Canvas test: 2d.gradient.radial.cone.behind]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.cone.beside.html]
[Canvas test: 2d.gradient.radial.cone.beside]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.cone.shape2.html]
[Canvas test: 2d.gradient.radial.cone.shape2]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.inside3.html]
[Canvas test: 2d.gradient.radial.inside3]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.outside2.html]
[Canvas test: 2d.gradient.radial.outside2]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.outside3.html]
[Canvas test: 2d.gradient.radial.outside3]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.touch1.html]
[Canvas test: 2d.gradient.radial.touch1]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.touch2.html]
[Canvas test: 2d.gradient.radial.touch2]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.gradient.radial.touch3.html]
[Canvas test: 2d.gradient.radial.touch3]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.pattern.image.nonexistent-but-loading.html]
[Canvas test: 2d.pattern.image.nonexistent-but-loading]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.pattern.image.nonexistent.html]
[Canvas test: 2d.pattern.image.nonexistent]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.pattern.image.nosrc.html]
[Canvas test: 2d.pattern.image.nosrc]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.pattern.svgimage.nonexistent.html]
[Canvas test: 2d.pattern.svgimage.nonexistent]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.pattern.svgimage.zeroheight.html]
[Canvas test: 2d.pattern.svgimage.zeroheight]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.pattern.svgimage.zerowidth.html]
[Canvas test: 2d.pattern.svgimage.zerowidth]
expected: FAIL

View file

@ -0,0 +1,13 @@
[addHitRegions-NotSupportedError-01.html]
[strokeRect should not affect current default path and NotSupportedError should be thrown.]
expected: FAIL
[fillRect should not affect current default path and NotSupportedError should be thrown.]
expected: FAIL
[strokeText should not affect current default path and NotSupportedError shuld be thrown.]
expected: FAIL
[fillText should not affect current default path and NotSupportedError should be thrown.]
expected: FAIL

View file

@ -0,0 +1,10 @@
[hitregions-members-exist.html]
[context.addHitRegion Exists]
expected: FAIL
[context.clearHitRegions Exists]
expected: FAIL
[context.removeHitRegion Exists]
expected: FAIL

View file

@ -0,0 +1,16 @@
[canvas-createImageBitmap-resize.html]
[createImageBitmap from an ImageData with resize option.]
expected: FAIL
[createImageBitmap from a HTMLImageElement with resize option.]
expected: FAIL
[createImageBitmap from a HTMLCanvasElement with resize option.]
expected: FAIL
[createImageBitmap from an ImageBitmap with resize option.]
expected: FAIL
[createImageBitmap from a Blob with resize option.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[canvas-createImageBitmap-video-resize.html]
[createImageBitmap(HTMLVideoElement) with resize option]
expected: FAIL

View file

@ -0,0 +1,4 @@
[createImageBitmap-blob-invalidtype.html]
[createImageBitmap: blob with wrong mime type]
expected: FAIL

View file

@ -0,0 +1,4 @@
[createImageBitmap-bounds.html]
[createImageBitmap: clipping to the bitmap]
expected: FAIL

View file

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

View file

@ -0,0 +1,167 @@
[createImageBitmap-drawImage.html]
expected: TIMEOUT
[createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap]
expected: NOTRUN
[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: NOTRUN
[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
[createImageBitmap from an HTMLVideoElement, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement from a data URL scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageData scaled down, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a bitmap SVGImageElement, and drawImage on the created ImageBitmap]
expected: TIMEOUT
[createImageBitmap from a bitmap SVGImageElement resized, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLCanvasElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector SVGImageElement, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an ImageData scaled up, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLVideoElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap SVGImageElement scaled up, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap]
expected: NOTRUN
[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: NOTRUN
[createImageBitmap from a vector SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a bitmap HTMLImageElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement scaled down, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector HTMLImageElement, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob scaled down, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an ImageData resized, and drawImage on the created ImageBitmap]
expected: NOTRUN
[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: NOTRUN
[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: NOTRUN
[createImageBitmap from an ImageBitmap, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a Blob scaled up, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a bitmap SVGImageElement scaled down, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLVideoElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLCanvasElement resized, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLVideoElement resized, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement from a data URL scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap scaled down, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a Blob with negative sw/sh, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a bitmap SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an ImageData with negative sw/sh, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an ImageBitmap scaled up, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an ImageBitmap resized, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLCanvasElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob resized, and drawImage on the created ImageBitmap]
expected: NOTRUN
[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: NOTRUN
[createImageBitmap from an OffscreenCanvas with negative sw/sh, and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a vector HTMLImageElement with negative sw/sh, and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a vector HTMLImageElement scaled up, and drawImage on the created ImageBitmap]
expected: FAIL

View file

@ -0,0 +1,68 @@
[createImageBitmap-flipY.html]
expected: TIMEOUT
[createImageBitmap from a vector SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a vector SVGImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLCanvasElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageData imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: NOTRUN
[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: NOTRUN
[createImageBitmap from a vector HTMLImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an HTMLVideoElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: NOTRUN
[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: NOTRUN
[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: NOTRUN
[createImageBitmap from a vector HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a Blob imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from an HTMLVideoElement from a data URL imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from an ImageBitmap imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a bitmap HTMLImageElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: FAIL
[createImageBitmap from a bitmap SVGImageElement imageOrientation: "flipY", and drawImage on the created ImageBitmap]
expected: NOTRUN
[createImageBitmap from a bitmap SVGImageElement imageOrientation: "none", and drawImage on the created ImageBitmap]
expected: TIMEOUT

View file

@ -0,0 +1,5 @@
[createImageBitmap-in-worker-transfer.html]
expected: ERROR
[Transfer ImageBitmap created in worker]
expected: TIMEOUT

View file

@ -0,0 +1,149 @@
[createImageBitmap-invalid-args.html]
expected: TIMEOUT
[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
[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
[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 CanvasRenderingContext2D image source.]
expected: NOTRUN

View file

@ -0,0 +1,64 @@
[createImageBitmap-origin.sub.html]
[redirected to cross-origin HTMLVideoElement: origin unclear 2dContext.drawImage]
expected: FAIL
[redirected to cross-origin HTMLVideoElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[unclean HTMLCanvasElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[unclean HTMLCanvasElement: origin unclear getImageData]
expected: FAIL
[cross-origin HTMLVideoElement: origin unclear getImageData]
expected: FAIL
[cross-origin SVGImageElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[cross-origin HTMLVideoElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[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
[redirected to same-origin HTMLVideoElement: origin unclear 2dContext.drawImage]
expected: FAIL
[unclean ImageBitmap: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[redirected to same-origin HTMLVideoElement: origin unclear bitmaprenderer.transferFromImageBitmap]
expected: FAIL
[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

@ -0,0 +1,38 @@
[createImageBitmap-serializable.html]
expected: ERROR
[Serialize ImageBitmap created from a vector SVGImageElement]
expected: FAIL
[Serialize ImageBitmap created from an HTMLVideoElement]
expected: FAIL
[Serialize ImageBitmap created from an HTMLCanvasElement]
expected: FAIL
[Serialize ImageBitmap created from an HTMLVideoElement from a data URL]
expected: FAIL
[Serialize ImageBitmap created from an OffscreenCanvas]
expected: FAIL
[Serialize ImageBitmap created from a vector HTMLImageElement]
expected: FAIL
[Serialize ImageBitmap created from a Blob]
expected: FAIL
[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
[Serialize ImageBitmap created from an ImageBitmap]
expected: FAIL
[Serialize ImageBitmap created from a bitmap SVGImageElement]
expected: FAIL

View file

@ -0,0 +1,16 @@
[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

View file

@ -0,0 +1,38 @@
[createImageBitmap-transfer.html]
expected: ERROR
[Transfer ImageBitmap created from a vector HTMLImageElement]
expected: FAIL
[Transfer ImageBitmap created from an ImageData]
expected: FAIL
[Transfer ImageBitmap created from a vector SVGImageElement]
expected: FAIL
[Transfer ImageBitmap created from a Blob]
expected: FAIL
[Transfer ImageBitmap created from an HTMLCanvasElement]
expected: FAIL
[Transfer ImageBitmap created from an OffscreenCanvas]
expected: FAIL
[Transfer ImageBitmap created from a bitmap HTMLImageElement]
expected: FAIL
[Transfer ImageBitmap created from an HTMLVideoElement from a data URL]
expected: FAIL
[Transfer ImageBitmap created from a bitmap SVGImageElement]
expected: FAIL
[Transfer ImageBitmap created from an ImageBitmap]
expected: FAIL
[Transfer ImageBitmap created from an HTMLVideoElement]
expected: FAIL
[Transferring a non-origin-clean ImageBitmap throws.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.line.cap.closed.html]
[Line caps are not drawn at the corners of an unclosed rectangle]
expected: FAIL

View file

@ -0,0 +1,2 @@
[lineto_a.html]
expected: FAIL

View file

@ -0,0 +1,7 @@
[setLineDash.html]
[Invalid arguments to setLineDash()]
expected: FAIL
[setLineDash]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.arc.scale.2.html]
[Highly scaled arcs are the right shape]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.arc.selfintersect.1.html]
[arc() with lineWidth > 2*radius is drawn sensibly]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.arc.selfintersect.2.html]
[arc() with lineWidth > 2*radius is drawn sensibly]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.arc.shape.3.html]
[arc() from 0 to -pi/2 does not draw anything in the wrong quadrant]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.arc.shape.4.html]
[arc() from 0 to -pi/2 draws stuff in the right quadrant]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.stroke.scale2.html]
[Stroke line widths are scaled by the current transformation matrix]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.path.stroke.skew.html]
[Strokes lines are skewed by the current transformation matrix]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.imageData.create2.nonfinite.html]
[createImageData() throws TypeError if arguments are not finite]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.imageData.get.nonfinite.html]
[getImageData() throws TypeError if arguments are not finite]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.imageData.get.source.outside.html]
[getImageData() returns transparent black outside the canvas]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.imageData.put.nonfinite.html]
[putImageData() throws TypeError if arguments are not finite]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.imageData.put.unchanged.html]
[putImageData(getImageData(...), ...) has no effect]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.scrollPathIntoView.basic.html]
[scrollPathIntoView() works]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.scrollPathIntoView.path.html]
[scrollPathIntoView() with path argument works]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.scrollPathIntoView.verticalLR.html]
[scrollPathIntoView() works in vertical-lr writing mode]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.scrollPathIntoView.verticalRL.html]
[scrollPathIntoView() works in vertical-rl writing mode]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.shadow.alpha.2.html]
[Shadow colour alpha components are used]
expected: FAIL

View file

@ -0,0 +1,4 @@
[2d.shadow.alpha.3.html]
[Shadows are affected by globalAlpha]
expected: FAIL

Some files were not shown because too many files have changed in this diff Show more