[Part 4] Parse the custom() function in -webkit-filter: parse the matN() functions
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Apr 2013 04:39:07 +0000 (04:39 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Apr 2013 04:39:07 +0000 (04:39 +0000)
commit028173d65f99e2b47889594f86c2e92fb9cefaa8
tree72b3b28574a60e092aa5df8be6f2c7b2d86c1302
parent29f57b4e8223e88fafbf8dc7705630fcbd33f267
[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: https://svn.webkit.org/repository/webkit/trunk@148852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid-expected.txt
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid-expected.txt
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt
LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-invalid.js
LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-valid.js
LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js
LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/css/WebKitCSSMatFunctionValue.cpp [new file with mode: 0644]
Source/WebCore/css/WebKitCSSMatFunctionValue.h [new file with mode: 0644]
Source/WebCore/platform/graphics/filters/CustomFilterArrayParameter.h
Source/WebCore/platform/graphics/filters/CustomFilterParameter.h
Source/WebCore/platform/graphics/filters/CustomFilterRenderer.cpp