Changeset 217767 in webkit


Ignore:
Timestamp:
Jun 4, 2017 8:21:52 AM (7 years ago)
Author:
Chris Dumez
Message:

Implement DOMMatrixReadOnly.transformPoint()
https://bugs.webkit.org/show_bug.cgi?id=172900

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/css/geometry-1/DOMMatrix-newobject-expected.txt:

Source/WebCore:

Implement DOMMatrixReadOnly.transformPoint():

Test: imported/blink/fast/dom/geometry-interfaces-dom-matrix-transformPoint.html

  • css/DOMMatrixReadOnly.cpp:

(WebCore::DOMMatrixReadOnly::transformPoint):

  • css/DOMMatrixReadOnly.h:
  • css/DOMMatrixReadOnly.idl:

LayoutTests:

  • imported/blink/fast/dom/geometry-interfaces-dom-matrix-transformPoint-expected.txt: Added.
  • imported/blink/fast/dom/geometry-interfaces-dom-matrix-transformPoint.html: Added.
  • imported/blink/fast/dom/resources/geometry-interfaces-test-helpers.js: Added.

Import test coverage from Blink.

Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r217766 r217767  
     12017-06-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Implement DOMMatrixReadOnly.transformPoint()
     4        https://bugs.webkit.org/show_bug.cgi?id=172900
     5
     6        Reviewed by Simon Fraser.
     7
     8        * imported/blink/fast/dom/geometry-interfaces-dom-matrix-transformPoint-expected.txt: Added.
     9        * imported/blink/fast/dom/geometry-interfaces-dom-matrix-transformPoint.html: Added.
     10        * imported/blink/fast/dom/resources/geometry-interfaces-test-helpers.js: Added.
     11        Import test coverage from Blink.
     12
    1132017-06-04  Zan Dobersek  <zdobersek@igalia.com>
    214
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r217764 r217767  
     12017-06-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Implement DOMMatrixReadOnly.transformPoint()
     4        https://bugs.webkit.org/show_bug.cgi?id=172900
     5
     6        Reviewed by Simon Fraser.
     7
     8        Rebaseline W3C test now that more checks are passing.
     9
     10        * web-platform-tests/css/geometry-1/DOMMatrix-newobject-expected.txt:
     11
    1122017-06-03  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/DOMMatrix-newobject-expected.txt

    r217764 r217767  
    1212PASS DOMMatrix flipY
    1313PASS DOMMatrix inverse
    14 FAIL DOMMatrix transformPoint matrix[method] is not a function. (In 'matrix[method]()', 'matrix[method]' is undefined)
     14PASS DOMMatrix transformPoint
    1515PASS DOMMatrix toFloat32Array
    1616PASS DOMMatrix toFloat64Array
     
    2727PASS DOMMatrixReadOnly flipY
    2828PASS DOMMatrixReadOnly inverse
    29 FAIL DOMMatrixReadOnly transformPoint matrix[method] is not a function. (In 'matrix[method]()', 'matrix[method]' is undefined)
     29PASS DOMMatrixReadOnly transformPoint
    3030PASS DOMMatrixReadOnly toFloat32Array
    3131PASS DOMMatrixReadOnly toFloat64Array
  • trunk/Source/WebCore/ChangeLog

    r217765 r217767  
     12017-06-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Implement DOMMatrixReadOnly.transformPoint()
     4        https://bugs.webkit.org/show_bug.cgi?id=172900
     5
     6        Reviewed by Simon Fraser.
     7
     8        Implement DOMMatrixReadOnly.transformPoint():
     9        - https://drafts.fxtf.org/geometry/#dommatrixreadonly
     10        - https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-transformpoint
     11
     12        Test: imported/blink/fast/dom/geometry-interfaces-dom-matrix-transformPoint.html
     13
     14        * css/DOMMatrixReadOnly.cpp:
     15        (WebCore::DOMMatrixReadOnly::transformPoint):
     16        * css/DOMMatrixReadOnly.h:
     17        * css/DOMMatrixReadOnly.idl:
     18
    1192017-06-04  Zan Dobersek  <zdobersek@igalia.com>
    220
  • trunk/Source/WebCore/css/DOMMatrixReadOnly.cpp

    r217764 r217767  
    3030#include "CSSToLengthConversionData.h"
    3131#include "DOMMatrix.h"
     32#include "DOMPoint.h"
    3233#include "ExceptionCode.h"
    3334#include "StyleProperties.h"
     
    286287}
    287288
     289// https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-transformpoint
     290Ref<DOMPoint> DOMMatrixReadOnly::transformPoint(DOMPointInit&& pointInit)
     291{
     292    m_matrix.map4ComponentPoint(pointInit.x, pointInit.y, pointInit.z, pointInit.w);
     293    return DOMPoint::create(pointInit.x, pointInit.y, pointInit.z, pointInit.w);
     294}
     295
    288296ExceptionOr<Ref<Float32Array>> DOMMatrixReadOnly::toFloat32Array() const
    289297{
  • trunk/Source/WebCore/css/DOMMatrixReadOnly.h

    r217764 r217767  
    4040
    4141class DOMMatrix;
     42class DOMPoint;
     43struct DOMPointInit;
    4244
    4345class DOMMatrixReadOnly : public ScriptWrappable, public RefCounted<DOMMatrixReadOnly> {
     
    112114    Ref<DOMMatrix> inverse() const;
    113115
     116    Ref<DOMPoint> transformPoint(DOMPointInit&&);
     117
    114118    ExceptionOr<Ref<Float32Array>> toFloat32Array() const;
    115119    ExceptionOr<Ref<Float64Array>> toFloat64Array() const;
  • trunk/Source/WebCore/css/DOMMatrixReadOnly.idl

    r217764 r217767  
    9393    [NewObject] DOMMatrix inverse();
    9494
    95     // [NewObject] DOMPoint transformPoint(optional DOMPointInit point); // FIXME: Implement this.
     95    [NewObject] DOMPoint transformPoint(optional DOMPointInit point);
    9696    [MayThrowException] Float32Array toFloat32Array();
    9797    [MayThrowException] Float64Array toFloat64Array();
Note: See TracChangeset for help on using the changeset viewer.