Changeset 50561 in webkit


Ignore:
Timestamp:
Nov 5, 2009 7:28:37 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-05 Jeff Schiller <codedread@gmail.com>

Reviewed by Simon Fraser.

Added test to ensure proper order of matrix multiplication with SVGMatrix.
https://bugs.webkit.org/show_bug.cgi?id=16062

  • svg/dom/SVGMatrix-interface-expected.txt: Added.
  • svg/dom/SVGMatrix-interface.xhtml: Added.

2009-11-05 Jeff Schiller <codedread@gmail.com>

Reviewed by Simon Fraser.

Correct order of matrix multiplication for SVGMatrix.
https://bugs.webkit.org/show_bug.cgi?id=16062

Test: svg/dom/SVGMatrix-interface.xhtml

  • bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::multiply):
  • svg/SVGMatrix.idl:
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r50542 r50561  
     12009-11-05  Jeff Schiller  <codedread@gmail.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Added test to ensure proper order of matrix multiplication with SVGMatrix.
     6        https://bugs.webkit.org/show_bug.cgi?id=16062
     7
     8        * svg/dom/SVGMatrix-interface-expected.txt: Added.
     9        * svg/dom/SVGMatrix-interface.xhtml: Added.
     10
    1112009-11-03  Justin Garcia  <justin.garcia@apple.com>
    212
  • trunk/WebCore/ChangeLog

    r50560 r50561  
     12009-11-05  Jeff Schiller  <codedread@gmail.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Correct order of matrix multiplication for SVGMatrix.
     6        https://bugs.webkit.org/show_bug.cgi?id=16062
     7
     8        Test: svg/dom/SVGMatrix-interface.xhtml
     9
     10        * bindings/js/JSSVGMatrixCustom.cpp:
     11        (WebCore::JSSVGMatrix::multiply):
     12        * svg/SVGMatrix.idl:
     13
    1142009-11-04  Pavel Feldman  <pfeldman@chromium.org>
    215
  • trunk/WebCore/bindings/js/JSSVGMatrixCustom.cpp

    r46346 r50561  
    11/*
    22 * Copyright (C) 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
     3 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
    34 *
    45 * This library is free software; you can redistribute it and/or
     
    2526#include "TransformationMatrix.h"
    2627#include "SVGException.h"
     28#include <runtime/Error.h>
    2729
    2830using namespace JSC;
    2931
    3032namespace WebCore {
     33
     34JSValue JSSVGMatrix::multiply(ExecState* exec, const ArgList& args)
     35{
     36    if (args.size() < 1)
     37        return throwError(exec, SyntaxError, "Not enough arguments");
     38
     39    if (!args.at(0).inherits(&JSSVGMatrix::s_info))
     40        return throwError(exec, TypeError, "secondMatrix argument was not a SVGMatrix");
     41
     42    JSSVGMatrix* matrixObj = static_cast<JSSVGMatrix*>(asObject(args.at(0)));
     43
     44    TransformationMatrix m1(*impl());
     45    TransformationMatrix m2(*(matrixObj->impl()));
     46
     47    JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)).get(), m_context.get());
     48
     49    return result;
     50}
    3151
    3252JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&)
  • trunk/WebCore/svg/SVGMatrix.idl

    r40265 r50561  
    3535        attribute double f;
    3636
    37         [Immutable] SVGMatrix multiply(in SVGMatrix secondMatrix);
     37        [Custom] SVGMatrix multiply(in SVGMatrix secondMatrix);
    3838        [Custom] SVGMatrix inverse()
    3939            raises(SVGException);
Note: See TracChangeset for help on using the changeset viewer.