Skip to content
  • commit-queue@webkit.org's avatar
    [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values · 88cd3de6
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=119614
    
    Source/WebCore:
    
    Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
    luminance. The default value is auto. This patch contains only the parsing of the property,
    not the actual implementation of the types of masks. The parsing of mask-source-type in the
    -webkit-mask property will be handled in a separate patch.
    
    Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-16
    Reviewed by Dirk Schulze.
    
    Test: fast/masking/parsing-mask-source-type.html
    
    * css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
    (WebCore::ComputedStyleExtractor::propertyValue):
    * css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
    (WebCore::CSSParser::parseValue):
    (WebCore::CSSParser::parseFillProperty):
    * css/CSSProperty.cpp:
    (WebCore::CSSProperty::isInheritedProperty):
    * css/CSSPropertyNames.in: Added -webkit-mask-type property.
    * css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
    (WebCore::CSSToStyleMap::mapFillMaskType):
    * css/CSSToStyleMap.h:
    * css/DeprecatedStyleBuilder.cpp:
    (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
    * css/StyleResolver.cpp:
    (WebCore::StyleResolver::applyProperty):
    * rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
    (WebCore::FillLayer::FillLayer):
    (WebCore::FillLayer::operator=):
    (WebCore::FillLayer::operator==):
    * rendering/style/FillLayer.h: Added methods for working with m_maskType.
    (WebCore::FillLayer::maskType):
    (WebCore::FillLayer::isMaskTypeSet):
    (WebCore::FillLayer::setMaskType):
    (WebCore::FillLayer::clearMaskType):
    (WebCore::FillLayer::initialMaskType):
    * rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.
    
    LayoutTests:
    
    Added tests for the parsing of the -webkit-mask-source-type property
    
    Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-16
    Reviewed by Dirk Schulze.
    
    * fast/masking/parsing-mask-expected.txt:
    * fast/masking/parsing-mask-source-type-expected.txt: Added.
    * fast/masking/parsing-mask-source-type.html: Added.
    * fast/masking/parsing-mask.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    88cd3de6