Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)

https://bugs.webkit.org/show_bug.cgi?id=123541

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-31
Reviewed by Tim Horton.

Source/WebCore:

Enabled CSS3 text decoration tests

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue): Mapping internal
representation to a CSSValue
(WebCore::ComputedStyleExtractor::propertyValue): Ditto
* css/CSSParser.cpp: Moving parsing functions behind new flag
(WebCore::isColorPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextDecorationSkip):
(WebCore::CSSParser::parseTextUnderlinePosition):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
* css/CSSPropertyNames.in: Marking the new properties behind new flag
* css/CSSValueKeywords.in: Marking new values behind new flag
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty): Move text decoration shorthand
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::createPen):
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::computeUnderlineOffset):
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderObject.cpp:
(WebCore::decorationColor):
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::colorIncludingFallback):
(WebCore::RenderStyle::visitedDependentColor):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

* platform/mac/TestExpectations: Enable CSS3 text decoration tests
(since CSS3_TEXT_DECORATION is enabled by default)

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent be85573f
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
https://bugs.webkit.org/show_bug.cgi?id=123541
Reviewed by Tim Horton.
* platform/mac/TestExpectations: Enable CSS3 text decoration tests
(since CSS3_TEXT_DECORATION is enabled by default)
2013-10-31 Alexey Proskuryakov <ap@apple.com>
[WebCrypto] Add SHA-1
......
......@@ -811,7 +811,6 @@ webkit.org/b/85262 fast/media/mq-resolution-dpi-dpcm-warning.html [ Skip ]
webkit.org/b/89052 fast/css/image-orientation
# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT).
webkit.org/b/58491 fast/css3-text/css3-text-decoration
webkit.org/b/76173 fast/css3-text/css3-text-align-last
webkit.org/b/99945 fast/css3-text/css3-text-justify [ Failure ]
webkit.org/b/112755 fast/css3-text/css3-text-indent [ Failure ImageOnlyFailure ]
......
layer at (0,0) size 785x724
RenderView at (0,0) size 785x600
layer at (0,0) size 785x724
RenderBlock {HTML} at (0,0) size 785x724
RenderBody {BODY} at (8,8) size 769x708
layer at (8,8) size 769x708
RenderBlock {DIV} at (0,0) size 769x708
RenderPartObject {IFRAME} at (0,0) size 704x704 [border: (2px inset #000000)]
layer at (0,0) size 700x700
RenderView at (0,0) size 700x700
layer at (0,0) size 700x700
RenderBlock {HTML} at (0,0) size 700x700
RenderBody {BODY} at (8,8) size 684x684
RenderBlock {DIV} at (0,0) size 684x36
RenderText {#text} at (0,0) size 348x18
text run at (0,0) width 348: "Each line of this test should match its style description ("
RenderInline {I} at (0,0) size 174x18
RenderText {#text} at (348,0) size 174x18
text run at (348,0) width 174: "-webkit-text-decoration-line"
RenderText {#text} at (522,0) size 43x18
text run at (522,0) width 43: " resets "
RenderInline {I} at (0,0) size 95x18
RenderText {#text} at (565,0) size 95x18
text run at (565,0) width 95: "text-decoration"
RenderText {#text} at (660,0) size 664x36
text run at (660,0) width 4: ","
text run at (0,18) width 194: "except when the latter is set as "
RenderInline {I} at (0,0) size 62x18
RenderText {#text} at (194,18) size 62x18
text run at (194,18) width 62: "important"
RenderText {#text} at (256,18) size 9x18
text run at (256,18) width 9: "):"
RenderBlock (anonymous) at (0,36) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,54) size 684x18
RenderText {#text} at (0,0) size 144x18
text run at (0,0) width 144: "This text is underlined "
RenderInline {SPAN} at (0,0) size 113x18
RenderText {#text} at (144,0) size 113x18
text run at (144,0) width 113: "(also inside span)."
RenderBlock (anonymous) at (0,72) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,90) size 684x18
RenderText {#text} at (0,0) size 136x18
text run at (0,0) width 136: "This text is overlined "
RenderInline {SPAN} at (0,0) size 113x18
RenderText {#text} at (136,0) size 113x18
text run at (136,0) width 113: "(also inside span)."
RenderBlock (anonymous) at (0,108) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,126) size 684x18
RenderText {#text} at (0,0) size 176x18
text run at (0,0) width 176: "This text has a line-through "
RenderInline {SPAN} at (0,0) size 113x18
RenderText {#text} at (176,0) size 113x18
text run at (176,0) width 113: "(also inside span)."
RenderBlock (anonymous) at (0,144) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,162) size 684x18
RenderText {#text} at (0,0) size 211x18
text run at (0,0) width 211: "This text contains no decorations."
RenderBlock (anonymous) at (0,180) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,198) size 684x18
RenderText {#text} at (0,0) size 144x18
text run at (0,0) width 144: "This text is underlined."
RenderBlock (anonymous) at (0,216) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,234) size 684x18
RenderText {#text} at (0,0) size 211x18
text run at (0,0) width 211: "This text contains no decorations."
RenderBlock (anonymous) at (0,252) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,270) size 684x18
RenderText {#text} at (0,0) size 136x18
text run at (0,0) width 136: "This text is overlined."
RenderBlock (anonymous) at (0,288) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,306) size 684x18
RenderText {#text} at (0,0) size 211x18
text run at (0,0) width 211: "This text contains no decorations."
RenderBlock (anonymous) at (0,324) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,342) size 684x18
RenderText {#text} at (0,0) size 176x18
text run at (0,0) width 176: "This text has a line-through."
RenderBlock (anonymous) at (0,360) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,378) size 684x18
RenderText {#text} at (0,0) size 211x18
text run at (0,0) width 211: "This text contains no decorations."
RenderBlock (anonymous) at (0,396) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,414) size 684x18
RenderText {#text} at (0,0) size 355x18
text run at (0,0) width 355: "This text is underlined, overlined and has a line-through."
RenderBlock (anonymous) at (0,432) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,450) size 684x18
RenderText {#text} at (0,0) size 211x18
text run at (0,0) width 211: "This text contains no decorations."
RenderBlock (anonymous) at (0,468) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,486) size 684x18
RenderText {#text} at (0,0) size 136x18
text run at (0,0) width 136: "This text is overlined."
RenderBlock (anonymous) at (0,504) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,522) size 684x18
RenderText {#text} at (0,0) size 136x18
text run at (0,0) width 136: "This text is overlined."
RenderBlock (anonymous) at (0,540) size 684x18
RenderBR {BR} at (0,0) size 0x18
RenderBlock {DIV} at (0,558) size 684x18
RenderText {#text} at (0,0) size 144x18
text run at (0,0) width 144: "This text is underlined."
RenderText {#text} at (0,0) size 0x0
2013-10-31 Myles C. Maxfield <mmaxfield@apple.com>
Move CSS3 text decoration implementation behind ENABLE(CSS3_TEXT_DECORATION)
https://bugs.webkit.org/show_bug.cgi?id=123541
Reviewed by Tim Horton.
Enabled CSS3 text decoration tests
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue): Mapping internal
representation to a CSSValue
(WebCore::ComputedStyleExtractor::propertyValue): Ditto
* css/CSSParser.cpp: Moving parsing functions behind new flag
(WebCore::isColorPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextDecorationSkip):
(WebCore::CSSParser::parseTextUnderlinePosition):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
* css/CSSPropertyNames.in: Marking the new properties behind new flag
* css/CSSValueKeywords.in: Marking new values behind new flag
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty): Move text decoration shorthand
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::createPen):
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::computeUnderlineOffset):
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderObject.cpp:
(WebCore::decorationColor):
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::colorIncludingFallback):
(WebCore::RenderStyle::visitedDependentColor):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-10-31 Alexey Proskuryakov <ap@apple.com>
[WebCrypto] Add SHA-1
......
......@@ -190,13 +190,16 @@ static const CSSPropertyID computedProperties[] = {
CSSPropertyTextAlign,
CSSPropertyTextDecoration,
#if ENABLE(CSS3_TEXT)
CSSPropertyWebkitTextAlignLast,
CSSPropertyWebkitTextJustify,
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
CSSPropertyWebkitTextDecorationLine,
CSSPropertyWebkitTextDecorationStyle,
CSSPropertyWebkitTextDecorationColor,
CSSPropertyWebkitTextAlignLast,
CSSPropertyWebkitTextJustify,
CSSPropertyWebkitTextDecorationSkip,
CSSPropertyWebkitTextUnderlinePosition,
#endif // CSS3_TEXT
#endif // CSS3_TEXT_DECORATION
CSSPropertyTextIndent,
CSSPropertyTextRendering,
CSSPropertyTextShadow,
......@@ -1416,7 +1419,7 @@ static PassRefPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecorati
return list.release();
}
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
static PassRefPtr<CSSValue> renderTextDecorationStyleFlagsToCSSValue(TextDecorationStyle textDecorationStyle)
{
switch (textDecorationStyle) {
......@@ -1435,9 +1438,7 @@ static PassRefPtr<CSSValue> renderTextDecorationStyleFlagsToCSSValue(TextDecorat
ASSERT_NOT_REACHED();
return cssValuePool().createExplicitInitialValue();
}
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
static PassRefPtr<CSSValue> renderTextDecorationSkipFlagsToCSSValue(TextDecorationSkip textDecorationSkip)
{
switch (textDecorationSkip) {
......@@ -2356,6 +2357,12 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
case CSSPropertyTextDecoration:
return renderTextDecorationFlagsToCSSValue(style->textDecoration());
#if ENABLE(CSS3_TEXT)
case CSSPropertyWebkitTextAlignLast:
return cssValuePool().createValue(style->textAlignLast());
case CSSPropertyWebkitTextJustify:
return cssValuePool().createValue(style->textJustify());
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecoration:
return getCSSPropertyValuesForShorthandProperties(webkitTextDecorationShorthand());
case CSSPropertyWebkitTextDecorationLine:
......@@ -2364,16 +2371,10 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
case CSSPropertyWebkitTextDecorationColor:
return currentColorOrValidColor(style.get(), style->textDecorationColor());
case CSSPropertyWebkitTextAlignLast:
return cssValuePool().createValue(style->textAlignLast());
case CSSPropertyWebkitTextJustify:
return cssValuePool().createValue(style->textJustify());
case CSSPropertyWebkitTextUnderlinePosition:
return cssValuePool().createValue(style->textUnderlinePosition());
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationSkip:
return renderTextDecorationSkipFlagsToCSSValue(style->textDecorationSkip());
case CSSPropertyWebkitTextUnderlinePosition:
return cssValuePool().createValue(style->textUnderlinePosition());
#endif
case CSSPropertyWebkitTextDecorationsInEffect:
return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
......
......@@ -519,7 +519,7 @@ static inline bool isColorPropertyID(CSSPropertyID propertyId)
case CSSPropertyWebkitBorderEndColor:
case CSSPropertyWebkitBorderStartColor:
case CSSPropertyWebkitColumnRuleColor:
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationColor:
#endif
case CSSPropertyWebkitTextEmphasisColor:
......@@ -2036,9 +2036,9 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyTextUnderlineColor:
case CSSPropertyTextOverlineColor:
case CSSPropertyWebkitColumnRuleColor:
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationColor:
#endif // CSS3_TEXT
#endif
case CSSPropertyWebkitTextEmphasisColor:
case CSSPropertyWebkitTextFillColor:
case CSSPropertyWebkitTextStrokeColor:
......@@ -2350,7 +2350,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
break;
}
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecoration:
// [ <text-decoration-line> || <text-decoration-style> || <text-decoration-color> ] | inherit
return parseShorthand(CSSPropertyWebkitTextDecoration, webkitTextDecorationShorthand(), important);
......@@ -2358,28 +2358,26 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyTextDecoration:
case CSSPropertyWebkitTextDecorationsInEffect:
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationLine:
#endif // CSS3_TEXT
#endif
// none | [ underline || overline || line-through || blink ] | inherit
return parseTextDecoration(propId, important);
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationStyle:
// solid | double | dotted | dashed | wavy
if (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDotted || id == CSSValueDashed || id == CSSValueWavy)
validPrimitive = true;
break;
case CSSPropertyWebkitTextUnderlinePosition:
// auto | alphabetic | under
return parseTextUnderlinePosition(important);
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationSkip:
// none | [ objects || spaces || ink || edges || box-decoration ]
return parseTextDecorationSkip(important);
case CSSPropertyWebkitTextUnderlinePosition:
// auto | alphabetic | under
return parseTextUnderlinePosition(important);
#endif
case CSSPropertyZoom: // normal | reset | document | <number> | <percentage> | inherit
......@@ -9697,7 +9695,7 @@ bool CSSParser::parsePerspectiveOrigin(CSSPropertyID propId, CSSPropertyID& prop
void CSSParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtr<CSSValue> value, bool important)
{
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
// The text-decoration-line property takes priority over text-decoration, unless the latter has important priority set.
if (propId == CSSPropertyTextDecoration && !important && !inShorthand()) {
for (unsigned i = 0; i < m_parsedProperties.size(); ++i) {
......@@ -9705,7 +9703,7 @@ void CSSParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtr<CSSVa
return;
}
}
#endif // CSS3_TEXT
#endif // CSS3_TEXT_DECORATION
addProperty(propId, value, important);
}
......@@ -9745,7 +9743,25 @@ bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
return false;
}
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
bool CSSParser::parseTextDecorationSkip(bool important)
{
// The text-decoration-skip property has syntax "none | [ objects || spaces || ink || edges || box-decoration ]".
// However, only 'none' and 'ink' are implemented yet, so we will parse syntax "none | ink" for now.
CSSParserValue* value = m_valueList->current();
do {
switch (value->id) {
case CSSValueNone:
case CSSValueInk:
addProperty(CSSPropertyWebkitTextDecorationSkip, cssValuePool().createIdentifierValue(value->id), important);
return true;
default:
break;
}
} while ((value = m_valueList->next()));
return false;
}
bool CSSParser::parseTextUnderlinePosition(bool important)
{
// The text-underline-position property has sintax "auto | alphabetic | [ under || [ left | right ] ]".
......@@ -9766,26 +9782,6 @@ bool CSSParser::parseTextUnderlinePosition(bool important)
}
return false;
}
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
bool CSSParser::parseTextDecorationSkip(bool important)
{
// The text-decoration-skip property has syntax "none | [ objects || spaces || ink || edges || box-decoration ]".
// However, only 'none' and 'ink' are implemented yet, so we will parse syntax "none | ink" for now.
CSSParserValue* value = m_valueList->current();
do {
switch (value->id) {
case CSSValueNone:
case CSSValueInk:
addProperty(CSSPropertyWebkitTextDecorationSkip, cssValuePool().createIdentifierValue(value->id), important);
return true;
default:
break;
}
} while ((value = m_valueList->next()));
return false;
}
#endif // CSS3_TEXT_DECORATION
bool CSSParser::parseTextEmphasisStyle(bool important)
......
......@@ -281,11 +281,9 @@ public:
void addTextDecorationProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important);
bool parseTextDecoration(CSSPropertyID propId, bool important);
#if ENABLE(CSS3_TEXT)
bool parseTextUnderlinePosition(bool important);
#endif
#if ENABLE(CSS3_TEXT_DECORATION)
bool parseTextDecorationSkip(bool important);
bool parseTextUnderlinePosition(bool important);
#endif
PassRefPtr<CSSValue> parseTextIndent();
......
......@@ -2631,7 +2631,7 @@ template<> inline CSSPrimitiveValue::operator TextDecoration() const
return TextDecorationNone;
}
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
template<> inline CSSPrimitiveValue::operator TextDecorationStyle() const
{
ASSERT(isValueID());
......@@ -2694,7 +2694,7 @@ template<> inline CSSPrimitiveValue::operator TextUnderlinePosition() const
ASSERT_NOT_REACHED();
return TextUnderlinePositionAuto;
}
#endif // CSS3_TEXT
#endif // CSS3_TEXT_DECORATION
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextSecurity e)
: CSSValue(PrimitiveClass)
......
......@@ -386,16 +386,16 @@ z-index
-webkit-text-combine [Inherited]
-epub-text-combine = -webkit-text-combine
#if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT
-webkit-text-decoration
-webkit-text-decoration-line
-webkit-text-decoration-style
-webkit-text-decoration-color
-webkit-text-align-last [Inherited]
-webkit-text-justify [Inherited]
-webkit-text-underline-position [Inherited]
#endif
#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
-webkit-text-decoration
-webkit-text-decoration-line
-webkit-text-decoration-style
-webkit-text-decoration-color
-webkit-text-decoration-skip [Inherited]
-webkit-text-underline-position [Inherited]
#endif
-webkit-text-decorations-in-effect [Inherited]
-webkit-text-emphasis [Inherited]
......
......@@ -467,10 +467,8 @@ static
thick
thin
underline
#if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT
wavy
#endif
#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
wavy
ink
#endif
-webkit-nowrap
......
......@@ -1396,7 +1396,7 @@ public:
}
};
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
class ApplyPropertyTextUnderlinePosition {
public:
static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
......@@ -1423,7 +1423,7 @@ public:
return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
}
};
#endif // CSS3_TEXT
#endif // CSS3_TEXT_DECORATION
class ApplyPropertyLineHeight {
public:
......@@ -2306,15 +2306,15 @@ DeprecatedStyleBuilder::DeprecatedStyleBuilder()
setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler());
setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler());
#if ENABLE(CSS3_TEXT)
setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor, &RenderStyle::color>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<TextAlignLast, &RenderStyle::textAlignLast, TextAlignLast, &RenderStyle::setTextAlignLast, TextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextJustify, ApplyPropertyDefault<TextJustify, &RenderStyle::textJustify, TextJustify, &RenderStyle::setTextJustify, TextJustify, &RenderStyle::initialTextJustify>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextUnderlinePosition, ApplyPropertyTextUnderlinePosition::createHandler());
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor, &RenderStyle::color>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextDecorationSkip, ApplyPropertyTextDecorationSkip::createHandler());
setPropertyHandler(CSSPropertyWebkitTextUnderlinePosition, ApplyPropertyTextUnderlinePosition::createHandler());
#endif
setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyTextIndent::createHandler());
setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
......
......@@ -424,7 +424,7 @@ StylePropertyShorthand webkitMaskRepeatShorthand()
return StylePropertyShorthand(CSSPropertyWebkitMaskRepeat, maskRepeatProperties, WTF_ARRAY_LENGTH(maskRepeatProperties));
}
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
StylePropertyShorthand webkitTextDecorationShorthand()
{
static const CSSPropertyID textDecorationProperties[] = {
......@@ -580,7 +580,7 @@ StylePropertyShorthand shorthandForProperty(CSSPropertyID propertyID)
return webkitTransitionShorthand();
case CSSPropertyWebkitTransformOrigin:
return webkitTransformOriginShorthand();
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecoration:
return webkitTextDecorationShorthand();
#endif
......@@ -802,7 +802,7 @@ Vector<StylePropertyShorthand> matchingShorthandsForLonghand(CSSPropertyID prope
case CSSPropertyMinHeight:
case CSSPropertyMaxHeight:
return makeVector(heightShorthand());
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationLine:
case CSSPropertyWebkitTextDecorationStyle:
case CSSPropertyWebkitTextDecorationColor:
......
......@@ -113,7 +113,7 @@ StylePropertyShorthand webkitTransitionShorthand();
StylePropertyShorthand webkitTransformOriginShorthand();
StylePropertyShorthand widthShorthand();
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
StylePropertyShorthand webkitTextDecorationShorthand();
#endif
......
......@@ -1796,9 +1796,9 @@ inline bool isValidVisitedLinkProperty(CSSPropertyID id)
case CSSPropertyColor:
case CSSPropertyOutlineColor:
case CSSPropertyWebkitColumnRuleColor:
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationColor:
#endif // CSS3_TEXT
#endif
case CSSPropertyWebkitTextEmphasisColor:
case CSSPropertyWebkitTextFillColor:
case CSSPropertyWebkitTextStrokeColor:
......@@ -3042,15 +3042,15 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
case CSSPropertyWebkitRubyPosition:
case CSSPropertyWebkitTextCombine:
#if ENABLE(CSS3_TEXT)
case CSSPropertyWebkitTextDecorationLine:
case CSSPropertyWebkitTextDecorationStyle:
case CSSPropertyWebkitTextDecorationColor:
case CSSPropertyWebkitTextAlignLast:
case CSSPropertyWebkitTextJustify:
case CSSPropertyWebkitTextUnderlinePosition:
#endif // CSS3_TEXT
#if ENABLE(CSS3_TEXT_DECORATION)
case CSSPropertyWebkitTextDecorationLine:
case CSSPropertyWebkitTextDecorationStyle:
case CSSPropertyWebkitTextDecorationColor:
case CSSPropertyWebkitTextDecorationSkip:
case CSSPropertyWebkitTextUnderlinePosition:
#endif
case CSSPropertyWebkitTextEmphasisColor:
case CSSPropertyWebkitTextEmphasisPosition:
......
......@@ -105,10 +105,10 @@ namespace WebCore {
SolidStroke,
DottedStroke,
DashedStroke,
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
DoubleStroke,
WavyStroke,
#endif // CSS3_TEXT
#endif // CSS3_TEXT_DECORATION
};
enum InterpolationQuality {
......
......@@ -747,10 +747,10 @@ void GraphicsContext::setPlatformStrokeStyle(StrokeStyle strokeStyle)
cairo_set_line_width(platformContext()->cr(), 0);
break;
case SolidStroke:
#if ENABLE(CSS3_TEXT)
#if ENABLE(CSS3_TEXT_DECORATION)
case DoubleStroke:
case WavyStroke: // FIXME: https://bugs.webkit.org/show_bug.cgi?id=94110 - Needs platform support.
#endif // CSS3_TEXT
#endif // CSS3_TEXT_DECORATION
cairo_set_dash(platformContext()->cr(), 0, 0, 0);