diff --git a/components/canvas/canvas_paint_task.rs b/components/canvas/canvas_paint_task.rs index d3cc916bc300..db149cfccd38 100644 --- a/components/canvas/canvas_paint_task.rs +++ b/components/canvas/canvas_paint_task.rs @@ -301,7 +301,22 @@ impl<'a> CanvasPaintTask<'a> { } fn fill_rect(&self, rect: &Rect) { - self.drawtarget.fill_rect(rect, self.state.fill_style.to_pattern_ref(), + let draw_rect = Rect(rect.origin, + match self.state.fill_style { + Pattern::Surface(ref surface) => { + let surface_size = surface.size(); + match (surface.repeat_x, surface.repeat_y) { + (true, true) => rect.size, + (true, false) => Size2D(rect.size.width, surface_size.height as f32), + (false, true) => Size2D(surface_size.width as f32, rect.size.height), + (false, false) => Size2D(surface_size.width as f32, surface_size.height as f32), + } + }, + _ => rect.size, + } + ); + + self.drawtarget.fill_rect(&draw_rect, self.state.fill_style.to_pattern_ref(), Some(&self.state.draw_options)); } diff --git a/components/canvas_traits/lib.rs b/components/canvas_traits/lib.rs index f673f70600bd..dcf27baeea16 100644 --- a/components/canvas_traits/lib.rs +++ b/components/canvas_traits/lib.rs @@ -17,6 +17,7 @@ use azure::azure::{AzFloat, AzColor}; use azure::azure_hl::{DrawTarget, Pattern, ColorPattern}; use azure::azure_hl::{GradientStop, LinearGradientPattern, RadialGradientPattern, ExtendMode}; use azure::azure_hl::{JoinStyle, CapStyle, CompositionOp}; +use azure::azure_hl::{SurfacePattern, SurfaceFormat}; use cssparser::RGBA; use geom::matrix2d::Matrix2D; use geom::point::Point2D; @@ -176,11 +177,33 @@ impl RadialGradientStyle { } } +#[derive(Clone)] +pub struct SurfaceStyle { + pub surface_data: Vec, + pub surface_size: Size2D, + pub repeat_x: bool, + pub repeat_y: bool, +} + +impl SurfaceStyle { + pub fn new(surface_data: Vec, surface_size: Size2D, repeat_x: bool, repeat_y: bool) + -> SurfaceStyle { + SurfaceStyle { + surface_data: surface_data, + surface_size: surface_size, + repeat_x: repeat_x, + repeat_y: repeat_y, + } + } +} + + #[derive(Clone)] pub enum FillOrStrokeStyle { Color(RGBA), LinearGradient(LinearGradientStyle), RadialGradient(RadialGradientStyle), + Surface(SurfaceStyle), } impl FillOrStrokeStyle { @@ -220,6 +243,18 @@ impl FillOrStrokeStyle { radial_gradient_style.r0 as AzFloat, radial_gradient_style.r1 as AzFloat, drawtarget.create_gradient_stops(&gradient_stops, ExtendMode::Clamp), &Matrix2D::identity())) + }, + FillOrStrokeStyle::Surface(ref surface_style) => { + let source_surface = drawtarget.create_source_surface_from_data( + &surface_style.surface_data, + surface_style.surface_size, + surface_style.surface_size.width * 4, + SurfaceFormat::B8G8R8A8); + + Pattern::Surface(SurfacePattern::new( + source_surface.azure_source_surface, + surface_style.repeat_x, + surface_style.repeat_y)) } } } @@ -277,6 +312,26 @@ impl LineJoinStyle { } } +#[derive(Copy, Clone, PartialEq)] +pub enum RepetitionStyle { + Repeat, + RepeatX, + RepeatY, + NoRepeat, +} + +impl RepetitionStyle { + pub fn from_str(string: &str) -> Option { + match string { + "repeat" => Some(RepetitionStyle::Repeat), + "repeat-x" => Some(RepetitionStyle::RepeatX), + "repeat-y" => Some(RepetitionStyle::RepeatY), + "no-repeat" => Some(RepetitionStyle::NoRepeat), + _ => None + } + } +} + #[derive(Copy, Clone, PartialEq)] pub enum CompositionStyle { SrcIn, diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 1d6fe23c7858..a4ef3eb6d9bc 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -35,11 +35,12 @@ use dom::bindings::utils::{Reflectable, Reflector, WindowProxyHandler}; use script_task::ScriptChan; use canvas_traits::{CanvasGradientStop, LinearGradientStyle, RadialGradientStyle}; -use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending}; +use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending, RepetitionStyle}; use cssparser::RGBA; use encoding::types::EncodingRef; use geom::matrix2d::Matrix2D; use geom::rect::Rect; +use geom::size::Size2D; use html5ever::tree_builder::QuirksMode; use hyper::header::Headers; use hyper::method::Method; @@ -249,6 +250,7 @@ no_jsmanaged_fields!(isize, i8, i16, i32, i64); no_jsmanaged_fields!(Sender); no_jsmanaged_fields!(Receiver); no_jsmanaged_fields!(Rect); +no_jsmanaged_fields!(Size2D); no_jsmanaged_fields!(Arc); no_jsmanaged_fields!(Image, ImageCacheChan, ImageCacheTask, ScriptControlChan); no_jsmanaged_fields!(Atom, Namespace); @@ -272,6 +274,7 @@ no_jsmanaged_fields!(Matrix2D); no_jsmanaged_fields!(StorageType); no_jsmanaged_fields!(CanvasGradientStop, LinearGradientStyle, RadialGradientStyle); no_jsmanaged_fields!(LineCapStyle, LineJoinStyle, CompositionOrBlending); +no_jsmanaged_fields!(RepetitionStyle); impl JSTraceable for Box { #[inline] diff --git a/components/script/dom/canvaspattern.rs b/components/script/dom/canvaspattern.rs index b8b2808d3b9a..0be707a1147b 100644 --- a/components/script/dom/canvaspattern.rs +++ b/components/script/dom/canvaspattern.rs @@ -2,12 +2,54 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use dom::bindings::utils::Reflector; +use canvas_traits::{FillOrStrokeStyle, SurfaceStyle, RepetitionStyle}; +use dom::bindings::codegen::Bindings::CanvasPatternBinding; +use dom::bindings::global::GlobalRef; +use dom::bindings::js::{JSRef, Temporary}; +use dom::bindings::utils::{Reflector, reflect_dom_object}; +use dom::canvasgradient::ToFillOrStrokeStyle; +use geom::size::Size2D; // https://html.spec.whatwg.org/multipage/#canvaspattern #[dom_struct] pub struct CanvasPattern { reflector_: Reflector, + surface_data: Vec, + surface_size: Size2D, + repeat_x: bool, + repeat_y: bool, } +impl CanvasPattern { + fn new_inherited(surface_data: Vec, surface_size: Size2D, repeat: RepetitionStyle) -> CanvasPattern { + let (x, y) = match repeat { + RepetitionStyle::Repeat => (true, true), + RepetitionStyle::RepeatX => (true, false), + RepetitionStyle::RepeatY => (false, true), + RepetitionStyle::NoRepeat => (false, false), + }; + CanvasPattern { + reflector_: Reflector::new(), + surface_data: surface_data, + surface_size: surface_size, + repeat_x: x, + repeat_y: y, + } + } + pub fn new(global: GlobalRef, + surface_data: Vec, + surface_size: Size2D, + repeat: RepetitionStyle) + -> Temporary { + reflect_dom_object(box CanvasPattern::new_inherited(surface_data, surface_size, repeat), + global, CanvasPatternBinding::Wrap) + } +} + +impl<'a> ToFillOrStrokeStyle for JSRef<'a, CanvasPattern> { + fn to_fill_or_stroke_style(&self) -> FillOrStrokeStyle { + FillOrStrokeStyle::Surface( + SurfaceStyle::new(self.surface_data.clone(), self.surface_size, self.repeat_x, self.repeat_y)) + } +} diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs index b7edc07aaa86..596da8467c35 100644 --- a/components/script/dom/canvasrenderingcontext2d.rs +++ b/components/script/dom/canvasrenderingcontext2d.rs @@ -9,13 +9,14 @@ use dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods; use dom::bindings::codegen::InheritTypes::NodeCast; use dom::bindings::codegen::UnionTypes::HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D; use dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern; -use dom::bindings::error::Error::{IndexSize, NotSupported, Type, InvalidState}; +use dom::bindings::error::Error::{IndexSize, NotSupported, Type, InvalidState, Syntax}; use dom::bindings::error::Fallible; use dom::bindings::global::{GlobalRef, GlobalField}; use dom::bindings::js::{JS, JSRef, LayoutJS, Rootable, Temporary, Unrooted}; use dom::bindings::num::Finite; use dom::bindings::utils::{Reflector, reflect_dom_object}; use dom::canvasgradient::{CanvasGradient, CanvasGradientStyle, ToFillOrStrokeStyle}; +use dom::canvaspattern::CanvasPattern; use dom::htmlcanvaselement::{HTMLCanvasElement, HTMLCanvasElementHelpers}; use dom::htmlimageelement::{HTMLImageElement, HTMLImageElementHelpers}; use dom::imagedata::{ImageData, ImageDataHelpers}; @@ -29,7 +30,7 @@ use geom::rect::Rect; use geom::size::Size2D; use canvas_traits::{CanvasMsg, Canvas2dMsg, CanvasCommonMsg}; -use canvas_traits::{FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle}; +use canvas_traits::{FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle, RepetitionStyle}; use canvas_traits::{LineCapStyle, LineJoinStyle, CompositionOrBlending}; use canvas::canvas_paint_task::CanvasPaintTask; @@ -865,7 +866,10 @@ impl<'a> CanvasRenderingContext2DMethods for JSRef<'a, CanvasRenderingContext2D> Canvas2dMsg::SetFillStyle(gradient_root.r().to_fill_or_stroke_style())); self.renderer.send(msg).unwrap(); } - _ => {} + StringOrCanvasGradientOrCanvasPattern::eCanvasPattern(pattern) => { + self.renderer.send(CanvasMsg::Canvas2d(Canvas2dMsg::SetFillStyle( + pattern.root().r().to_fill_or_stroke_style()))).unwrap(); + } } } @@ -997,6 +1001,44 @@ impl<'a> CanvasRenderingContext2DMethods for JSRef<'a, CanvasRenderingContext2D> RadialGradientStyle::new(x0, y0, r0, x1, y1, r1, Vec::new())))) } + // https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern + fn CreatePattern(self, image: HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D, + repetition: DOMString) -> Fallible> { + match image { + HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D::eHTMLImageElement(image) => { + let image = image.root(); + let image_element = image.r(); + + let url = match image_element.get_url() { + Some(url) => url, + None => return Err(InvalidState), + }; + + let img = match self.request_image_from_cache(url) { + ImageResponse::Loaded(img) => img, + ImageResponse::PlaceholderLoaded(_) | ImageResponse::None => return Err(InvalidState), + }; + + let image_size = Size2D(img.width as f64, img.height as f64); + let image_data = match img.pixels { + PixelsByColorType::RGBA8(ref pixels) => pixels.to_vec(), + PixelsByColorType::K8(_) => panic!("K8 color type not supported"), + PixelsByColorType::RGB8(_) => panic!("RGB8 color type not supported"), + PixelsByColorType::KA8(_) => panic!("KA8 color type not supported"), + }; + + if let Some(rep) = RepetitionStyle::from_str(&repetition) { + return Ok(CanvasPattern::new(self.global.root().r(), + image_data, + Size2D(image_size.width as i32, image_size.height as i32), + rep)); + } + return Err(Syntax); + }, + _ => return Err(Type("Not implemented".to_owned())), + } + } + // https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth fn LineWidth(self) -> f64 { let state = self.state.borrow(); diff --git a/components/script/dom/webidls/CanvasRenderingContext2D.webidl b/components/script/dom/webidls/CanvasRenderingContext2D.webidl index c8816864afb6..c1fa7dae4b7c 100644 --- a/components/script/dom/webidls/CanvasRenderingContext2D.webidl +++ b/components/script/dom/webidls/CanvasRenderingContext2D.webidl @@ -62,7 +62,8 @@ interface CanvasRenderingContext2D { CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1); [Throws] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1); - //CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); + [Throws] + CanvasPattern createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition); // shadows attribute unrestricted double shadowOffsetX; // (default 0) diff --git a/tests/wpt/metadata/2dcontext/compositing/2d.composite.globalAlpha.imagepattern.html.ini b/tests/wpt/metadata/2dcontext/compositing/2d.composite.globalAlpha.imagepattern.html.ini deleted file mode 100644 index 094e647afa7c..000000000000 --- a/tests/wpt/metadata/2dcontext/compositing/2d.composite.globalAlpha.imagepattern.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.composite.globalAlpha.imagepattern.html] - type: testharness - [Canvas test: 2d.composite.globalAlpha.imagepattern] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.copy.html.ini b/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.copy.html.ini deleted file mode 100644 index fdf4be2b6683..000000000000 --- a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.copy.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.composite.uncovered.pattern.copy.html] - type: testharness - [Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.html.ini b/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.html.ini deleted file mode 100644 index 79fa9c1554ea..000000000000 --- a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.destination-atop.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.composite.uncovered.pattern.destination-atop.html] - type: testharness - [Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.html.ini b/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.html.ini deleted file mode 100644 index d92d2b31fea8..000000000000 --- a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.destination-in.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.composite.uncovered.pattern.destination-in.html] - type: testharness - [Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.html.ini b/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.html.ini deleted file mode 100644 index d54001c7d2f5..000000000000 --- a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.source-in.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.composite.uncovered.pattern.source-in.html] - type: testharness - [Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.html.ini b/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.html.ini deleted file mode 100644 index d287645f0a7b..000000000000 --- a/tests/wpt/metadata/2dcontext/compositing/2d.composite.uncovered.pattern.source-out.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.composite.uncovered.pattern.source-out.html] - type: testharness - [Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged.] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.animated.gif.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.animated.gif.html.ini deleted file mode 100644 index 28d125b79fa0..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.animated.gif.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[2d.pattern.animated.gif.html] - type: testharness - expected: TIMEOUT - [createPattern() of an animated GIF draws the first frame] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.basic.image.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.basic.image.html.ini deleted file mode 100644 index 32c0cdc04d12..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.basic.image.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.basic.image.html] - type: testharness - [Canvas test: 2d.pattern.basic.image] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.basic.type.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.basic.type.html.ini deleted file mode 100644 index beeb24806134..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.basic.type.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.basic.type.html] - type: testharness - [Canvas test: 2d.pattern.basic.type] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.crosscanvas.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.crosscanvas.html.ini deleted file mode 100644 index 4f47854c3ba2..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.crosscanvas.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.crosscanvas.html] - type: testharness - [Canvas test: 2d.pattern.crosscanvas] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.image.broken.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.image.broken.html.ini deleted file mode 100644 index da8fad63e8bc..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.image.broken.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.image.broken.html] - type: testharness - [Canvas test: 2d.pattern.image.broken] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.modify.image1.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.modify.image1.html.ini deleted file mode 100644 index 498ccc84d731..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.modify.image1.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.modify.image1.html] - type: testharness - [Canvas test: 2d.pattern.modify.image1] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.modify.image2.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.modify.image2.html.ini deleted file mode 100644 index 1593930977d9..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.modify.image2.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.modify.image2.html] - type: testharness - [Canvas test: 2d.pattern.modify.image2] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html.ini deleted file mode 100644 index e7478d8bf688..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.norepeat.basic.html] - type: testharness - [Canvas test: 2d.pattern.paint.norepeat.basic] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html.ini deleted file mode 100644 index dd802a9aacb0..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.norepeat.coord1.html] - type: testharness - [Canvas test: 2d.pattern.paint.norepeat.coord1] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html.ini deleted file mode 100644 index fd5586ba7895..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.norepeat.coord2.html] - type: testharness - [Canvas test: 2d.pattern.paint.norepeat.coord2] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html.ini deleted file mode 100644 index 1f70fed95fc5..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.norepeat.outside.html] - type: testharness - [Canvas test: 2d.pattern.paint.norepeat.outside] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html.ini deleted file mode 100644 index 2d1fe7cd66cd..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.orientation.image.html] - type: testharness - [Image patterns do not get flipped when painted] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html.ini deleted file mode 100644 index 03575cb75dac..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeat.basic.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeat.basic] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html.ini deleted file mode 100644 index 25dc343f55d4..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeat.coord1.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeat.coord1] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html.ini deleted file mode 100644 index 81ed3170e631..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeat.coord2.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeat.coord2] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html.ini deleted file mode 100644 index 7e56d01152f9..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeat.coord3.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeat.coord3] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html.ini deleted file mode 100644 index 7c3f94f3efc8..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeat.outside.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeat.outside] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html.ini deleted file mode 100644 index 3026ff09ce1e..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeatx.basic.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeatx.basic] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html.ini deleted file mode 100644 index 25a8049f5772..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeatx.outside.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeatx.outside] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html.ini deleted file mode 100644 index f3437028238f..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeaty.basic.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeaty.basic] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html.ini b/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html.ini deleted file mode 100644 index 706dc9f16f0f..000000000000 --- a/tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.pattern.paint.repeaty.outside.html] - type: testharness - [Canvas test: 2d.pattern.paint.repeaty.outside] - expected: FAIL - diff --git a/tests/wpt/metadata/2dcontext/shadows/2d.shadow.pattern.transparent.1.html.ini b/tests/wpt/metadata/2dcontext/shadows/2d.shadow.pattern.transparent.1.html.ini deleted file mode 100644 index 11aba1fd214a..000000000000 --- a/tests/wpt/metadata/2dcontext/shadows/2d.shadow.pattern.transparent.1.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[2d.shadow.pattern.transparent.1.html] - type: testharness - [Shadows are not drawn for transparent fill patterns] - expected: FAIL - diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index daf3c5687aa3..7b64b3539a2d 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -6744,9 +6744,6 @@ [CanvasRenderingContext2D interface: attribute currentTransform] expected: FAIL - [CanvasRenderingContext2D interface: operation createPattern(CanvasImageSource,DOMString)] - expected: FAIL - [CanvasRenderingContext2D interface: operation drawSystemFocusRing(Element)] expected: FAIL @@ -6837,12 +6834,6 @@ [CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "fillStyle" with the proper type (17)] expected: FAIL - [CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "createPattern" with the proper type (20)] - expected: FAIL - - [CanvasRenderingContext2D interface: calling createPattern(CanvasImageSource,DOMString) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError] - expected: FAIL - [CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "drawSystemFocusRing" with the proper type (33)] expected: FAIL