Enable CSS3 position offset for CSS Masking.
authoralexis@webkit.org <alexis@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2012 02:34:01 +0000 (02:34 +0000)
committeralexis@webkit.org <alexis@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Dec 2012 02:34:01 +0000 (02:34 +0000)
commitf75686795fb283fb4c7d914a4605545e800d4aa1
treeb739a736cc3189366328c692fc5176131c49f402
parent5aa18291cc76d0b9d42e20398b9d3e5a6b738cc4
Enable CSS3 position offset for CSS Masking.
https://bugs.webkit.org/show_bug.cgi?id=104252

Reviewed by Dirk Schulze.

Source/WebCore:

To follow CSS3 background-position, mask-position should also support
the new <position> type (http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property).
Now the code is shared between background and mask I renamed the
functions used to be more generic. Note that the feature flag is not
meant to stay and will be removed in a following commit.

No new tests : I modified LayoutTests/fast/masking/parsing-mask.html to
cover the new feature.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createPositionListForLayer):
* css/CSSParser.cpp:
(WebCore::isFillPositionKeyword):
(WebCore::CSSParser::parse4ValuesFillPosition):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::isPotentialPositionValue):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parse2ValuesFillPosition):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseTransformOriginShorthand):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::parsePerspectiveOrigin):
* css/CSSParser.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):

LayoutTests:

Add coverage for the new cases. Both when setting the position with the
longhand or with the shorthand.

* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/masking/parsing-mask-expected.txt
LayoutTests/fast/masking/parsing-mask.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSToStyleMap.cpp