[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):
(WebCore::CSSParser::parseTransform):
(WebCore::CSSParser::parseMatValue):
(WebCore):
(WebCore::CSSParser::parseCustomFilterParameters):
(WebCore):
(WebCore::CSSValue::reportMemoryUsage):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
(WebCore::CSSValue::isWebKitCSSMatFunctionValue):
(WebCore::StyleResolver::parseCustomFilterArrayParameter):
(WebCore::StyleResolver::parseCustomFilterParameter):
(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: