Commit efd4ebf1 authored by krit@webkit.org's avatar krit@webkit.org

[Part 4] Parse the custom() function in -webkit-filter: parse the matN() functions

https://bugs.webkit.org/show_bug.cgi?id=71444

Reviewed by Dean Jackson.

Source/WebCore:

Custom filter parameters should support mat2 to mat4 value functions. Added parsing
and style resolving bits to support the matrix function values. A later patch will
add the matrices to the shader program.

https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-parameters

Modified existing tests to cover changes.

* GNUmakefile.list.am: Added WebKitCSSMatFunctionValue to individual build systems.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForCustomFilterMatParameter):
(WebCore):
(WebCore::valueForCustomFilterParameter):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseTransform):
(WebCore::CSSParser::parseMatValue):
(WebCore):
(WebCore::CSSParser::parseCustomFilterParameters):
* css/CSSParser.h:
(WebCore):
* css/CSSValue.cpp:
(WebCore::CSSValue::reportMemoryUsage):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
(WebCore::CSSValue::isWebKitCSSMatFunctionValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::parseCustomFilterArrayParameter):
(WebCore::StyleResolver::parseCustomFilterParameter):
* css/StyleResolver.h:
(StyleResolver):
* css/WebKitCSSMatFunctionValue.cpp:
(WebCore::WebKitCSSMatFunctionValue::WebKitCSSMatFunctionValue):
(WebCore::WebKitCSSMatFunctionValue::customCssText):
(WebCore::WebKitCSSMatFunctionValue::cloneForCSSOM):
(WebCore::WebKitCSSMatFunctionValue::equals):
(WebCore::WebKitCSSMatFunctionValue::reportDescendantMemoryUsage):
* css/WebKitCSSMatFunctionValue.h:
(WebKitCSSMatFunctionValue):
(WebCore::WebKitCSSMatFunctionValue::create):
* platform/graphics/filters/CustomFilterArrayParameter.h:
(WebCore::CustomFilterArrayParameter::create):
(WebCore::CustomFilterArrayParameter::CustomFilterArrayParameter):
* platform/graphics/filters/CustomFilterParameter.h:
(CustomFilterParameter):
* platform/graphics/filters/CustomFilterRenderer.cpp:
(WebCore::CustomFilterRenderer::bindProgramParameters):

LayoutTests:

Added tests for mat2 to mat4 parameter functions on custom fiter function and
parameter descriptor.

* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-invalid.js:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-valid.js:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ed3ea56e
2013-04-21 Dirk Schulze <krit@webkit.org>
[Part 4] Parse the custom() function in -webkit-filter: parse the matN() functions
https://bugs.webkit.org/show_bug.cgi?id=71444
Reviewed by Dean Jackson.
Added tests for mat2 to mat4 parameter functions on custom fiter function and
parameter descriptor.
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-invalid.js:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-valid.js:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js:
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js:
2013-04-21 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2013-04-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL gardening. Remove test cases which are expected failed, but passed now. Unreviewed, EFL gardening. Remove test cases which are expected failed, but passed now.
...@@ -340,6 +340,234 @@ PASS styleRule.type is CSSRule.STYLE_RULE ...@@ -340,6 +340,234 @@ PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0 PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null PASS declaration.getPropertyValue('-webkit-filter') is null
========================================
Mat2 parameter tests.
========================================
Empty mat2.
custom(my-filter, a mat2())
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Too view arguments.
custom(my-filter, a mat2(0, 0, 0))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No arguments but commas.
custom(my-filter, a mat2(,,,))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Ending commas.
custom(my-filter, a mat2(0, 0,,))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Idents in mat2 function.
custom(my-filter, a mat2(0, 0, a, b))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Too many arguments.
custom(my-filter, a mat2(0, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No commas.
custom(my-filter, a mat2(1 0 0 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Some commas.
custom(my-filter, a mat2(1, 0, 0 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Leading commas.
custom(my-filter, a mat2(, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No length units.
custom(my-filter, a mat2(1px, 0px, 0px, 1px))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No degree units.
custom(my-filter, a mat2(1deg, 0deg, 0deg, 1deg))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
NaN in mat2.
custom(my-filter, a mat2(1, 0, 0, NaN))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
========================================
Mat3 parameter tests.
========================================
Empty mat3.
custom(my-filter, a mat3())
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Too view arguments.
custom(my-filter, a mat3(0, 0, 0, 0))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No arguments but commas.
custom(my-filter, a mat3(,,,,,,,,,,,,,,,))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Ending commas.
custom(my-filter, a mat3(1, 0, 0, 0, 1, 0, 0,,))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Idents in mat3 function.
custom(my-filter, a mat3(1, 0, 0, 0, 1, 0, 0, a, b))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Too many arguments.
custom(my-filter, a mat3(1, 0, 0, 0, 1, 0, 0, 0, 1, 0))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No commas.
custom(my-filter, a mat3(1 0 0 0 1 0 0 0 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Some commas.
custom(my-filter, a mat3(1, 0, 0, 0, 1, 0 0 0 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Leading commas.
custom(my-filter, a mat3(, 0, 0, 0, 1, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No length units.
custom(my-filter, a mat3(1px, 0, 0, 0, 1px, 0, 0, 0, 1px))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No degree units.
custom(my-filter, a mat3(1deg, 0, 0, 0, 1deg, 0, 0, 0, 1deg))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
NaN in mat3.
custom(my-filter, a mat2(NaN, 0, 0, 0, 1, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
========================================
Mat4 parameter tests.
========================================
Empty mat4.
custom(my-filter, a mat4())
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Too view arguments.
custom(my-filter, a mat4(1, 0, 0, 0, 1, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No arguments but commas.
custom(my-filter, a mat4(,,,,,,,,,,,,,,,))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Ending commas.
custom(my-filter, a mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0,,))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Idents in mat4 function.
custom(my-filter, a mat4(1, 0, 0, 0, 1, 0, 0, a, b))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Too many arguments.
custom(my-filter, a mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No commas.
custom(my-filter, a mat4(1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Some commas.
custom(my-filter, a mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0 0 0 0 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
Leading commas.
custom(my-filter, a mat4(, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No length units.
custom(my-filter, a mat4(1px, 0, 0, 0, 0, 1px, 0, 0, 0, 0, 1px, 0, 0, 0, 0, 1px))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
No degree units.
custom(my-filter, a mat4(1deg, 0, 0, 0, 0, 1deg, 0, 0, 0, 0, 1deg, 0, 0, 0, 0, 1deg))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
NaN in mat4.
custom(my-filter, a mat4(NaN, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
======================================== ========================================
Mixing parameter types. Mixing parameter types.
======================================== ========================================
...@@ -391,6 +619,18 @@ custom(my-filter, a rgb(255, 0, 0) rotate(45deg)) ...@@ -391,6 +619,18 @@ custom(my-filter, a rgb(255, 0, 0) rotate(45deg))
PASS styleRule.type is CSSRule.STYLE_RULE PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0 PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null PASS declaration.getPropertyValue('-webkit-filter') is null
Color with mat2.
custom(my-filter, a rgb(255, 0, 0) mat2(0, 0, 0, 0))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
mat2 with mat3.
custom(my-filter, a mat2(1, 0, 0, 1) mat3(0, 0, 0, 0, 0, 0, 0, 0, 0))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-filter') is null
PASS successfullyParsed is true PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
......
...@@ -300,21 +300,177 @@ PASS filterPropertyValue.length is 1 ...@@ -300,21 +300,177 @@ PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, a1 array(1, -2.2, 3.14, 0.4, 5), a2 array(1, 2, 3))' PASS subValue.cssText is 'custom(my-filter, a1 array(1, -2.2, 3.14, 0.4, 5), a2 array(1, 2, 3))'
========================================
Mat2 parameter tests.
========================================
Mat2 parameter.
custom(my-filter, m mat2(1, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat2(1, 0, 0, 1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat2(1, 0, 0, 1))'
Mat2 parameter with negative values.
custom(my-filter, m mat2(-1, -1, -1, -1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat2(-1, -1, -1, -1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat2(-1, -1, -1, -1))'
Mat2 parameter with negative and positive values.
custom(my-filter, m mat2(-1, 1, 1, -1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat2(-1, 1, 1, -1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat2(-1, 1, 1, -1))'
Mat2 parameter with multiple signed floats.
custom(my-filter, m mat2(1, -2.2, 3.14, 0.4))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat2(1, -2.2, 3.14, 0.4))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat2(1, -2.2, 3.14, 0.4))'
========================================
Mat3 parameter tests.
========================================
Mat3 parameter.
custom(my-filter, m mat3(1, 0, 0, 0, 1, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat3(1, 0, 0, 0, 1, 0, 0, 0, 1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat3(1, 0, 0, 0, 1, 0, 0, 0, 1))'
Mat3 parameter with negative values.
custom(my-filter, m mat3(-1, -1, -1, -1, -1, -1, -1, -1, -1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat3(-1, -1, -1, -1, -1, -1, -1, -1, -1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat3(-1, -1, -1, -1, -1, -1, -1, -1, -1))'
Mat3 parameter with negative and positive values.
custom(my-filter, m mat3(-1, 1, 1, -1, -1, 1, 1, -1, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat3(-1, 1, 1, -1, -1, 1, 1, -1, 1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat3(-1, 1, 1, -1, -1, 1, 1, -1, 1))'
Mat3 parameter with multiple signed floats.
custom(my-filter, m mat3(1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat3(1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat3(1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1))'
========================================
Mat4 parameter tests.
========================================
Mat4 parameter.
custom(my-filter, m mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1))'
Mat4 parameter with negative values.
custom(my-filter, m mat4(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat4(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat4(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1))'
Mat4 parameter with negative and positive values.
custom(my-filter, m mat4(-1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat4(-1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat4(-1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1))'
Mat4 parameter with multiple signed floats.
custom(my-filter, m mat4(1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4))
PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, m mat4(1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4))'
PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, m mat4(1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4, 1, -2.2, 3.14, 0.4))'
======================================== ========================================
Combined parameter tests. Combined parameter tests.
======================================== ========================================
Number parameter, color parameter, transform parameter, and array parameter. Number parameter, color parameter, transform parameter, matrix parameters and array parameter.
custom(my-filter, n 1, c rgb(0, 128, 0), t rotate(0deg), a array(1)) custom(my-filter, n 1, c rgb(0, 128, 0), t rotate(0deg), m1 mat2(1, 0, 0, 1), m2 mat3(1, 0, 0, 0, 1, 0, 0, 0, 1), m3 mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), a array(1))
PASS styleRule.type is CSSRule.STYLE_RULE PASS styleRule.type is CSSRule.STYLE_RULE
PASS styleDeclaration.length is 1 PASS styleDeclaration.length is 1
PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, n 1, c rgb(0, 128, 0), t rotate(0deg), a array(1))' PASS styleDeclaration.getPropertyValue('-webkit-filter') is 'custom(my-filter, n 1, c rgb(0, 128, 0), t rotate(0deg), m1 mat2(1, 0, 0, 1), m2 mat3(1, 0, 0, 0, 1, 0, 0, 0, 1), m3 mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), a array(1))'
PASS filterPropertyValue instanceof CSSValueList is true PASS filterPropertyValue instanceof CSSValueList is true
PASS filterPropertyValue.constructor === CSSValueList is true PASS filterPropertyValue.constructor === CSSValueList is true
PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true PASS filterPropertyValue.__proto__ === CSSValueList.prototype is true
PASS filterPropertyValue.length is 1 PASS filterPropertyValue.length is 1
PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM PASS subValue.operationType is WebKitCSSFilterValue.CSS_FILTER_CUSTOM
PASS subValue.cssText is 'custom(my-filter, n 1, c rgb(0, 128, 0), t rotate(0deg), a array(1))' PASS subValue.cssText is 'custom(my-filter, n 1, c rgb(0, 128, 0), t rotate(0deg), m1 mat2(1, 0, 0, 1), m2 mat3(1, 0, 0, 0, 1, 0, 0, 0, 1), m3 mat4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), a array(1))'
PASS successfullyParsed is true PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
......
...@@ -266,6 +266,234 @@ PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE ...@@ -266,6 +266,234 @@ PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0 PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null PASS styleDeclaration.getPropertyValue('parameters') is null
========================================
Mat2 parameter tests.
========================================
Empty mat2.
parameters: a mat2();
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Too view arguments.
parameters: a mat2(0, 0, 0);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
No arguments but commas.
parameters: a mat2(,,,);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Ending commas.
parameters: a mat2(0, 0,,);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Idents in mat2 function.
parameters: a mat2(0, 0, a, b);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Too many arguments.
parameters: a mat2(0, 0, 0, 0, 1);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
No commas.
parameters: a mat2(1 0 0 1);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Some commas.
parameters: a mat2(1, 0, 0 1);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Leading commas.
parameters: a mat2(, 0, 0, 1);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
No length units.
parameters: a mat2(1px, 0px, 0px, 1px);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
No degree units.
parameters: a mat2(1deg, 0deg, 0deg, 1deg);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
NaN in mat2.
parameters: a mat2(1, 0, 0, NaN);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
========================================
Mat3 parameter tests.
========================================
Empty mat3.
parameters: a mat3();
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Too view arguments.
parameters: a mat3(0, 0, 0, 0);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
No arguments but commas.
parameters: a mat3(,,,,,,,,,,,,,,,);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Ending commas.
parameters: a mat3(1, 0, 0, 0, 1, 0, 0,,);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Idents in mat3 function.
parameters: a mat3(1, 0, 0, 0, 1, 0, 0, a, b);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
Too many arguments.
parameters: a mat3(1, 0, 0, 0, 1, 0, 0, 0, 1, 0);
PASS filterAtRule.type is CSSRule.WEBKIT_FILTER_RULE
PASS styleDeclaration.length is 0
PASS styleDeclaration.getPropertyValue('parameters') is null
No commas.