<https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property

Source/WebCore:

Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-28
Reviewed by Dirk Schulze.

Test cases added in LayoutTests/fast/masking/parsing-mask.html

* css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
(WebCore::CSSParser::parseValue):
* css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
(WebCore::webkitMaskShorthand):
(WebCore::matchingShorthandsForLonghand):

LayoutTests:

Added test cases for using the source type with the -webkit-mask shorthand property.

Patch by Andrei Parvu <parvu@adobe.com> on 2013-08-28
Reviewed by Dirk Schulze.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 68c4712d
2013-08-28 Andrei Parvu <parvu@adobe.com>
<https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
Added test cases for using the source type with the -webkit-mask shorthand property.
Reviewed by Dirk Schulze.
* fast/masking/parsing-mask-expected.txt:
* fast/masking/parsing-mask.html:
2013-08-28 Allan Sandfeld Jensen <allan.jensen@digia.com>
Http tests fails on Debian with Apache 2.4
......@@ -39,6 +39,9 @@ PASS innerStyle("-webkit-mask-position", "left 10px center") is "left 10px top 5
PASS innerStyle("-webkit-mask-position", "center top 20px") is "left 50% top 20px"
PASS innerStyle("-webkit-mask-position", "center left 30px") is "left 30px top 50%"
PASS innerStyle("-webkit-mask-position", "left 20% top") is "left 20% top 0%"
PASS innerStyle("-webkit-mask", "none alpha") is "none alpha"
PASS innerStyle("-webkit-mask", "none luminance, none alpha") is "none luminance, none alpha"
PASS innerStyle("-webkit-mask", "none auto, none, none luminance") is "none auto, none, none luminance"
PASS innerStyle("-webkit-mask-source-type", "alpha") is "alpha"
PASS innerStyle("-webkit-mask-source-type", "luminance") is "luminance"
PASS innerStyle("-webkit-mask-source-type", "auto") is "auto"
......@@ -116,6 +119,8 @@ PASS innerStyle("-webkit-mask", "none center center 20px / auto repeat-x scroll
PASS innerStyle("-webkit-mask", "none top 20px right 30px center / auto repeat-x scroll border-box border-box") is null
PASS innerStyle("-webkit-mask", "none top 20px top 30px / auto repeat-x scroll border-box border-box") is null
PASS innerStyle("-webkit-mask", "none top 20px bottom / auto repeat-x scroll border-box border-box") is null
PASS innerStyle("-webkit-mask", "none alpha, none auto alpha") is null
PASS innerStyle("-webkit-mask", "none alpha luminance") is null
PASS innerStyle("-webkit-mask-source-type", "rubbish") is null
PASS innerStyle("-webkit-mask-source-type", "") is null
PASS innerStyle("-webkit-mask-source-type", "center") is null
......
......@@ -84,6 +84,9 @@ testInner("-webkit-mask-position", "center left 30px", "left 30px top 50%");
testInner("-webkit-mask-position", "left 20% top", "left 20% top 0%");
// test mask-source-type
testInner("-webkit-mask", "none alpha", "none alpha");
testInner("-webkit-mask", "none luminance, none alpha", "none luminance, none alpha");
testInner("-webkit-mask", "none auto, none, none luminance", "none auto, none, none luminance");
testInner("-webkit-mask-source-type", "alpha", "alpha");
testInner("-webkit-mask-source-type", "luminance", "luminance");
testInner("-webkit-mask-source-type", "auto", "auto");
......@@ -175,6 +178,8 @@ negativeTest("-webkit-mask", "none center center 20px / auto repeat-x scroll bor
negativeTest("-webkit-mask", "none top 20px right 30px center / auto repeat-x scroll border-box border-box");
negativeTest("-webkit-mask", "none top 20px top 30px / auto repeat-x scroll border-box border-box");
negativeTest("-webkit-mask", "none top 20px bottom / auto repeat-x scroll border-box border-box");
negativeTest("-webkit-mask", "none alpha, none auto alpha");
negativeTest("-webkit-mask", "none alpha luminance");
negativeTest("-webkit-mask-source-type", "rubbish");
negativeTest("-webkit-mask-source-type", "");
negativeTest("-webkit-mask-source-type", "center");
......
2013-08-28 Andrei Parvu <parvu@adobe.com>
<https://webkit.org/b/120002> [CSS Masking] Add -webkit-mask-source-type shorthand property
Added the -webkit-mask-source-type property to the -webkit-mask shorthand property.
Reviewed by Dirk Schulze.
Test cases added in LayoutTests/fast/masking/parsing-mask.html
* css/CSSParser.cpp: Added the CSSPropertyWebkitMaskSourceType property to the array of shorthand properties.
(WebCore::CSSParser::parseValue):
* css/StylePropertyShorthand.cpp: Added the CSSPropertyWebkitMaskSourceType to the list of shorthands.
(WebCore::webkitMaskShorthand):
(WebCore::matchingShorthandsForLonghand):
2013-08-28 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
......@@ -2850,7 +2850,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
return parseFillShorthand(propId, properties, WTF_ARRAY_LENGTH(properties), important);
}
case CSSPropertyWebkitMask: {
const CSSPropertyID properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskRepeat,
const CSSPropertyID properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskSourceType, CSSPropertyWebkitMaskRepeat,
CSSPropertyWebkitMaskPosition, CSSPropertyWebkitMaskOrigin, CSSPropertyWebkitMaskClip, CSSPropertyWebkitMaskSize };
return parseFillShorthand(propId, properties, WTF_ARRAY_LENGTH(properties), important);
}
......
......@@ -431,6 +431,7 @@ const StylePropertyShorthand& webkitMaskShorthand()
{
static const CSSPropertyID maskProperties[] = {
CSSPropertyWebkitMaskImage,
CSSPropertyWebkitMaskSourceType,
CSSPropertyWebkitMaskPositionX,
CSSPropertyWebkitMaskPositionY,
CSSPropertyWebkitMaskSize,
......@@ -898,6 +899,7 @@ const Vector<const StylePropertyShorthand*> matchingShorthandsForLonghand(CSSPro
Vector<const StylePropertyShorthand*, 1> mask;
mask.uncheckedAppend(&webkitMaskShorthand());
map.set(CSSPropertyWebkitMaskImage, mask);
map.set(CSSPropertyWebkitMaskSourceType, mask);
map.set(CSSPropertyWebkitMaskSize, mask);
map.set(CSSPropertyWebkitMaskOrigin, mask);
map.set(CSSPropertyWebkitMaskClip, mask);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment