Skip to content
  • krit@webkit.org's avatar
    [Part 5] Parse color value for custom() function parameters · e6947f2c
    krit@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=114902
    
    Reviewed by Dean Jackson.
    
    Source/WebCore:
    
    Custom filter parameters should support color values. Added parsing
    and style resolving bits to support color values. A later patch will
    add the color values 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 CustomFilterColorParameter to support color values
        as custom filter parameters.
    * Target.pri:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.vcxproj/WebCore.vcxproj:
    * WebCore.vcxproj/WebCore.vcxproj.filters:
    * WebCore.xcodeproj/project.pbxproj:
    * css/CSSComputedStyleDeclaration.cpp:
    (WebCore::valueForCustomFilterColorParameter):
    (WebCore):
    (WebCore::valueForCustomFilterParameter):
    * css/CSSParser.cpp:
    (WebCore::CSSParser::parseCustomFilterParameters):
    * css/StyleResolver.cpp:
    (WebCore::StyleResolver::parseCustomFilterColorParameter):
    (WebCore):
    (WebCore::StyleResolver::parseCustomFilterParameter):
    * css/StyleResolver.h:
    (StyleResolver):
    * platform/graphics/filters/CustomFilterColorParameter.h: Added.
    (WebCore):
    (WebCore::blendFunc):
    (CustomFilterColorParameter):
    (WebCore::CustomFilterColorParameter::create):
    (WebCore::CustomFilterColorParameter::blend):
    (WebCore::CustomFilterColorParameter::color):
    (WebCore::CustomFilterColorParameter::setColor):
    (WebCore::CustomFilterColorParameter::operator==):
    (WebCore::CustomFilterColorParameter::CustomFilterColorParameter):
    (WebCore::CustomFilterColorParameter::~CustomFilterColorParameter):
    * platform/graphics/filters/CustomFilterParameter.h:
    (CustomFilterParameter):
    * platform/graphics/filters/CustomFilterRenderer.cpp:
    (WebCore::CustomFilterRenderer::bindProgramParameters):
    
    LayoutTests:
    
    Added tests for color parameters 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@148802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e6947f2c