Diff
Modified: trunk/LayoutTests/ChangeLog (154741 => 154742)
--- trunk/LayoutTests/ChangeLog 2013-08-28 14:03:38 UTC (rev 154741)
+++ trunk/LayoutTests/ChangeLog 2013-08-28 14:10:47 UTC (rev 154742)
@@ -1,3 +1,14 @@
+2013-08-28 Andrei Parvu <[email protected]>
+
+ <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 <[email protected]>
Http tests fails on Debian with Apache 2.4
Modified: trunk/LayoutTests/fast/masking/parsing-mask-expected.txt (154741 => 154742)
--- trunk/LayoutTests/fast/masking/parsing-mask-expected.txt 2013-08-28 14:03:38 UTC (rev 154741)
+++ trunk/LayoutTests/fast/masking/parsing-mask-expected.txt 2013-08-28 14:10:47 UTC (rev 154742)
@@ -39,6 +39,9 @@
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 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
Modified: trunk/LayoutTests/fast/masking/parsing-mask.html (154741 => 154742)
--- trunk/LayoutTests/fast/masking/parsing-mask.html 2013-08-28 14:03:38 UTC (rev 154741)
+++ trunk/LayoutTests/fast/masking/parsing-mask.html 2013-08-28 14:10:47 UTC (rev 154742)
@@ -84,6 +84,9 @@
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 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");
Modified: trunk/Source/WebCore/ChangeLog (154741 => 154742)
--- trunk/Source/WebCore/ChangeLog 2013-08-28 14:03:38 UTC (rev 154741)
+++ trunk/Source/WebCore/ChangeLog 2013-08-28 14:10:47 UTC (rev 154742)
@@ -1,3 +1,19 @@
+2013-08-28 Andrei Parvu <[email protected]>
+
+ <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 <[email protected]>
REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
Modified: trunk/Source/WebCore/css/CSSParser.cpp (154741 => 154742)
--- trunk/Source/WebCore/css/CSSParser.cpp 2013-08-28 14:03:38 UTC (rev 154741)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2013-08-28 14:10:47 UTC (rev 154742)
@@ -2850,7 +2850,7 @@
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);
}
Modified: trunk/Source/WebCore/css/StylePropertyShorthand.cpp (154741 => 154742)
--- trunk/Source/WebCore/css/StylePropertyShorthand.cpp 2013-08-28 14:03:38 UTC (rev 154741)
+++ trunk/Source/WebCore/css/StylePropertyShorthand.cpp 2013-08-28 14:10:47 UTC (rev 154742)
@@ -431,6 +431,7 @@
{
static const CSSPropertyID maskProperties[] = {
CSSPropertyWebkitMaskImage,
+ CSSPropertyWebkitMaskSourceType,
CSSPropertyWebkitMaskPositionX,
CSSPropertyWebkitMaskPositionY,
CSSPropertyWebkitMaskSize,
@@ -898,6 +899,7 @@
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);