Implement DOMMatrix2DInit for setTransform()/addPath()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 00:21:59 +0000 (00:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 00:21:59 +0000 (00:21 +0000)
commita933c823597e763386335f1b1b16763fbcdb4e55
treefafd74e6bfa68d32a5d57a3ef9db2941ba93d5d2
parenta7d63edf657a2e43c0ae7f62706d5aca6a1a4872
Implement DOMMatrix2DInit for setTransform()/addPath()
https://bugs.webkit.org/show_bug.cgi?id=176048

Patch by Sam Weinig <sam@webkit.org> on 2017-08-31
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/geometry-1/DOMMatrix-001.html:
* web-platform-tests/css/geometry-1/DOMMatrix-css-string.worker.js:
(string_appeared_here.forEach.constr.test):
* web-platform-tests/css/geometry-1/DOMMatrixInit-validate-fixup-expected.txt: Added.
* web-platform-tests/css/geometry-1/DOMMatrixInit-validate-fixup.html: Added.
* web-platform-tests/css/geometry-1/historical.html:
* web-platform-tests/css/geometry-1/interfaces-expected.txt: Added.
* web-platform-tests/css/geometry-1/interfaces.html: Added.
* web-platform-tests/css/geometry-1/interfaces.worker-expected.txt: Added.
* web-platform-tests/css/geometry-1/interfaces.worker.html: Added.
* web-platform-tests/css/geometry-1/interfaces.worker.js: Added.
* web-platform-tests/css/geometry-1/structured-serialization.html:
* web-platform-tests/css/geometry-1/w3c-import.log:

    Pull latest web-platform-tests/css/geometry-1/ and rebase the results.

Source/WebCore:

* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* CMakeLists.txt:

    Add new files.

* bindings/js/CallTracerTypes.h:
* inspector/InspectorCanvas.cpp:

    Swap out DOMMatrixInit for DOMMatrix2DInit in canvas tracing infrastructure.

* css/DOMMatrix2DInit.h: Added.
* css/DOMMatrix2DInit.idl: Added.
* css/DOMMatrixInit.h:
* css/DOMMatrixInit.idl:
Split DOMMatrixInit in two, with the 2D bits going into DOMMatrix2DInit.

* css/DOMMatrixReadOnly.cpp:
* css/DOMMatrixReadOnly.h:

    Add a validateAndFixup overload for DOMMatrix2DInit.

* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2D.h:

    Swap out DOMMatrixInit for DOMMatrix2DInit in setTransform. This
    should have no observable difference, since we ignored the 3D prior.

* html/canvas/DOMPath.cpp:
* html/canvas/DOMPath.h:
* html/canvas/DOMPath.idl:

    Update DOMPath (actually called Path2D) to take an optional DOMMatrix2DInit
    rather than an SVGMatrix. Passing an SVGMatrix is still valid, as it conforms
    as a DOMMatrix2DInit dictionary (having the necessary properties), so the
    risk of compatibility issues is minimal.

LayoutTests:

* fast/canvas/canvas-path-addPath-expected.txt:
* fast/canvas/canvas-path-addPath.html:
Update test / results now that the transform is for the path is an optional dictionary.
Mostly this means we throw a little less.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/canvas-path-addPath-expected.txt
LayoutTests/fast/canvas/canvas-path-addPath.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrix-001-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrix-001.html
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrix-css-string.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrix-css-string.worker.js
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrixInit-validate-fixup-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrixInit-validate-fixup.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/historical-expected.txt
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/historical.html
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/interfaces-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/interfaces.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/interfaces.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/interfaces.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/interfaces.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/structured-serialization.html
LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/w3c-import.log
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/CallTracerTypes.h
Source/WebCore/css/DOMMatrix2DInit.h [new file with mode: 0644]
Source/WebCore/css/DOMMatrix2DInit.idl [new file with mode: 0644]
Source/WebCore/css/DOMMatrixInit.h
Source/WebCore/css/DOMMatrixInit.idl
Source/WebCore/css/DOMMatrixReadOnly.cpp
Source/WebCore/css/DOMMatrixReadOnly.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/html/canvas/DOMPath.cpp
Source/WebCore/html/canvas/DOMPath.h
Source/WebCore/html/canvas/DOMPath.idl
Source/WebCore/inspector/InspectorCanvas.cpp