Diff
Modified: trunk/LayoutTests/ChangeLog (154173 => 154174)
--- trunk/LayoutTests/ChangeLog 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/LayoutTests/ChangeLog 2013-08-16 11:41:57 UTC (rev 154174)
@@ -1,3 +1,17 @@
+2013-08-16 Andrei Parvu <[email protected]>
+
+ [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
+ https://bugs.webkit.org/show_bug.cgi?id=119614
+
+ Added tests for the parsing of the -webkit-mask-source-type property
+
+ 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:
+
2013-08-16 Simon Pena <[email protected]>
[GTK] Unreviewed gardening. Rebaseline after r154127 and add new baseline after r153647.
Modified: trunk/LayoutTests/fast/masking/parsing-mask-expected.txt (154173 => 154174)
--- trunk/LayoutTests/fast/masking/parsing-mask-expected.txt 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/LayoutTests/fast/masking/parsing-mask-expected.txt 2013-08-16 11:41:57 UTC (rev 154174)
@@ -39,6 +39,13 @@
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-source-type", "alpha") is "alpha"
+PASS innerStyle("-webkit-mask-source-type", "luminance") is "luminance"
+PASS innerStyle("-webkit-mask-source-type", "auto") is "auto"
+PASS computedStyle("-webkit-mask-source-type", "alpha") is "alpha"
+PASS computedStyle("-webkit-mask-source-type", "auto") is "alpha"
+PASS computedStyle("-webkit-mask-source-type", "luminance") is "luminance"
+PASS computedStyle("-webkit-mask-source-type", "") is "alpha"
PASS innerStyle("-webkit-mask", "repeat-x") is "repeat-x"
PASS innerStyle("-webkit-mask", "repeat-y") is "repeat-y"
PASS innerStyle("-webkit-mask", "repeat") is "repeat"
@@ -109,6 +116,10 @@
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-source-type", "rubbish") is null
+PASS innerStyle("-webkit-mask-source-type", "") is null
+PASS innerStyle("-webkit-mask-source-type", "center") is null
+PASS innerStyle("-webkit-mask-source-type", "repeat") is null
PASS successfullyParsed is true
TEST COMPLETE
Added: trunk/LayoutTests/fast/masking/parsing-mask-source-type-expected.txt (0 => 154174)
--- trunk/LayoutTests/fast/masking/parsing-mask-source-type-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/masking/parsing-mask-source-type-expected.txt 2013-08-16 11:41:57 UTC (rev 154174)
@@ -0,0 +1,8 @@
+PASS setProperty("alpha, alpha, alpha, alpha") is "alpha, alpha, alpha, alpha"
+PASS setProperty("luminance, alpha") is "luminance, alpha, alpha, alpha"
+PASS setProperty("luminance, luminance, luminance, luminance") is "luminance, luminance, luminance, luminance"
+PASS setProperty("auto, alpha, luminance, luminance") is "alpha, alpha, luminance, luminance"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/masking/parsing-mask-source-type.html (0 => 154174)
--- trunk/LayoutTests/fast/masking/parsing-mask-source-type.html (rev 0)
+++ trunk/LayoutTests/fast/masking/parsing-mask-source-type.html 2013-08-16 11:41:57 UTC (rev 154174)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+ <style>
+ * { font-size: 16px; }
+ div { font-size: 8px; }
+ </style>
+ <body>
+ <script src=""
+ <script>
+ function setProperty(value) {
+ var div = document.createElement('div');
+ document.body.appendChild(div);
+ div.style.setProperty("-webkit-mask-image", "none, none, none, none");
+ div.style.setProperty("-webkit-mask-source-type", value);
+
+ var computedValue = getComputedStyle(div).getPropertyValue("-webkit-mask-source-type");
+ document.body.removeChild(div);
+
+ return computedValue;
+ }
+
+ function test(value, expected) {
+ shouldBeEqualToString('setProperty("' + value + '")', expected);
+ }
+
+ test("alpha, alpha, alpha, alpha", "alpha, alpha, alpha, alpha");
+ test("luminance, alpha", "luminance, alpha, alpha, alpha");
+ test("luminance, luminance, luminance, luminance", "luminance, luminance, luminance, luminance");
+ test("auto, alpha, luminance, luminance", "alpha, alpha, luminance, luminance");
+ </script>
+ <script src=""
+ </body>
+</html>
Modified: trunk/LayoutTests/fast/masking/parsing-mask.html (154173 => 154174)
--- trunk/LayoutTests/fast/masking/parsing-mask.html 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/LayoutTests/fast/masking/parsing-mask.html 2013-08-16 11:41:57 UTC (rev 154174)
@@ -83,6 +83,15 @@
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-source-type", "alpha", "alpha");
+testInner("-webkit-mask-source-type", "luminance", "luminance");
+testInner("-webkit-mask-source-type", "auto", "auto");
+testComputed("-webkit-mask-source-type", "alpha", "alpha");
+testComputed("-webkit-mask-source-type", "auto", "alpha");
+testComputed("-webkit-mask-source-type", "luminance", "luminance");
+testComputed("-webkit-mask-source-type", "", "alpha");
+
// test mask-repeat
testInner("-webkit-mask", "repeat-x", "repeat-x");
testInner("-webkit-mask", "repeat-y", "repeat-y");
@@ -166,6 +175,10 @@
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-source-type", "rubbish");
+negativeTest("-webkit-mask-source-type", "");
+negativeTest("-webkit-mask-source-type", "center");
+negativeTest("-webkit-mask-source-type", "repeat");
</script>
<script src=""
Modified: trunk/Source/WebCore/ChangeLog (154173 => 154174)
--- trunk/Source/WebCore/ChangeLog 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/ChangeLog 2013-08-16 11:41:57 UTC (rev 154174)
@@ -1,3 +1,44 @@
+2013-08-16 Andrei Parvu <[email protected]>
+
+ [CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
+ https://bugs.webkit.org/show_bug.cgi?id=119614
+
+ 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.
+
+ 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.
+
2013-08-16 Raphael Kubo da Costa <[email protected]>
<https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (154173 => 154174)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -329,6 +329,7 @@
CSSPropertyWebkitMaskPosition,
CSSPropertyWebkitMaskRepeat,
CSSPropertyWebkitMaskSize,
+ CSSPropertyWebkitMaskSourceType,
CSSPropertyWebkitNbspMode,
CSSPropertyWebkitOrder,
#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
@@ -1423,6 +1424,19 @@
return list.release();
}
+static PassRefPtr<CSSValue> fillSourceTypeToCSSValue(EMaskSourceType type)
+{
+ switch (type) {
+ case MaskAlpha:
+ return cssValuePool().createValue(CSSValueAlpha);
+ case MaskLuminance:
+ return cssValuePool().createValue(CSSValueLuminance);
+ }
+
+ ASSERT_NOT_REACHED();
+
+ return 0;
+}
static PassRefPtr<CSSValue> fillSizeToCSSValue(const FillSize& fillSize, const RenderStyle* style)
{
if (fillSize.type == Contain)
@@ -1765,6 +1779,21 @@
return list.release();
}
+ case CSSPropertyWebkitMaskSourceType: {
+ const FillLayer* layers = style->maskLayers();
+
+ if (!layers)
+ return cssValuePool().createIdentifierValue(CSSValueNone);
+
+ if (!layers->next())
+ return fillSourceTypeToCSSValue(layers->maskSourceType());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(fillSourceTypeToCSSValue(currLayer->maskSourceType()));
+
+ return list.release();
+ }
case CSSPropertyWebkitBackgroundComposite:
case CSSPropertyWebkitMaskComposite: {
const FillLayer* layers = propertyID == CSSPropertyWebkitMaskComposite ? style->maskLayers() : style->backgroundLayers();
Modified: trunk/Source/WebCore/css/CSSParser.cpp (154173 => 154174)
--- trunk/Source/WebCore/css/CSSParser.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -2148,6 +2148,7 @@
case CSSPropertyWebkitMaskPositionX:
case CSSPropertyWebkitMaskPositionY:
case CSSPropertyWebkitMaskSize:
+ case CSSPropertyWebkitMaskSourceType:
case CSSPropertyWebkitMaskRepeat:
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
@@ -4428,6 +4429,14 @@
m_valueList->next();
break;
}
+ case CSSPropertyWebkitMaskSourceType: {
+ if (val->id == CSSValueAuto || val->id == CSSValueAlpha || val->id == CSSValueLuminance) {
+ currValue = cssValuePool().createIdentifierValue(val->id);
+ m_valueList->next();
+ } else
+ currValue = 0;
+ break;
+ }
default:
break;
}
Modified: trunk/Source/WebCore/css/CSSProperty.cpp (154173 => 154174)
--- trunk/Source/WebCore/css/CSSProperty.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/CSSProperty.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -642,6 +642,7 @@
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
case CSSPropertyWebkitMaskSize:
+ case CSSPropertyWebkitMaskSourceType:
case CSSPropertyWebkitMaxLogicalWidth:
case CSSPropertyWebkitMaxLogicalHeight:
case CSSPropertyWebkitMinLogicalWidth:
Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (154173 => 154174)
--- trunk/Source/WebCore/css/CSSPropertyNames.in 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in 2013-08-16 11:41:57 UTC (rev 154174)
@@ -359,6 +359,7 @@
-webkit-mask-repeat-x
-webkit-mask-repeat-y
-webkit-mask-size
+-webkit-mask-source-type
-webkit-max-logical-width
-webkit-max-logical-height
-webkit-min-logical-width
Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (154173 => 154174)
--- trunk/Source/WebCore/css/CSSToStyleMap.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -299,6 +299,34 @@
layer->setBackgroundYOrigin(*(pair->first()));
}
+void CSSToStyleMap::mapFillMaskSourceType(CSSPropertyID, FillLayer* layer, CSSValue* value)
+{
+ EMaskSourceType type = FillLayer::initialMaskSourceType(layer->type());
+ if (value->isInitialValue()) {
+ layer->setMaskSourceType(type);
+ return;
+ }
+
+ if (!value->isPrimitiveValue())
+ return;
+
+ CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);
+ switch (primitiveValue->getValueID()) {
+ case CSSValueAlpha:
+ type = EMaskSourceType::MaskAlpha;
+ break;
+ case CSSValueLuminance:
+ type = EMaskSourceType::MaskLuminance;
+ break;
+ case CSSValueAuto:
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+ layer->setMaskSourceType(type);
+}
+
void CSSToStyleMap::mapAnimationDelay(Animation* animation, CSSValue* value)
{
if (value->isInitialValue()) {
Modified: trunk/Source/WebCore/css/CSSToStyleMap.h (154173 => 154174)
--- trunk/Source/WebCore/css/CSSToStyleMap.h 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/CSSToStyleMap.h 2013-08-16 11:41:57 UTC (rev 154174)
@@ -53,6 +53,7 @@
void mapFillSize(CSSPropertyID, FillLayer*, CSSValue*);
void mapFillXPosition(CSSPropertyID, FillLayer*, CSSValue*);
void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*);
+ void mapFillMaskSourceType(CSSPropertyID, FillLayer*, CSSValue*);
void mapAnimationDelay(Animation*, CSSValue*);
void mapAnimationDirection(Animation*, CSSValue*);
Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (154173 => 154174)
--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -2311,6 +2311,7 @@
setPropertyHandler(CSSPropertyWebkitMaskRepeatX, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatX, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatXSet, &FillLayer::repeatX, &FillLayer::setRepeatX, &FillLayer::clearRepeatX, &FillLayer::initialFillRepeatX, &CSSToStyleMap::mapFillRepeatX>::createHandler());
setPropertyHandler(CSSPropertyWebkitMaskRepeatY, ApplyPropertyFillLayer<EFillRepeat, CSSPropertyWebkitMaskRepeatY, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isRepeatYSet, &FillLayer::repeatY, &FillLayer::setRepeatY, &FillLayer::clearRepeatY, &FillLayer::initialFillRepeatY, &CSSToStyleMap::mapFillRepeatY>::createHandler());
setPropertyHandler(CSSPropertyWebkitMaskSize, ApplyPropertyFillLayer<FillSize, CSSPropertyWebkitMaskSize, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isSizeSet, &FillLayer::size, &FillLayer::setSize, &FillLayer::clearSize, &FillLayer::initialFillSize, &CSSToStyleMap::mapFillSize>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitMaskSourceType, ApplyPropertyFillLayer<EMaskSourceType, CSSPropertyWebkitMaskSourceType, MaskFillLayer, &RenderStyle::accessMaskLayers, &RenderStyle::maskLayers, &FillLayer::isMaskSourceTypeSet, &FillLayer::maskSourceType, &FillLayer::setMaskSourceType, &FillLayer::clearMaskSourceType, &FillLayer::initialMaskSourceType, &CSSToStyleMap::mapFillMaskSourceType>::createHandler());
setPropertyHandler(CSSPropertyWebkitNbspMode, ApplyPropertyDefault<ENBSPMode, &RenderStyle::nbspMode, ENBSPMode, &RenderStyle::setNBSPMode, ENBSPMode, &RenderStyle::initialNBSPMode>::createHandler());
setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitPerspectiveOriginX, CSSPropertyWebkitPerspectiveOriginY>::createHandler());
setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler());
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (154173 => 154174)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -2964,6 +2964,7 @@
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
case CSSPropertyWebkitMaskSize:
+ case CSSPropertyWebkitMaskSourceType:
case CSSPropertyWebkitNbspMode:
case CSSPropertyWebkitPerspectiveOrigin:
case CSSPropertyWebkitPerspectiveOriginX:
Modified: trunk/Source/WebCore/rendering/style/FillLayer.cpp (154173 => 154174)
--- trunk/Source/WebCore/rendering/style/FillLayer.cpp 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/rendering/style/FillLayer.cpp 2013-08-16 11:41:57 UTC (rev 154174)
@@ -54,6 +54,7 @@
, m_composite(FillLayer::initialFillComposite(type))
, m_sizeType(FillLayer::initialFillSizeType(type))
, m_blendMode(FillLayer::initialFillBlendMode(type))
+ , m_maskSourceType(FillLayer::initialMaskSourceType(type))
, m_imageSet(false)
, m_attachmentSet(false)
, m_clipSet(false)
@@ -67,6 +68,7 @@
, m_backgroundYOrigin(TopEdge)
, m_compositeSet(type == MaskFillLayer)
, m_blendModeSet(false)
+ , m_maskSourceTypeSet(false)
, m_type(type)
{
}
@@ -85,6 +87,7 @@
, m_composite(o.m_composite)
, m_sizeType(o.m_sizeType)
, m_blendMode(o.m_blendMode)
+ , m_maskSourceType(o.m_maskSourceType)
, m_imageSet(o.m_imageSet)
, m_attachmentSet(o.m_attachmentSet)
, m_clipSet(o.m_clipSet)
@@ -98,6 +101,7 @@
, m_backgroundYOrigin(o.m_backgroundYOrigin)
, m_compositeSet(o.m_compositeSet)
, m_blendModeSet(o.m_blendModeSet)
+ , m_maskSourceTypeSet(o.m_maskSourceTypeSet)
, m_type(o.m_type)
{
}
@@ -129,6 +133,7 @@
m_repeatX = o.m_repeatX;
m_repeatY = o.m_repeatY;
m_sizeType = o.m_sizeType;
+ m_maskSourceType = o.m_maskSourceType;
m_imageSet = o.m_imageSet;
m_attachmentSet = o.m_attachmentSet;
@@ -140,7 +145,8 @@
m_repeatYSet = o.m_repeatYSet;
m_xPosSet = o.m_xPosSet;
m_yPosSet = o.m_yPosSet;
-
+ m_maskSourceTypeSet = o.m_maskSourceTypeSet;
+
m_type = o.m_type;
return *this;
@@ -154,8 +160,9 @@
&& m_backgroundXOrigin == o.m_backgroundXOrigin && m_backgroundYOrigin == o.m_backgroundYOrigin
&& m_attachment == o.m_attachment && m_clip == o.m_clip && m_composite == o.m_composite
&& m_blendMode == o.m_blendMode && m_origin == o.m_origin && m_repeatX == o.m_repeatX
- && m_repeatY == o.m_repeatY && m_sizeType == o.m_sizeType && m_sizeLength == o.m_sizeLength
- && m_type == o.m_type && ((m_next && o.m_next) ? *m_next == *o.m_next : m_next == o.m_next);
+ && m_repeatY == o.m_repeatY && m_sizeType == o.m_sizeType && m_maskSourceType == o.m_maskSourceType
+ && m_sizeLength == o.m_sizeLength && m_type == o.m_type
+ && ((m_next && o.m_next) ? *m_next == *o.m_next : m_next == o.m_next);
}
void FillLayer::fillUnsetProperties()
Modified: trunk/Source/WebCore/rendering/style/FillLayer.h (154173 => 154174)
--- trunk/Source/WebCore/rendering/style/FillLayer.h 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/rendering/style/FillLayer.h 2013-08-16 11:41:57 UTC (rev 154174)
@@ -80,6 +80,7 @@
LengthSize sizeLength() const { return m_sizeLength; }
EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeType); }
FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeType), m_sizeLength); }
+ EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType>(m_maskSourceType); }
const FillLayer* next() const { return m_next; }
FillLayer* next() { return m_next; }
@@ -96,7 +97,8 @@
bool isCompositeSet() const { return m_compositeSet; }
bool isBlendModeSet() const { return m_blendModeSet; }
bool isSizeSet() const { return m_sizeType != SizeNone; }
-
+ bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; }
+
void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; }
void setXPosition(Length l) { m_xPosition = l; m_xPosSet = true; }
void setYPosition(Length l) { m_yPosition = l; m_yPosSet = true; }
@@ -112,7 +114,8 @@
void setSizeType(EFillSizeType b) { m_sizeType = b; }
void setSizeLength(LengthSize l) { m_sizeLength = l; }
void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; }
-
+ void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSourceTypeSet = true; }
+
void clearImage() { m_image.clear(); m_imageSet = false; }
void clearXPosition()
{
@@ -133,6 +136,7 @@
void clearComposite() { m_compositeSet = false; }
void clearBlendMode() { m_blendModeSet = false; }
void clearSize() { m_sizeType = SizeNone; }
+ void clearMaskSourceType() { m_maskSourceTypeSet = false; }
void setNext(FillLayer* n) { if (m_next != n) { delete m_next; m_next = n; } }
@@ -184,6 +188,7 @@
static Length initialFillXPosition(EFillLayerType) { return Length(0.0, Percent); }
static Length initialFillYPosition(EFillLayerType) { return Length(0.0, Percent); }
static StyleImage* initialFillImage(EFillLayerType) { return 0; }
+ static EMaskSourceType initialMaskSourceType(EFillLayerType) { return MaskAlpha; }
private:
friend class RenderStyle;
@@ -209,7 +214,8 @@
unsigned m_composite : 4; // CompositeOperator
unsigned m_sizeType : 2; // EFillSizeType
unsigned m_blendMode : 5; // BlendMode
-
+ unsigned m_maskSourceType : 1; // EMaskSourceType
+
unsigned m_imageSet : 1;
unsigned m_attachmentSet : 1;
unsigned m_clipSet : 1;
@@ -223,7 +229,8 @@
unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin
unsigned m_compositeSet : 1;
unsigned m_blendModeSet : 1;
-
+ unsigned m_maskSourceTypeSet : 1;
+
unsigned m_type : 1; // EFillLayerType
mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (154173 => 154174)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2013-08-16 11:02:34 UTC (rev 154173)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2013-08-16 11:41:57 UTC (rev 154174)
@@ -163,6 +163,9 @@
// CSS3 Background Position
enum BackgroundEdgeOrigin { TopEdge, RightEdge, BottomEdge, LeftEdge };
+// CSS3 Mask Source Types
+enum EMaskSourceType { MaskAlpha, MaskLuminance };
+
// CSS3 Marquee Properties
enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE };