[CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2013 11:41:57 +0000 (11:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2013 11:41:57 +0000 (11:41 +0000)
commit17f85e02ef0fdea9ef91133e730e12b026852f92
treed39dc6ef583af8456a5bd99a0d290b14d355c8d1
parentc7d270663aa68c76808d8d388705fb77f2020900
[CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
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: https://svn.webkit.org/repository/webkit/trunk@154174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/masking/parsing-mask-expected.txt
LayoutTests/fast/masking/parsing-mask-source-type-expected.txt [new file with mode: 0644]
LayoutTests/fast/masking/parsing-mask-source-type.html [new file with mode: 0644]
LayoutTests/fast/masking/parsing-mask.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/CSSToStyleMap.h
Source/WebCore/css/DeprecatedStyleBuilder.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/style/FillLayer.cpp
Source/WebCore/rendering/style/FillLayer.h
Source/WebCore/rendering/style/RenderStyleConstants.h