[CSS Shaders] Parse parameters descriptor
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2013 20:05:17 +0000 (20:05 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2013 20:05:17 +0000 (20:05 +0000)
commit87df78bcc21b41860df70a57372392e6e18f0ec9
tree4b9904d56b854acbbe43da7d193b4c7cc7d72dcf
parent65181b7b3aeb7f7d8728a0fd3bda216f5bae562c
[CSS Shaders] Parse parameters descriptor
https://bugs.webkit.org/show_bug.cgi?id=114455

Reviewed by Dean Jackson.

Source/WebCore:

Add support for the 'parameters' descriptor in the filter at-rule to support
parameterization of CSS Shaders.

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

Tests: css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html
       css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Added 'parameters' property and fail parsing if not inside
    of an @filter rule.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFilterRuleParameters): New helper function to verify
    values.
(WebCore):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Added new property name 'parameters'.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

LayoutTests:

Tests for the 'parameters' descriptor on @filter rule.

* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt: Added.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: Added.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js: Added.
(testInvalidParametersProperty):
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js: Added.
(testParametersProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt [new file with mode: 0644]
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html [new file with mode: 0644]
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt [new file with mode: 0644]
LayoutTests/css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html [new file with mode: 0644]
LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js [new file with mode: 0644]
LayoutTests/css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/StyleResolver.cpp