mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibWeb: Implement CanvasRenderingContext2D.drawImage() closer to spec
Also add support for HTMLCanvasElement for the image parameter, leading to replacing HTMLImageElement with the CanvasImageSource Variant type. Also stub out the 'check the usability of the image argument' and 'is not origin-clean' operations, while taking into consideration that these can throw (and require DOM::ExceptionOr).
This commit is contained in:
parent
ed03f37ae9
commit
3f3326f1dc
3 changed files with 118 additions and 10 deletions
|
@ -30,7 +30,7 @@ interface CanvasRenderingContext2D {
|
|||
undefined fillText(DOMString text, double x, double y, optional double maxWidth);
|
||||
undefined strokeText(DOMString text, double x, double y, optional double maxWidth);
|
||||
|
||||
undefined drawImage(HTMLImageElement image, double dx, double dy);
|
||||
undefined drawImage((HTMLImageElement or HTMLCanvasElement) image, double dx, double dy);
|
||||
|
||||
attribute DOMString fillStyle;
|
||||
attribute DOMString strokeStyle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue