haikuwebkit/LayoutTests/svg/dom/SVGTransform-expected.txt

130 lines
5.5 KiB
Plaintext
Raw Permalink Normal View History

2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
This test checks the SVGTransform API
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Check initial transform values
PASS transform.type is SVGTransform.SVG_TRANSFORM_MATRIX
PASS transform.angle is 0
PASS transform.matrix.a is 1
PASS transform.matrix.b is 0
PASS transform.matrix.c is 0
PASS transform.matrix.d is 1
PASS transform.matrix.e is 0
PASS transform.matrix.f is 0
Change to skewX transformation
PASS transform.setSkewX(45) is undefined.
PASS transform.type is SVGTransform.SVG_TRANSFORM_SKEWX
PASS transform.angle is 45
PASS transform.matrix.a is 1
PASS transform.matrix.b is 0
PASS transform.matrix.c.toFixed(1) is "1.0"
PASS transform.matrix.d is 1
PASS transform.matrix.e is 0
PASS transform.matrix.f is 0
Changing matrix.e to 100, should reset transformation type to MATRIX, and angle should be 0
PASS transform.matrix.e = 100 is 100
PASS transform.type is SVGTransform.SVG_TRANSFORM_MATRIX
PASS transform.angle is 0
PASS transform.matrix.a is 1
PASS transform.matrix.b is 0
PASS transform.matrix.c.toFixed(1) is "1.0"
PASS transform.matrix.d is 1
PASS transform.matrix.e is 100
PASS transform.matrix.f is 0
Now revert to initial matrix
PASS transform.matrix.c = null is null
PASS transform.matrix.e = 0 is 0
PASS transform.type is SVGTransform.SVG_TRANSFORM_MATRIX
PASS transform.angle is 0
PASS transform.matrix.a is 1
PASS transform.matrix.b is 0
PASS transform.matrix.c is 0
PASS transform.matrix.d is 1
PASS transform.matrix.e is 0
PASS transform.matrix.f is 0
Check passing invalid arguments to 'setMatrix'
PASS transform.setMatrix('aString') threw exception TypeError: Type error.
PASS transform.setMatrix(1) threw exception TypeError: Type error.
PASS transform.setMatrix(false) threw exception TypeError: Type error.
Check passing abritary objects, nothing or dictionaries
PASS transform.setMatrix(transform) is undefined.
PASS transform.setMatrix(svgElement) is undefined.
PASS transform.setMatrix({a: 2, b: 0, c: 0, d: 2, e: 10, f: 10}) is undefined.
PASS transform.matrix.a is 2
PASS transform.matrix.b is 0
PASS transform.matrix.c is 0
PASS transform.matrix.d is 2
PASS transform.matrix.e is 10
PASS transform.matrix.f is 10
PASS transform.setMatrix() is undefined.
PASS transform.matrix.a is 1
PASS transform.matrix.b is 0
PASS transform.matrix.c is 0
PASS transform.matrix.d is 1
PASS transform.matrix.e is 0
PASS transform.matrix.f is 0
2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
Check passing invalid arguments to 'setTranslate'
2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: * fast/canvas/canvas-overloads-fillText-expected.txt: * fast/canvas/canvas-overloads-strokeText-expected.txt: * fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js: * fast/canvas/script-tests/canvas-overloads-fillText.js: * fast/canvas/script-tests/canvas-overloads-strokeText.js: * fast/canvas/webgl/data-view-test-expected.txt: * http/tests/xmlhttprequest/exceptions-expected.txt: * platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGColor-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGLengthList-basics-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumberList-basics-expected.txt: * svg/dom/SVGPaint-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPointList-basics-expected.txt: * svg/dom/SVGStringList-basics-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/SVGTransformList-basics-expected.txt: * svg/dom/SVGTransformList-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): Canonical link: https://commits.webkit.org/78630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-06-20 23:54:07 +00:00
PASS transform.setTranslate() threw exception TypeError: Not enough arguments.
PASS transform.setTranslate(transform) threw exception TypeError: Not enough arguments.
PASS transform.setTranslate(svgElement) threw exception TypeError: Not enough arguments.
PASS transform.setTranslate('aString') threw exception TypeError: Not enough arguments.
2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Recent SVG-related changes to the StrictTypeChecking extended attribute in CodeGeneratorJS.pm and CodeGeneratorV8.pm were not correct according to the Web IDL and ECMA-262 specifications. In particular, when an attribute or function argument is specified as a number type (floating-point or integer), passing in a String or object is not supposed to raise an exception. The original intent of the StrictTypeChecking extended attribute was to properly raise TypeError when an interface type is required, but the supplied object does not implement the interface type (http://dev.w3.org/2006/webapi/WebIDL/#es-interface). Historically WebKit has silently passed null to the C++ bindings in this case. The handling of strings in the original StrictTypeChecking implementation was also incorrect, raising exceptions when it should not. The semantics of StrictTypeChecking have been changed to enforce only the restrictions on interface types. The V8 custom bindings for WebGL have been updated to match the behavior of the autogenerated code. Test: fast/canvas/webgl/type-conversion-test.html * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::vertexAttribAndUniformHelperf): 2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Updated SVG tests which were incorrectly expecting exceptions to be raised when the Web IDL and ECMA-262 specifications state that none should be. Incorporated WebGL test from Khronos repository verifying the passing objects of various types to APIs. Ran all layout tests in Safari on Mac OS X. * fast/canvas/webgl/type-conversion-test-expected.txt: Added. * fast/canvas/webgl/type-conversion-test.html: Added. * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGAnimatedBoolean-expected.txt: * svg/dom/SVGAnimatedEnumeration-expected.txt: * svg/dom/SVGAnimatedInteger-expected.txt: * svg/dom/SVGAnimatedNumber-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumber-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPreserveAspectRatio-expected.txt: * svg/dom/SVGRect-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/script-tests/SVGAngle.js: * svg/dom/script-tests/SVGAnimatedBoolean.js: * svg/dom/script-tests/SVGAnimatedEnumeration.js: * svg/dom/script-tests/SVGAnimatedInteger.js: * svg/dom/script-tests/SVGAnimatedNumber.js: * svg/dom/script-tests/SVGLength.js: * svg/dom/script-tests/SVGMatrix.js: * svg/dom/script-tests/SVGNumber.js: * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGPreserveAspectRatio.js: * svg/dom/script-tests/SVGRect.js: * svg/dom/script-tests/SVGTransform.js: Canonical link: https://commits.webkit.org/62591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-16 19:19:17 +00:00
PASS transform.setTranslate(1, transform) is undefined.
PASS transform.setTranslate(1, svgElement) is undefined.
PASS transform.setTranslate(1, 'aString') is undefined.
PASS transform.setTranslate(transform, 1) is undefined.
PASS transform.setTranslate(svgElement, 1) is undefined.
PASS transform.setTranslate('aString', 1) is undefined.
PASS transform.setTranslate(transform, transform) is undefined.
PASS transform.setTranslate(svgElement, svgElement) is undefined.
PASS transform.setTranslate('aString', 'aString') is undefined.
2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
Check passing invalid arguments to 'setScale'
2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: * fast/canvas/canvas-overloads-fillText-expected.txt: * fast/canvas/canvas-overloads-strokeText-expected.txt: * fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js: * fast/canvas/script-tests/canvas-overloads-fillText.js: * fast/canvas/script-tests/canvas-overloads-strokeText.js: * fast/canvas/webgl/data-view-test-expected.txt: * http/tests/xmlhttprequest/exceptions-expected.txt: * platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGColor-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGLengthList-basics-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumberList-basics-expected.txt: * svg/dom/SVGPaint-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPointList-basics-expected.txt: * svg/dom/SVGStringList-basics-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/SVGTransformList-basics-expected.txt: * svg/dom/SVGTransformList-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): Canonical link: https://commits.webkit.org/78630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-06-20 23:54:07 +00:00
PASS transform.setScale() threw exception TypeError: Not enough arguments.
PASS transform.setScale(transform) threw exception TypeError: Not enough arguments.
PASS transform.setScale(svgElement) threw exception TypeError: Not enough arguments.
PASS transform.setScale('aString') threw exception TypeError: Not enough arguments.
2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Recent SVG-related changes to the StrictTypeChecking extended attribute in CodeGeneratorJS.pm and CodeGeneratorV8.pm were not correct according to the Web IDL and ECMA-262 specifications. In particular, when an attribute or function argument is specified as a number type (floating-point or integer), passing in a String or object is not supposed to raise an exception. The original intent of the StrictTypeChecking extended attribute was to properly raise TypeError when an interface type is required, but the supplied object does not implement the interface type (http://dev.w3.org/2006/webapi/WebIDL/#es-interface). Historically WebKit has silently passed null to the C++ bindings in this case. The handling of strings in the original StrictTypeChecking implementation was also incorrect, raising exceptions when it should not. The semantics of StrictTypeChecking have been changed to enforce only the restrictions on interface types. The V8 custom bindings for WebGL have been updated to match the behavior of the autogenerated code. Test: fast/canvas/webgl/type-conversion-test.html * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::vertexAttribAndUniformHelperf): 2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Updated SVG tests which were incorrectly expecting exceptions to be raised when the Web IDL and ECMA-262 specifications state that none should be. Incorporated WebGL test from Khronos repository verifying the passing objects of various types to APIs. Ran all layout tests in Safari on Mac OS X. * fast/canvas/webgl/type-conversion-test-expected.txt: Added. * fast/canvas/webgl/type-conversion-test.html: Added. * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGAnimatedBoolean-expected.txt: * svg/dom/SVGAnimatedEnumeration-expected.txt: * svg/dom/SVGAnimatedInteger-expected.txt: * svg/dom/SVGAnimatedNumber-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumber-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPreserveAspectRatio-expected.txt: * svg/dom/SVGRect-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/script-tests/SVGAngle.js: * svg/dom/script-tests/SVGAnimatedBoolean.js: * svg/dom/script-tests/SVGAnimatedEnumeration.js: * svg/dom/script-tests/SVGAnimatedInteger.js: * svg/dom/script-tests/SVGAnimatedNumber.js: * svg/dom/script-tests/SVGLength.js: * svg/dom/script-tests/SVGMatrix.js: * svg/dom/script-tests/SVGNumber.js: * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGPreserveAspectRatio.js: * svg/dom/script-tests/SVGRect.js: * svg/dom/script-tests/SVGTransform.js: Canonical link: https://commits.webkit.org/62591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-16 19:19:17 +00:00
PASS transform.setScale(1, transform) is undefined.
PASS transform.setScale(1, svgElement) is undefined.
PASS transform.setScale(1, 'aString') is undefined.
PASS transform.setScale(transform, 1) is undefined.
PASS transform.setScale(svgElement, 1) is undefined.
PASS transform.setScale('aString', 1) is undefined.
PASS transform.setScale(transform, transform) is undefined.
PASS transform.setScale(svgElement, svgElement) is undefined.
PASS transform.setScale('aString', 'aString') is undefined.
2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
Check passing invalid arguments to 'setRotate'
2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: * fast/canvas/canvas-overloads-fillText-expected.txt: * fast/canvas/canvas-overloads-strokeText-expected.txt: * fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js: * fast/canvas/script-tests/canvas-overloads-fillText.js: * fast/canvas/script-tests/canvas-overloads-strokeText.js: * fast/canvas/webgl/data-view-test-expected.txt: * http/tests/xmlhttprequest/exceptions-expected.txt: * platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGColor-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGLengthList-basics-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumberList-basics-expected.txt: * svg/dom/SVGPaint-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPointList-basics-expected.txt: * svg/dom/SVGStringList-basics-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/SVGTransformList-basics-expected.txt: * svg/dom/SVGTransformList-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): Canonical link: https://commits.webkit.org/78630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-06-20 23:54:07 +00:00
PASS transform.setRotate() threw exception TypeError: Not enough arguments.
PASS transform.setRotate(transform) threw exception TypeError: Not enough arguments.
PASS transform.setRotate(svgElement) threw exception TypeError: Not enough arguments.
PASS transform.setRotate('aString') threw exception TypeError: Not enough arguments.
PASS transform.setRotate(1, transform) threw exception TypeError: Not enough arguments.
PASS transform.setRotate(1, svgElement) threw exception TypeError: Not enough arguments.
PASS transform.setRotate(1, 'aString') threw exception TypeError: Not enough arguments.
2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Recent SVG-related changes to the StrictTypeChecking extended attribute in CodeGeneratorJS.pm and CodeGeneratorV8.pm were not correct according to the Web IDL and ECMA-262 specifications. In particular, when an attribute or function argument is specified as a number type (floating-point or integer), passing in a String or object is not supposed to raise an exception. The original intent of the StrictTypeChecking extended attribute was to properly raise TypeError when an interface type is required, but the supplied object does not implement the interface type (http://dev.w3.org/2006/webapi/WebIDL/#es-interface). Historically WebKit has silently passed null to the C++ bindings in this case. The handling of strings in the original StrictTypeChecking implementation was also incorrect, raising exceptions when it should not. The semantics of StrictTypeChecking have been changed to enforce only the restrictions on interface types. The V8 custom bindings for WebGL have been updated to match the behavior of the autogenerated code. Test: fast/canvas/webgl/type-conversion-test.html * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::vertexAttribAndUniformHelperf): 2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Updated SVG tests which were incorrectly expecting exceptions to be raised when the Web IDL and ECMA-262 specifications state that none should be. Incorporated WebGL test from Khronos repository verifying the passing objects of various types to APIs. Ran all layout tests in Safari on Mac OS X. * fast/canvas/webgl/type-conversion-test-expected.txt: Added. * fast/canvas/webgl/type-conversion-test.html: Added. * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGAnimatedBoolean-expected.txt: * svg/dom/SVGAnimatedEnumeration-expected.txt: * svg/dom/SVGAnimatedInteger-expected.txt: * svg/dom/SVGAnimatedNumber-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumber-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPreserveAspectRatio-expected.txt: * svg/dom/SVGRect-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/script-tests/SVGAngle.js: * svg/dom/script-tests/SVGAnimatedBoolean.js: * svg/dom/script-tests/SVGAnimatedEnumeration.js: * svg/dom/script-tests/SVGAnimatedInteger.js: * svg/dom/script-tests/SVGAnimatedNumber.js: * svg/dom/script-tests/SVGLength.js: * svg/dom/script-tests/SVGMatrix.js: * svg/dom/script-tests/SVGNumber.js: * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGPreserveAspectRatio.js: * svg/dom/script-tests/SVGRect.js: * svg/dom/script-tests/SVGTransform.js: Canonical link: https://commits.webkit.org/62591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-16 19:19:17 +00:00
PASS transform.setRotate(1, 1, transform) is undefined.
PASS transform.setRotate(1, 1, svgElement) is undefined.
PASS transform.setRotate(1, 1, 'aString') is undefined.
2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
Check passing invalid arguments to 'setSkewX'
2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: * fast/canvas/canvas-overloads-fillText-expected.txt: * fast/canvas/canvas-overloads-strokeText-expected.txt: * fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js: * fast/canvas/script-tests/canvas-overloads-fillText.js: * fast/canvas/script-tests/canvas-overloads-strokeText.js: * fast/canvas/webgl/data-view-test-expected.txt: * http/tests/xmlhttprequest/exceptions-expected.txt: * platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGColor-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGLengthList-basics-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumberList-basics-expected.txt: * svg/dom/SVGPaint-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPointList-basics-expected.txt: * svg/dom/SVGStringList-basics-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/SVGTransformList-basics-expected.txt: * svg/dom/SVGTransformList-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): Canonical link: https://commits.webkit.org/78630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-06-20 23:54:07 +00:00
PASS transform.setSkewX() threw exception TypeError: Not enough arguments.
2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Recent SVG-related changes to the StrictTypeChecking extended attribute in CodeGeneratorJS.pm and CodeGeneratorV8.pm were not correct according to the Web IDL and ECMA-262 specifications. In particular, when an attribute or function argument is specified as a number type (floating-point or integer), passing in a String or object is not supposed to raise an exception. The original intent of the StrictTypeChecking extended attribute was to properly raise TypeError when an interface type is required, but the supplied object does not implement the interface type (http://dev.w3.org/2006/webapi/WebIDL/#es-interface). Historically WebKit has silently passed null to the C++ bindings in this case. The handling of strings in the original StrictTypeChecking implementation was also incorrect, raising exceptions when it should not. The semantics of StrictTypeChecking have been changed to enforce only the restrictions on interface types. The V8 custom bindings for WebGL have been updated to match the behavior of the autogenerated code. Test: fast/canvas/webgl/type-conversion-test.html * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::vertexAttribAndUniformHelperf): 2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Updated SVG tests which were incorrectly expecting exceptions to be raised when the Web IDL and ECMA-262 specifications state that none should be. Incorporated WebGL test from Khronos repository verifying the passing objects of various types to APIs. Ran all layout tests in Safari on Mac OS X. * fast/canvas/webgl/type-conversion-test-expected.txt: Added. * fast/canvas/webgl/type-conversion-test.html: Added. * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGAnimatedBoolean-expected.txt: * svg/dom/SVGAnimatedEnumeration-expected.txt: * svg/dom/SVGAnimatedInteger-expected.txt: * svg/dom/SVGAnimatedNumber-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumber-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPreserveAspectRatio-expected.txt: * svg/dom/SVGRect-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/script-tests/SVGAngle.js: * svg/dom/script-tests/SVGAnimatedBoolean.js: * svg/dom/script-tests/SVGAnimatedEnumeration.js: * svg/dom/script-tests/SVGAnimatedInteger.js: * svg/dom/script-tests/SVGAnimatedNumber.js: * svg/dom/script-tests/SVGLength.js: * svg/dom/script-tests/SVGMatrix.js: * svg/dom/script-tests/SVGNumber.js: * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGPreserveAspectRatio.js: * svg/dom/script-tests/SVGRect.js: * svg/dom/script-tests/SVGTransform.js: Canonical link: https://commits.webkit.org/62591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-16 19:19:17 +00:00
PASS transform.setSkewX(transform) is undefined.
PASS transform.setSkewX(svgElement) is undefined.
PASS transform.setSkewX('aString') is undefined.
2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
Check passing invalid arguments to 'setSkewY'
2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * fast/canvas/canvas-overloads-drawImageFromRect-expected.txt: * fast/canvas/canvas-overloads-fillText-expected.txt: * fast/canvas/canvas-overloads-strokeText-expected.txt: * fast/canvas/script-tests/canvas-overloads-drawImageFromRect.js: * fast/canvas/script-tests/canvas-overloads-fillText.js: * fast/canvas/script-tests/canvas-overloads-strokeText.js: * fast/canvas/webgl/data-view-test-expected.txt: * http/tests/xmlhttprequest/exceptions-expected.txt: * platform/chromium-mac/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * platform/chromium-win/svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGColor-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGLengthList-basics-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumberList-basics-expected.txt: * svg/dom/SVGPaint-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPointList-basics-expected.txt: * svg/dom/SVGStringList-basics-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/SVGTransformList-basics-expected.txt: * svg/dom/SVGTransformList-expected.txt: * svg/dom/svgpath-out-of-bounds-getPathSeg-expected.txt: 2011-06-20 Mark Pilgrim <pilgrim@chromium.org> Reviewed by Adam Barth. IDL generator should throw TypeError instead of SyntaxError on not enough arguments https://bugs.webkit.org/show_bug.cgi?id=63011 To align with WebIDL, we should throw TypeError whenever a function is called with missing required arguments. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): Canonical link: https://commits.webkit.org/78630@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-06-20 23:54:07 +00:00
PASS transform.setSkewY() threw exception TypeError: Not enough arguments.
2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Recent SVG-related changes to the StrictTypeChecking extended attribute in CodeGeneratorJS.pm and CodeGeneratorV8.pm were not correct according to the Web IDL and ECMA-262 specifications. In particular, when an attribute or function argument is specified as a number type (floating-point or integer), passing in a String or object is not supposed to raise an exception. The original intent of the StrictTypeChecking extended attribute was to properly raise TypeError when an interface type is required, but the supplied object does not implement the interface type (http://dev.w3.org/2006/webapi/WebIDL/#es-interface). Historically WebKit has silently passed null to the C++ bindings in this case. The handling of strings in the original StrictTypeChecking implementation was also incorrect, raising exceptions when it should not. The semantics of StrictTypeChecking have been changed to enforce only the restrictions on interface types. The V8 custom bindings for WebGL have been updated to match the behavior of the autogenerated code. Test: fast/canvas/webgl/type-conversion-test.html * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::getObjectParameter): (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback): (WebCore::V8WebGLRenderingContext::getParameterCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::vertexAttribAndUniformHelperf): 2010-11-16 Kenneth Russell <kbr@google.com> Reviewed by Dimitri Glazkov. WebIDL conversions from string to number and array to number should not generate TypeError https://bugs.webkit.org/show_bug.cgi?id=49218 Updated SVG tests which were incorrectly expecting exceptions to be raised when the Web IDL and ECMA-262 specifications state that none should be. Incorporated WebGL test from Khronos repository verifying the passing objects of various types to APIs. Ran all layout tests in Safari on Mac OS X. * fast/canvas/webgl/type-conversion-test-expected.txt: Added. * fast/canvas/webgl/type-conversion-test.html: Added. * svg/dom/SVGAngle-expected.txt: * svg/dom/SVGAnimatedBoolean-expected.txt: * svg/dom/SVGAnimatedEnumeration-expected.txt: * svg/dom/SVGAnimatedInteger-expected.txt: * svg/dom/SVGAnimatedNumber-expected.txt: * svg/dom/SVGLength-expected.txt: * svg/dom/SVGMatrix-expected.txt: * svg/dom/SVGNumber-expected.txt: * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGPreserveAspectRatio-expected.txt: * svg/dom/SVGRect-expected.txt: * svg/dom/SVGTransform-expected.txt: * svg/dom/script-tests/SVGAngle.js: * svg/dom/script-tests/SVGAnimatedBoolean.js: * svg/dom/script-tests/SVGAnimatedEnumeration.js: * svg/dom/script-tests/SVGAnimatedInteger.js: * svg/dom/script-tests/SVGAnimatedNumber.js: * svg/dom/script-tests/SVGLength.js: * svg/dom/script-tests/SVGMatrix.js: * svg/dom/script-tests/SVGNumber.js: * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGPreserveAspectRatio.js: * svg/dom/script-tests/SVGRect.js: * svg/dom/script-tests/SVGTransform.js: Canonical link: https://commits.webkit.org/62591@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-16 19:19:17 +00:00
PASS transform.setSkewY(transform) is undefined.
PASS transform.setSkewY(svgElement) is undefined.
PASS transform.setSkewY('aString') is undefined.
2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept. Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now. Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg svg/W3C-SVG-1.1-SE/types-dom-01-b.svg svg/W3C-SVG-1.1-SE/types-dom-02-f.svg svg/W3C-SVG-1.1-SE/types-dom-03-b.svg svg/W3C-SVG-1.1-SE/types-dom-04-b.svg svg/W3C-SVG-1.1-SE/types-dom-05-b.svg svg/dom/SVGMatrix.html svg/dom/SVGTransform.html svg/dom/SVGTransformList.html * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp. * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp. * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp * bindings/js/JSSVGMatrixCustom.cpp: Removed. * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept. * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed. * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling. * svg/DeprecatedSVGAnimatedTemplate.h: Ditto. * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes. (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimatedTransformList.h: Added. * svg/SVGGradientElement.cpp: Ditto. (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::parseMappedAttribute): * svg/SVGGradientElement.h: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements. (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix. (WebCore::SVGMatrix::scale): Ditto. (WebCore::SVGMatrix::scaleNonUniform): Ditto. (WebCore::SVGMatrix::rotate): Ditto. (WebCore::SVGMatrix::flipX): Ditto. (WebCore::SVGMatrix::flipY): Ditto. (WebCore::SVGMatrix::skewX): Ditto. (WebCore::SVGMatrix::skewY): Ditto. (WebCore::SVGMatrix::multiply): Ditto. (WebCore::SVGMatrix::inverse): Ditto. (WebCore::SVGMatrix::rotateFromVector): Dittto. * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::parseMappedAttribute): (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGPatternElement.h: Ditto. * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme. * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: Ditto. (WebCore::SVGSVGElement::createSVGTransformFromMatrix): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): (WebCore::SVGStyledTransformableElement::animatedLocalTransform): (WebCore::SVGStyledTransformableElement::parseMappedAttribute): * svg/SVGStyledTransformableElement.h: Ditto. * svg/SVGTextElement.cpp: Ditto. (WebCore::SVGTextElement::SVGTextElement): (WebCore::SVGTextElement::parseMappedAttribute): (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: Ditto. * svg/SVGTransform.cpp: Modernize code, inlined some getters. (WebCore::SVGTransform::SVGTransform): (WebCore::SVGTransform::setMatrix): * svg/SVGTransform.h: Reindent header. (WebCore::SVGTransform::type): (WebCore::SVGTransform::svgMatrix): (WebCore::SVGTransform::matrix): (WebCore::SVGTransform::angle): (WebCore::SVGTransform::rotationCenter): (WebCore::SVGTransform::isValid): (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly. (WebCore::operator!=): * svg/SVGTransform.idl: * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>. (WebCore::SVGTransformList::createSVGTransformFromMatrix): (WebCore::SVGTransformList::consolidate): (WebCore::SVGTransformList::concatenate): (WebCore::SVGTransformList::valueAsString): * svg/SVGTransformList.h: (WebCore::SVGTransformList::SVGTransformList): * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions. * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes. (WebCore::SVGTransformable::parseTransformAttribute): * svg/SVGTransformable.h: Ditto. * svg/SVGViewSpec.cpp: Ditto. (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::setTransform): (WebCore::SVGViewSpec::parseViewSpec): * svg/SVGViewSpec.h: Ditto. (WebCore::SVGViewSpec::transform): * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected. * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros. * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects. (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal): (WebCore::SVGAnimatedTransformListPropertyTearOff::create): (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff): * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected. * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method. * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList. * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff). (WebCore::SVGStaticPropertyWithParentTearOff::create): (WebCore::SVGStaticPropertyWithParentTearOff::commitChange): (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff): * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix. (WebCore::SVGTransformListPropertyTearOff::create): (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix): (WebCore::SVGTransformListPropertyTearOff::consolidate): (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff): 2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept https://bugs.webkit.org/show_bug.cgi?id=49311 Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint. Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added. * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added. * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added. * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added. * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added. * svg/dom/SVGMatrix-expected.txt: Added. * svg/dom/SVGMatrix.html: Added. * svg/dom/SVGPoint-expected.txt: * svg/dom/SVGTransform-expected.txt: Added. * svg/dom/SVGTransform.html: Added. * svg/dom/SVGTransformList-expected.txt: Added. * svg/dom/SVGTransformList.html: Added. * svg/dom/script-tests/SVGMatrix.js: Added. * svg/dom/script-tests/SVGPoint.js: * svg/dom/script-tests/SVGTransform.js: Added. * svg/dom/script-tests/SVGTransformList.js: Added. Canonical link: https://commits.webkit.org/62278@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-11-11 11:20:11 +00:00
PASS successfullyParsed is true
TEST COMPLETE