Add CanvasRenderingContext2D::getTransform
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 18:54:32 +0000 (18:54 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jul 2017 18:54:32 +0000 (18:54 +0000)
commit08692a261f4eb89fb52ae4a0f77aab2779613777
tree444ff9e35fae22fe5f7a8aeea7abd12fc85b13be
parent591aafe82907a9d5cdab96706c5ac4b391d4f1d6
Add CanvasRenderingContext2D::getTransform
https://bugs.webkit.org/show_bug.cgi?id=174278

Reviewed by Dean Jackson.

Source/WebCore:

Tests: fast/canvas/2d.getTransform.modification.html
       fast/canvas/2d.getTransform.newobject.html
       fast/canvas/2d.setTransform.matrix.html

* css/DOMMatrixReadOnly.h:
Make DOMMatrixReadOnly::validateAndFixup public so that values of DOMMatrixInit are still
usable without having to construct a DOMMatrixReadOnly. This is beneficial in the case that
an exception is thrown, as the validateAndFixup check can happen without any allocations.

* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getTransform):
(WebCore::CanvasRenderingContext2D::setTransform):

LayoutTests:

* canvas/philip/tests/2d.missingargs.html:
CanvasRenderingContext2D.prototype.setTransform no longer throws an error with no arguments.

* fast/canvas/2d.getTransform.modification-expected.txt: Added.
* fast/canvas/2d.getTransform.modification.html: Added.
* fast/canvas/2d.getTransform.newobject-expected.txt: Added.
* fast/canvas/2d.getTransform.newobject.html: Added.
* fast/canvas/2d.setTransform.matrix-expected.txt: Added.
* fast/canvas/2d.setTransform.matrix.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/canvas/philip/tests/2d.missingargs.html
LayoutTests/fast/canvas/2d.getTransform.modification-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/2d.getTransform.modification.html [new file with mode: 0644]
LayoutTests/fast/canvas/2d.getTransform.newobject-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/2d.getTransform.newobject.html [new file with mode: 0644]
LayoutTests/fast/canvas/2d.setTransform.matrix-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/2d.setTransform.matrix.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/DOMMatrixReadOnly.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl