LibWeb/Canvas: Stub missing includes for CanvasRenderingContext2D

This commit is contained in:
Jamie Mansfield 2024-08-17 01:09:11 +01:00 committed by Andreas Kling
parent 3edd22143d
commit b0fd4aff1a
Notes: github-actions[bot] 2024-08-19 07:05:45 +00:00
4 changed files with 35 additions and 3 deletions

View file

@ -0,0 +1,5 @@
// https://html.spec.whatwg.org/multipage/canvas.html#canvasfilters
interface mixin CanvasFilters {
// filters
[FIXME] attribute DOMString filter; // (default "none")
};

View file

@ -0,0 +1,8 @@
// https://html.spec.whatwg.org/multipage/canvas.html#canvasshadowstyles
interface mixin CanvasShadowStyles {
// shadows
[FIXME] attribute unrestricted double shadowOffsetX; // (default 0)
[FIXME] attribute unrestricted double shadowOffsetY; // (default 0)
[FIXME] attribute unrestricted double shadowBlur; // (default 0)
[FIXME] attribute DOMString shadowColor; // (default transparent black)
};

View file

@ -0,0 +1,5 @@
// https://html.spec.whatwg.org/multipage/canvas.html#canvasuserinterface
interface mixin CanvasUserInterface {
[FIXME] undefined drawFocusIfNeeded(Element element);
[FIXME] undefined drawFocusIfNeeded(Path2D path, Element element);
};

View file

@ -3,15 +3,27 @@
#import <HTML/Canvas/CanvasDrawImage.idl>
#import <HTML/Canvas/CanvasDrawPath.idl>
#import <HTML/Canvas/CanvasFillStrokeStyles.idl>
#import <HTML/Canvas/CanvasFilters.idl>
#import <HTML/Canvas/CanvasImageData.idl>
#import <HTML/Canvas/CanvasImageSmoothing.idl>
#import <HTML/Canvas/CanvasPath.idl>
#import <HTML/Canvas/CanvasPathDrawingStyles.idl>
#import <HTML/Canvas/CanvasTextDrawingStyles.idl>
#import <HTML/Canvas/CanvasRect.idl>
#import <HTML/Canvas/CanvasShadowStyles.idl>
#import <HTML/Canvas/CanvasState.idl>
#import <HTML/Canvas/CanvasText.idl>
#import <HTML/Canvas/CanvasTransform.idl>
#import <HTML/Canvas/CanvasUserInterface.idl>
enum PredefinedColorSpace { "srgb", "display-p3" };
dictionary CanvasRenderingContext2DSettings {
boolean alpha = true;
boolean desynchronized = false;
PredefinedColorSpace colorSpace = "srgb";
boolean willReadFrequently = false;
};
enum ImageSmoothingQuality { "low", "medium", "high" };
@ -23,6 +35,8 @@ enum CanvasTextBaseline { "top", "hanging", "middle", "alphabetic", "ideographic
[Exposed=Window]
interface CanvasRenderingContext2D {
[ImplementedAs=canvas_for_binding] readonly attribute HTMLCanvasElement canvas;
[FIXME] CanvasRenderingContext2DSettings getContextAttributes();
};
CanvasRenderingContext2D includes CanvasState;
@ -30,11 +44,11 @@ CanvasRenderingContext2D includes CanvasTransform;
CanvasRenderingContext2D includes CanvasCompositing;
CanvasRenderingContext2D includes CanvasImageSmoothing;
CanvasRenderingContext2D includes CanvasFillStrokeStyles;
// FIXME: CanvasRenderingContext2D includes CanvasShadowStyles;
// FIXME: CanvasRenderingContext2D includes CanvasFilters;
CanvasRenderingContext2D includes CanvasShadowStyles;
CanvasRenderingContext2D includes CanvasFilters;
CanvasRenderingContext2D includes CanvasRect;
CanvasRenderingContext2D includes CanvasDrawPath;
// FIXME: CanvasRenderingContext2D includes CanvasUserInterface;
CanvasRenderingContext2D includes CanvasUserInterface;
CanvasRenderingContext2D includes CanvasText;
CanvasRenderingContext2D includes CanvasDrawImage;
CanvasRenderingContext2D includes CanvasImageData;