| Differences between
and this patch
- a/Source/WebCore/ChangeLog +46 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2012-08-30  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2
3
        [css3-text] Add support for text-decoration-color
4
        https://bugs.webkit.org/show_bug.cgi?id=91638
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        This patch implements the CSS3's 'text-decoration-color' property, with
9
        '-webkit' prefix.
10
11
        More info about "text-decoration-color" property can be found here:
12
        http://www.w3.org/TR/css3-text/#text-decoration-color
13
14
        Mozilla implementation (using -moz prefix) is described here:
15
        https://developer.mozilla.org/en/CSS/text-decoration-color
16
17
        Tests: fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color.html
18
               fast/css3-text-decoration/repaint/repaint-text-decoration-color.html
19
               fast/css3-text-decoration/text-decoration-color.html
20
21
        * css/CSSComputedStyleDeclaration.cpp:
22
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
23
        * css/CSSParser.cpp:
24
        (WebCore::isColorPropertyID):
25
        (WebCore::CSSParser::parseValue):
26
        * css/CSSProperty.cpp:
27
        (WebCore::CSSProperty::isInheritedProperty):
28
        * css/CSSPropertyNames.in:
29
        * css/StyleBuilder.cpp:
30
        (WebCore::StyleBuilder::StyleBuilder):
31
        * css/StyleResolver.cpp:
32
        (WebCore::StyleResolver::collectMatchingRulesForList):
33
        * rendering/RenderObject.cpp:
34
        (WebCore::decorationColor):
35
        This static function shall disappear in the future, as color fallback
36
        logic should come from RenderStyle.
37
        * rendering/style/RenderStyle.cpp:
38
        (WebCore::RenderStyle::diff):
39
        (WebCore::RenderStyle::colorIncludingFallback):
40
        * rendering/style/RenderStyle.h:
41
        * rendering/style/StyleRareNonInheritedData.cpp:
42
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
43
        (WebCore::StyleRareNonInheritedData::operator==):
44
        * rendering/style/StyleRareNonInheritedData.h:
45
        (StyleRareNonInheritedData):
46
1
2012-08-28  Sukolsak Sakshuwong  <sukolsak@gmail.com>
47
2012-08-28  Sukolsak Sakshuwong  <sukolsak@gmail.com>
2
48
3
        Crash in EditingStyle::mergeStyle
49
        Crash in EditingStyle::mergeStyle
- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig -1 / +1 lines
Lines 48-54 ENABLE_CSS_COMPOSITING = ; a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig_sec1
48
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
48
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
49
ENABLE_CSS_VARIABLES = ;
49
ENABLE_CSS_VARIABLES = ;
50
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
50
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
51
ENABLE_CSS3_TEXT_DECORATION = ;
51
ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
52
ENABLE_CUSTOM_SCHEME_HANDLER = ;
52
ENABLE_CUSTOM_SCHEME_HANDLER = ;
53
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
53
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
54
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
54
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
- a/Source/WebCore/Configurations/FeatureDefines.xcconfig -1 / +1 lines
Lines 49-55 ENABLE_CSS_COMPOSITING = ; a/Source/WebCore/Configurations/FeatureDefines.xcconfig_sec1
49
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
49
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
50
ENABLE_CSS_VARIABLES = ;
50
ENABLE_CSS_VARIABLES = ;
51
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
51
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
52
ENABLE_CSS3_TEXT_DECORATION = ;
52
ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
53
ENABLE_CUSTOM_SCHEME_HANDLER = ;
53
ENABLE_CUSTOM_SCHEME_HANDLER = ;
54
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
54
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
55
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
55
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +3 lines
Lines 181-186 static const CSSPropertyID computedProperties[] = { a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec1
181
#if ENABLE(CSS3_TEXT_DECORATION)
181
#if ENABLE(CSS3_TEXT_DECORATION)
182
    CSSPropertyWebkitTextDecorationLine,
182
    CSSPropertyWebkitTextDecorationLine,
183
    CSSPropertyWebkitTextDecorationStyle,
183
    CSSPropertyWebkitTextDecorationStyle,
184
    CSSPropertyWebkitTextDecorationColor,
184
#endif // CSS3_TEXT_DECORATION
185
#endif // CSS3_TEXT_DECORATION
185
    CSSPropertyTextIndent,
186
    CSSPropertyTextIndent,
186
    CSSPropertyTextRendering,
187
    CSSPropertyTextRendering,
Lines 1960-1965 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec2
1960
            return renderTextDecorationFlagsToCSSValue(style->textDecoration());
1961
            return renderTextDecorationFlagsToCSSValue(style->textDecoration());
1961
        case CSSPropertyWebkitTextDecorationStyle:
1962
        case CSSPropertyWebkitTextDecorationStyle:
1962
            return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
1963
            return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
1964
        case CSSPropertyWebkitTextDecorationColor:
1965
            return currentColorOrValidColor(style.get(), style->textDecorationColor());
1963
#endif // CSS3_TEXT_DECORATION
1966
#endif // CSS3_TEXT_DECORATION
1964
        case CSSPropertyWebkitTextDecorationsInEffect:
1967
        case CSSPropertyWebkitTextDecorationsInEffect:
1965
            return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
1968
            return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
- a/Source/WebCore/css/CSSParser.cpp +6 lines
Lines 374-379 static inline bool isColorPropertyID(CSSPropertyID propertyId) a/Source/WebCore/css/CSSParser.cpp_sec1
374
    case CSSPropertyWebkitBorderEndColor:
374
    case CSSPropertyWebkitBorderEndColor:
375
    case CSSPropertyWebkitBorderStartColor:
375
    case CSSPropertyWebkitBorderStartColor:
376
    case CSSPropertyWebkitColumnRuleColor:
376
    case CSSPropertyWebkitColumnRuleColor:
377
#if ENABLE(CSS3_TEXT_DECORATION)
378
    case CSSPropertyWebkitTextDecorationColor:
379
#endif // CSS3_TEXT_DECORATION
377
    case CSSPropertyWebkitTextEmphasisColor:
380
    case CSSPropertyWebkitTextEmphasisColor:
378
    case CSSPropertyWebkitTextFillColor:
381
    case CSSPropertyWebkitTextFillColor:
379
    case CSSPropertyWebkitTextStrokeColor:
382
    case CSSPropertyWebkitTextStrokeColor:
Lines 1860-1865 bool CSSParser::parseValue(CSSPropertyID propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec2
1860
    case CSSPropertyTextUnderlineColor:
1863
    case CSSPropertyTextUnderlineColor:
1861
    case CSSPropertyTextOverlineColor:
1864
    case CSSPropertyTextOverlineColor:
1862
    case CSSPropertyWebkitColumnRuleColor:
1865
    case CSSPropertyWebkitColumnRuleColor:
1866
#if ENABLE(CSS3_TEXT_DECORATION)
1867
    case CSSPropertyWebkitTextDecorationColor:
1868
#endif // CSS3_TEXT_DECORATION
1863
    case CSSPropertyWebkitTextEmphasisColor:
1869
    case CSSPropertyWebkitTextEmphasisColor:
1864
    case CSSPropertyWebkitTextFillColor:
1870
    case CSSPropertyWebkitTextFillColor:
1865
    case CSSPropertyWebkitTextStrokeColor:
1871
    case CSSPropertyWebkitTextStrokeColor:
- a/Source/WebCore/css/CSSProperty.cpp +1 lines
Lines 651-656 bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID) a/Source/WebCore/css/CSSProperty.cpp_sec1
651
    case CSSPropertyWebkitPerspectiveOriginY:
651
    case CSSPropertyWebkitPerspectiveOriginY:
652
#if ENABLE(CSS3_TEXT_DECORATION)
652
#if ENABLE(CSS3_TEXT_DECORATION)
653
    case CSSPropertyWebkitTextDecorationStyle:
653
    case CSSPropertyWebkitTextDecorationStyle:
654
    case CSSPropertyWebkitTextDecorationColor:
654
#endif // CSS3_TEXT_DECORATION
655
#endif // CSS3_TEXT_DECORATION
655
    case CSSPropertyWebkitTransform:
656
    case CSSPropertyWebkitTransform:
656
    case CSSPropertyWebkitTransformOrigin:
657
    case CSSPropertyWebkitTransformOrigin:
- a/Source/WebCore/css/CSSPropertyNames.in +1 lines
Lines 357-362 z-index a/Source/WebCore/css/CSSPropertyNames.in_sec1
357
#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
357
#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
358
-webkit-text-decoration-line
358
-webkit-text-decoration-line
359
-webkit-text-decoration-style
359
-webkit-text-decoration-style
360
-webkit-text-decoration-color
360
#endif
361
#endif
361
-webkit-text-decorations-in-effect
362
-webkit-text-decorations-in-effect
362
-webkit-text-emphasis
363
-webkit-text-emphasis
- a/Source/WebCore/css/StyleBuilder.cpp +1 lines
Lines 1905-1910 StyleBuilder::StyleBuilder() a/Source/WebCore/css/StyleBuilder.cpp_sec1
1905
#if ENABLE(CSS3_TEXT_DECORATION)
1905
#if ENABLE(CSS3_TEXT_DECORATION)
1906
    setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
1906
    setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
1907
    setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
1907
    setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
1908
    setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor, &RenderStyle::color>::createHandler());
1908
#endif // CSS3_TEXT_DECORATION
1909
#endif // CSS3_TEXT_DECORATION
1909
    setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
1910
    setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
1910
    setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
1911
    setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
- a/Source/WebCore/css/StyleResolver.cpp +4 lines
Lines 3246-3251 inline bool isValidVisitedLinkProperty(CSSPropertyID id) a/Source/WebCore/css/StyleResolver.cpp_sec1
3246
    case CSSPropertyColor:
3246
    case CSSPropertyColor:
3247
    case CSSPropertyOutlineColor:
3247
    case CSSPropertyOutlineColor:
3248
    case CSSPropertyWebkitColumnRuleColor:
3248
    case CSSPropertyWebkitColumnRuleColor:
3249
#if ENABLE(CSS3_TEXT_DECORATION)
3250
    case CSSPropertyWebkitTextDecorationColor:
3251
#endif // CSS3_TEXT_DECORATION
3249
    case CSSPropertyWebkitTextEmphasisColor:
3252
    case CSSPropertyWebkitTextEmphasisColor:
3250
    case CSSPropertyWebkitTextFillColor:
3253
    case CSSPropertyWebkitTextFillColor:
3251
    case CSSPropertyWebkitTextStrokeColor:
3254
    case CSSPropertyWebkitTextStrokeColor:
Lines 4444-4449 void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value) a/Source/WebCore/css/StyleResolver.cpp_sec2
4444
#if ENABLE(CSS3_TEXT_DECORATION)
4447
#if ENABLE(CSS3_TEXT_DECORATION)
4445
    case CSSPropertyWebkitTextDecorationLine:
4448
    case CSSPropertyWebkitTextDecorationLine:
4446
    case CSSPropertyWebkitTextDecorationStyle:
4449
    case CSSPropertyWebkitTextDecorationStyle:
4450
    case CSSPropertyWebkitTextDecorationColor:
4447
#endif // CSS3_TEXT_DECORATION
4451
#endif // CSS3_TEXT_DECORATION
4448
    case CSSPropertyWebkitTextEmphasisColor:
4452
    case CSSPropertyWebkitTextEmphasisColor:
4449
    case CSSPropertyWebkitTextEmphasisPosition:
4453
    case CSSPropertyWebkitTextEmphasisPosition:
- a/Source/WebCore/rendering/RenderObject.cpp +5 lines
Lines 2690-2695 PassRefPtr<RenderStyle> RenderObject::getUncachedPseudoStyle(PseudoId pseudo, Re a/Source/WebCore/rendering/RenderObject.cpp_sec1
2690
2690
2691
static Color decorationColor(RenderStyle* style)
2691
static Color decorationColor(RenderStyle* style)
2692
{
2692
{
2693
#if ENABLE(CSS3_TEXT_DECORATION)
2694
    // Text decoration color fallbacks are handled internally.
2695
    return style->visitedDependentColor(CSSPropertyWebkitTextDecorationColor);
2696
#else
2693
    Color result;
2697
    Color result;
2694
    if (style->textStrokeWidth() > 0) {
2698
    if (style->textStrokeWidth() > 0) {
2695
        // Prefer stroke color if possible but not if it's fully transparent.
2699
        // Prefer stroke color if possible but not if it's fully transparent.
Lines 2700-2705 static Color decorationColor(RenderStyle* style) a/Source/WebCore/rendering/RenderObject.cpp_sec2
2700
    
2704
    
2701
    result = style->visitedDependentColor(CSSPropertyWebkitTextFillColor);
2705
    result = style->visitedDependentColor(CSSPropertyWebkitTextFillColor);
2702
    return result;
2706
    return result;
2707
#endif // CSS3_TEXT_DECORATION
2703
}
2708
}
2704
2709
2705
void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline,
2710
void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline,
- a/Source/WebCore/rendering/style/RenderStyle.cpp +22 lines
Lines 665-670 StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon a/Source/WebCore/rendering/style/RenderStyle.cpp_sec1
665
        || rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_borderFit
665
        || rareNonInheritedData->m_borderFit != other->rareNonInheritedData->m_borderFit
666
#if ENABLE(CSS3_TEXT_DECORATION)
666
#if ENABLE(CSS3_TEXT_DECORATION)
667
        || rareNonInheritedData->m_textDecorationStyle != other->rareNonInheritedData->m_textDecorationStyle
667
        || rareNonInheritedData->m_textDecorationStyle != other->rareNonInheritedData->m_textDecorationStyle
668
        || rareNonInheritedData->m_textDecorationColor != other->rareNonInheritedData->m_textDecorationColor
668
#endif // CSS3_TEXT_DECORATION
669
#endif // CSS3_TEXT_DECORATION
669
        || rareInheritedData->textFillColor != other->rareInheritedData->textFillColor
670
        || rareInheritedData->textFillColor != other->rareInheritedData->textFillColor
670
        || rareInheritedData->textStrokeColor != other->rareInheritedData->textStrokeColor
671
        || rareInheritedData->textStrokeColor != other->rareInheritedData->textStrokeColor
Lines 1359-1364 Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c a/Source/WebCore/rendering/style/RenderStyle.cpp_sec2
1359
    case CSSPropertyWebkitColumnRuleColor:
1360
    case CSSPropertyWebkitColumnRuleColor:
1360
        result = visitedLink ? rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor : columnRuleColor();
1361
        result = visitedLink ? rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor : columnRuleColor();
1361
        break;
1362
        break;
1363
#if ENABLE(CSS3_TEXT_DECORATION)
1364
    case CSSPropertyWebkitTextDecorationColor:
1365
        result = visitedLink ? rareNonInheritedData->m_visitedLinkTextDecorationColor : textDecorationColor();
1366
        break;
1367
#endif // CSS3_TEXT_DECORATION
1362
    case CSSPropertyWebkitTextEmphasisColor:
1368
    case CSSPropertyWebkitTextEmphasisColor:
1363
        result = visitedLink ? rareInheritedData->visitedLinkTextEmphasisColor : textEmphasisColor();
1369
        result = visitedLink ? rareInheritedData->visitedLinkTextEmphasisColor : textEmphasisColor();
1364
        break;
1370
        break;
Lines 1373-1378 Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c a/Source/WebCore/rendering/style/RenderStyle.cpp_sec3
1373
        break;
1379
        break;
1374
    }
1380
    }
1375
1381
1382
#if ENABLE(CSS3_TEXT_DECORATION)
1383
    // Text decoration color has a four-way fallback (text decoration color, then text stroke color
1384
    // if stroke width is non-zero or text fill color, which falls back to color if invalid.
1385
    if (colorProperty == CSSPropertyWebkitTextDecorationColor) {
1386
        if (result.alpha() && result.isValid())
1387
            return result;
1388
        if (textStrokeWidth() > 0) {
1389
            // Prefer stroke color if possible but not if it's fully transparent.
1390
            result = colorIncludingFallback(CSSPropertyWebkitTextStrokeColor, visitedLink);
1391
            if (result.alpha())
1392
                return result;
1393
        }
1394
        return colorIncludingFallback(CSSPropertyWebkitTextFillColor, visitedLink);
1395
    }
1396
#endif // CSS3_TEXT_DECORATION
1397
1376
    if (!result.isValid()) {
1398
    if (!result.isValid()) {
1377
        if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || borderStyle == RIDGE || borderStyle == GROOVE))
1399
        if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || borderStyle == RIDGE || borderStyle == GROOVE))
1378
            result.setRGB(238, 238, 238);
1400
            result.setRGB(238, 238, 238);
- a/Source/WebCore/rendering/style/RenderStyle.h +10 lines
Lines 1342-1347 public: a/Source/WebCore/rendering/style/RenderStyle.h_sec1
1342
    void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); }
1342
    void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); }
1343
    void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
1343
    void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
1344
    void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCombine, v); }
1344
    void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCombine, v); }
1345
#if ENABLE(CSS3_TEXT_DECORATION)
1346
    void setTextDecorationColor(const Color& c) { SET_VAR(rareNonInheritedData, m_textDecorationColor, c) }
1347
#endif // CSS3_TEXT_DECORATION
1345
    void setTextEmphasisColor(const Color& c) { SET_VAR(rareInheritedData, textEmphasisColor, c) }
1348
    void setTextEmphasisColor(const Color& c) { SET_VAR(rareInheritedData, textEmphasisColor, c) }
1346
    void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); }
1349
    void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); }
1347
    void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); }
1350
    void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(rareInheritedData, textEmphasisMark, mark); }
Lines 1737-1742 private: a/Source/WebCore/rendering/style/RenderStyle.h_sec2
1737
    void setVisitedLinkBorderTopColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderTopColor, v) }
1740
    void setVisitedLinkBorderTopColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderTopColor, v) }
1738
    void setVisitedLinkOutlineColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkOutlineColor, v) }
1741
    void setVisitedLinkOutlineColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkOutlineColor, v) }
1739
    void setVisitedLinkColumnRuleColor(const Color& v) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v) }
1742
    void setVisitedLinkColumnRuleColor(const Color& v) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v) }
1743
#if ENABLE(CSS3_TEXT_DECORATION)
1744
    void setVisitedLinkTextDecorationColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkTextDecorationColor, v) }
1745
#endif // CSS3_TEXT_DECORATION
1740
    void setVisitedLinkTextEmphasisColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextEmphasisColor, v) }
1746
    void setVisitedLinkTextEmphasisColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextEmphasisColor, v) }
1741
    void setVisitedLinkTextFillColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextFillColor, v) }
1747
    void setVisitedLinkTextFillColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextFillColor, v) }
1742
    void setVisitedLinkTextStrokeColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextStrokeColor, v) }
1748
    void setVisitedLinkTextStrokeColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextStrokeColor, v) }
Lines 1789-1794 private: a/Source/WebCore/rendering/style/RenderStyle.h_sec3
1789
    Color visitedLinkBorderTopColor() const { return rareNonInheritedData->m_visitedLinkBorderTopColor; }
1795
    Color visitedLinkBorderTopColor() const { return rareNonInheritedData->m_visitedLinkBorderTopColor; }
1790
    Color visitedLinkOutlineColor() const { return rareNonInheritedData->m_visitedLinkOutlineColor; }
1796
    Color visitedLinkOutlineColor() const { return rareNonInheritedData->m_visitedLinkOutlineColor; }
1791
    Color visitedLinkColumnRuleColor() const { return rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor; }
1797
    Color visitedLinkColumnRuleColor() const { return rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor; }
1798
#if ENABLE(CSS3_TEXT_DECORATION)
1799
    Color textDecorationColor() const { return rareNonInheritedData->m_textDecorationColor; }
1800
    Color visitedLinkTextDecorationColor() const { return rareNonInheritedData->m_visitedLinkTextDecorationColor; }
1801
#endif // CSS3_TEXT_DECORATION
1792
    Color visitedLinkTextEmphasisColor() const { return rareInheritedData->visitedLinkTextEmphasisColor; }
1802
    Color visitedLinkTextEmphasisColor() const { return rareInheritedData->visitedLinkTextEmphasisColor; }
1793
    Color visitedLinkTextFillColor() const { return rareInheritedData->visitedLinkTextFillColor; }
1803
    Color visitedLinkTextFillColor() const { return rareInheritedData->visitedLinkTextFillColor; }
1794
    Color visitedLinkTextStrokeColor() const { return rareInheritedData->visitedLinkTextStrokeColor; }
1804
    Color visitedLinkTextStrokeColor() const { return rareInheritedData->visitedLinkTextStrokeColor; }
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp +8 lines
Lines 118-123 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec1
118
    , m_wrapShapeOutside(o.m_wrapShapeOutside)
118
    , m_wrapShapeOutside(o.m_wrapShapeOutside)
119
    , m_wrapMargin(o.m_wrapMargin)
119
    , m_wrapMargin(o.m_wrapMargin)
120
    , m_wrapPadding(o.m_wrapPadding)
120
    , m_wrapPadding(o.m_wrapPadding)
121
#if ENABLE(CSS3_TEXT_DECORATION)
122
    , m_textDecorationColor(o.m_textDecorationColor)
123
    , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor)
124
#endif // CSS3_TEXT_DECORATION
121
    , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
125
    , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
122
    , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
126
    , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
123
    , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
127
    , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
Lines 199-204 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec2
199
        && m_wrapShapeOutside == o.m_wrapShapeOutside
203
        && m_wrapShapeOutside == o.m_wrapShapeOutside
200
        && m_wrapMargin == o.m_wrapMargin
204
        && m_wrapMargin == o.m_wrapMargin
201
        && m_wrapPadding == o.m_wrapPadding
205
        && m_wrapPadding == o.m_wrapPadding
206
#if ENABLE(CSS3_TEXT_DECORATION)
207
        && m_textDecorationColor == o.m_textDecorationColor
208
        && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColor
209
#endif // CSS3_TEXT_DECORATION
202
        && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
210
        && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
203
        && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
211
        && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
204
        && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
212
        && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h +4 lines
Lines 139-144 public: a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec1
139
    Length m_wrapMargin;
139
    Length m_wrapMargin;
140
    Length m_wrapPadding;
140
    Length m_wrapPadding;
141
    
141
    
142
#if ENABLE(CSS3_TEXT_DECORATION)
143
    Color m_textDecorationColor;
144
    Color m_visitedLinkTextDecorationColor;
145
#endif // CSS3_TEXT_DECORATION
142
    Color m_visitedLinkBackgroundColor;
146
    Color m_visitedLinkBackgroundColor;
143
    Color m_visitedLinkOutlineColor;
147
    Color m_visitedLinkOutlineColor;
144
    Color m_visitedLinkBorderLeftColor;
148
    Color m_visitedLinkBorderLeftColor;
- a/Source/WebKit/chromium/features.gypi -1 / +1 lines
Lines 39-45 a/Source/WebKit/chromium/features.gypi_sec1
39
      'ENABLE_CHANNEL_MESSAGING=1',
39
      'ENABLE_CHANNEL_MESSAGING=1',
40
      'ENABLE_CSP_NEXT=1',
40
      'ENABLE_CSP_NEXT=1',
41
      'ENABLE_CSS3_FLEXBOX=1',
41
      'ENABLE_CSS3_FLEXBOX=1',
42
      'ENABLE_CSS3_TEXT_DECORATION=0',
42
      'ENABLE_CSS3_TEXT_DECORATION=1',
43
      'ENABLE_CSS_BOX_DECORATION_BREAK=1',
43
      'ENABLE_CSS_BOX_DECORATION_BREAK=1',
44
      'ENABLE_CSS_COMPOSITING=0',
44
      'ENABLE_CSS_COMPOSITING=0',
45
      'ENABLE_CSS_EXCLUSIONS=1',
45
      'ENABLE_CSS_EXCLUSIONS=1',
- a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig -1 / +1 lines
Lines 49-55 ENABLE_CSS_COMPOSITING = ; a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig_sec1
49
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
49
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
50
ENABLE_CSS_VARIABLES = ;
50
ENABLE_CSS_VARIABLES = ;
51
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
51
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
52
ENABLE_CSS3_TEXT_DECORATION = ;
52
ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
53
ENABLE_CUSTOM_SCHEME_HANDLER = ;
53
ENABLE_CUSTOM_SCHEME_HANDLER = ;
54
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
54
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
55
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
55
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
- a/Source/WebKit2/Configurations/FeatureDefines.xcconfig -1 / +1 lines
Lines 48-54 ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; a/Source/WebKit2/Configurations/FeatureDefines.xcconfig_sec1
48
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
48
ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
49
ENABLE_CSS_VARIABLES = ;
49
ENABLE_CSS_VARIABLES = ;
50
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
50
ENABLE_CSS3_FLEXBOX = ENABLE_CSS3_FLEXBOX;
51
ENABLE_CSS3_TEXT_DECORATION = ;
51
ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
52
ENABLE_CUSTOM_SCHEME_HANDLER = ;
52
ENABLE_CUSTOM_SCHEME_HANDLER = ;
53
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
53
ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
54
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
54
ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;
- a/Source/cmake/WebKitFeatures.cmake -1 / +1 lines
Lines 21-27 MACRO (WEBKIT_OPTION_BEGIN) a/Source/cmake/WebKitFeatures.cmake_sec1
21
    WEBKIT_OPTION_DEFINE(ENABLE_CHANNEL_MESSAGING "Toggle MessageChannel and MessagePort support" ON)
21
    WEBKIT_OPTION_DEFINE(ENABLE_CHANNEL_MESSAGING "Toggle MessageChannel and MessagePort support" ON)
22
    WEBKIT_OPTION_DEFINE(ENABLE_CSP_NEXT "Toggle Content Security Policy 1.1 support" OFF)
22
    WEBKIT_OPTION_DEFINE(ENABLE_CSP_NEXT "Toggle Content Security Policy 1.1 support" OFF)
23
    WEBKIT_OPTION_DEFINE(ENABLE_CSS3_FLEXBOX "Toggle CSS3 Flexbox support" ON)
23
    WEBKIT_OPTION_DEFINE(ENABLE_CSS3_FLEXBOX "Toggle CSS3 Flexbox support" ON)
24
    WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT_DECORATION "Toggle CSS3 Text Decoration support" OFF)
24
    WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT_DECORATION "Toggle CSS3 Text Decoration support" ON)
25
    WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration Break (CSS Backgrounds and Borders) support" ON)
25
    WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration Break (CSS Backgrounds and Borders) support" ON)
26
    WEBKIT_OPTION_DEFINE(ENABLE_CSS_COMPOSITING "Toggle CSS COMPOSITING support" OFF)
26
    WEBKIT_OPTION_DEFINE(ENABLE_CSS_COMPOSITING "Toggle CSS COMPOSITING support" OFF)
27
    WEBKIT_OPTION_DEFINE(ENABLE_CSS_EXCLUSIONS "Toggle CSS Exclusion support" OFF)
27
    WEBKIT_OPTION_DEFINE(ENABLE_CSS_EXCLUSIONS "Toggle CSS Exclusion support" OFF)
- a/Tools/Scripts/webkitperl/FeatureList.pm -1 / +1 lines
Lines 172-178 my @features = ( a/Tools/Scripts/webkitperl/FeatureList.pm_sec1
172
      define => "ENABLE_CSS3_FLEXBOX", default => 1, value => \$css3FlexboxSupport },
172
      define => "ENABLE_CSS3_FLEXBOX", default => 1, value => \$css3FlexboxSupport },
173
173
174
    { option => "css3-text-decoration", desc => "Toggle CSS3 Text Decoration support",
174
    { option => "css3-text-decoration", desc => "Toggle CSS3 Text Decoration support",
175
      define => "ENABLE_CSS3_TEXT_DECORATION", default => isEfl(), value => \$css3TextDecorationSupport },
175
      define => "ENABLE_CSS3_TEXT_DECORATION", default => 1, value => \$css3TextDecorationSupport },
176
176
177
    { option => "css-hierarchies", desc => "Toggle CSS Hierarchy support",
177
    { option => "css-hierarchies", desc => "Toggle CSS Hierarchy support",
178
      define => "ENABLE_CSS_HIERARCHIES", default => 0, value => \$cssHierarchiesSupport },
178
      define => "ENABLE_CSS_HIERARCHIES", default => 0, value => \$cssHierarchiesSupport },
- a/Tools/qmake/mkspecs/features/features.pri -1 / +1 lines
Lines 33-39 FEATURE_DEFAULTS = \ a/Tools/qmake/mkspecs/features/features.pri_sec1
33
    ENABLE_CSS_STICKY_POSITION=1 \
33
    ENABLE_CSS_STICKY_POSITION=1 \
34
    ENABLE_CSS_VARIABLES=0 \
34
    ENABLE_CSS_VARIABLES=0 \
35
    ENABLE_CSS3_FLEXBOX=1 \
35
    ENABLE_CSS3_FLEXBOX=1 \
36
    ENABLE_CSS3_TEXT_DECORATION=0 \
36
    ENABLE_CSS3_TEXT_DECORATION=1 \
37
    ENABLE_DASHBOARD_SUPPORT=0 \
37
    ENABLE_DASHBOARD_SUPPORT=0 \
38
    ENABLE_DATAGRID=0 \
38
    ENABLE_DATAGRID=0 \
39
    ENABLE_DATALIST_ELEMENT=1 \
39
    ENABLE_DATALIST_ELEMENT=1 \
- a/LayoutTests/ChangeLog +25 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2012-08-30  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2
3
        [css3-text] Add support for text-decoration-color
4
        https://bugs.webkit.org/show_bug.cgi?id=91638
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Added layout tests (paint/repaint and getComputedStyle) for
9
        'text-decoration-color' property.
10
11
        * fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color-expected.txt: Added.
12
        * fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color.html: Added.
13
        * fast/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-color.js: Added.
14
        Added getComputedStyle-based layout test covering a bunch of valid/invalid values.
15
16
        * fast/css3-text-decoration/repaint/repaint-text-decoration-color-expected.png: Added.
17
        * fast/css3-text-decoration/repaint/repaint-text-decoration-color-expected.txt: Added.
18
        * fast/css3-text-decoration/repaint/repaint-text-decoration-color.html: Added.
19
        Added cross-platform repaint layout test using 'Ahem' font. Expections
20
        generated on Chromium-linux build.
21
22
        * fast/css3-text-decoration/text-decoration-color-expected.html: Added.
23
        * fast/css3-text-decoration/text-decoration-color.html: Added.
24
        Added cross-platform reference test.
25
1
2012-08-28  Kangil Han  <kangil.han@samsung.com>
26
2012-08-28  Kangil Han  <kangil.han@samsung.com>
2
27
3
        [WK2] SVG animation pause API missing
28
        [WK2] SVG animation pause API missing
- a/LayoutTests/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color-expected.txt +102 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color-expected.txt_sec1
1
Test to make sure -webkit-text-decoration-color property returns CSSPrimitiveValue properly.
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
Ancestor should not inherit 'red' value from parent (fallback to initial value):
7
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color') is null
8
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
9
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 0)'
10
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 0, 0)'
11
12
Parent should cointain 'red':
13
PASS e.style.webkitTextDecorationColor is 'red'
14
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
15
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'red'
16
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
17
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(255, 0, 0)'
18
PASS computedStyle.webkitTextDecorationColor is 'rgb(255, 0, 0)'
19
20
JavaScript setter tests for valid, initial, invalid and blank values:
21
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color') is null
22
23
Valid value 'blue':
24
PASS e.style.webkitTextDecorationColor is 'blue'
25
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
26
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'blue'
27
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
28
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 255)'
29
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 0, 255)'
30
31
Valid value '#FFFFFF':
32
PASS e.style.webkitTextDecorationColor is 'rgb(255, 255, 255)'
33
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
34
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(255, 255, 255)'
35
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
36
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(255, 255, 255)'
37
PASS computedStyle.webkitTextDecorationColor is 'rgb(255, 255, 255)'
38
39
Valid value 'rgb(0, 255, 0)':
40
PASS e.style.webkitTextDecorationColor is 'rgb(0, 255, 0)'
41
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
42
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 255, 0)'
43
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
44
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 255, 0)'
45
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 255, 0)'
46
47
Valid value 'rgba(100, 100, 100, 0.5)':
48
PASS e.style.webkitTextDecorationColor is 'rgba(100, 100, 100, 0.498039)'
49
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
50
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgba(100, 100, 100, 0.498039)'
51
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
52
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgba(100, 100, 100, 0.498039)'
53
PASS computedStyle.webkitTextDecorationColor is 'rgba(100, 100, 100, 0.498039)'
54
55
Valid value 'hsl(240, 100%, 50%)':
56
PASS e.style.webkitTextDecorationColor is 'rgb(0, 0, 255)'
57
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
58
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 255)'
59
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
60
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 255)'
61
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 0, 255)'
62
63
Valid value 'hsla(240, 100%, 50%, 0.5)':
64
PASS e.style.webkitTextDecorationColor is 'rgba(0, 0, 255, 0.498039)'
65
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
66
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgba(0, 0, 255, 0.498039)'
67
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
68
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgba(0, 0, 255, 0.498039)'
69
PASS computedStyle.webkitTextDecorationColor is 'rgba(0, 0, 255, 0.498039)'
70
71
Initial value:
72
PASS e.style.webkitTextDecorationColor is 'initial'
73
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSValue]'
74
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'initial'
75
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
76
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 0)'
77
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 0, 0)'
78
79
Invalid value (ie. 'unknown'):
80
PASS e.style.webkitTextDecorationColor is 'initial'
81
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSValue]'
82
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'initial'
83
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
84
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 0)'
85
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 0, 0)'
86
87
Empty value (resets the property):
88
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color') is null
89
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
90
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 0, 0)'
91
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 0, 0)'
92
93
Empty value with different 'currentColor' initial value (red):
94
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color') is null
95
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
96
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(255, 0, 0)'
97
PASS computedStyle.webkitTextDecorationColor is 'rgb(255, 0, 0)'
98
99
PASS successfullyParsed is true
100
101
TEST COMPLETE
102
- a/LayoutTests/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color.html +10 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-color.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script src="../../js/resources/js-test-pre.js"></script>
5
</head>
6
<body>
7
<script src="script-tests/getComputedStyle-text-decoration-color.js"></script>
8
<script src="../../js/resources/js-test-post.js"></script>
9
</body>
10
</html>
- a/LayoutTests/fast/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-color.js +79 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-color.js_sec1
1
function testElementStyle(type, value)
2
{
3
    if (type != null) {
4
        shouldBe("e.style.webkitTextDecorationColor", "'" + value + "'");
5
        shouldBe("e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString()", "'" + type + "'");
6
        shouldBe("e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText", "'" + value + "'");
7
    } else
8
        shouldBeNull("e.style.getPropertyCSSValue('-webkit-text-decoration-color')");
9
}
10
11
function testComputedStyleValue(type, value)
12
{
13
    computedStyle = window.getComputedStyle(e, null);
14
    shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString()", "'" + type + "'");
15
    shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText", "'" + value + "'");
16
    shouldBe("computedStyle.webkitTextDecorationColor", "'" + value + "'");
17
}
18
19
function testValue(value, elementValue, elementStyle, computedValue, computedStyle)
20
{
21
    if (value != null)
22
        e.style.webkitTextDecorationColor = value;
23
    testElementStyle(elementStyle, elementValue);
24
    testComputedStyleValue(computedStyle, computedValue);
25
    debug('');
26
}
27
28
description("Test to make sure -webkit-text-decoration-color property returns CSSPrimitiveValue properly.")
29
30
var testContainer = document.createElement("div");
31
testContainer.contentEditable = true;
32
document.body.appendChild(testContainer);
33
34
testContainer.innerHTML = '<div id="test-parent" style="-webkit-text-decoration-color: red !important;">hello <span id="test-ancestor">world</span></div>';
35
debug("Ancestor should not inherit 'red' value from parent (fallback to initial value):")
36
e = document.getElementById('test-ancestor');
37
testValue(null, "", null, "rgb(0, 0, 0)", "[object CSSPrimitiveValue]");
38
39
debug("Parent should cointain 'red':");
40
e = document.getElementById('test-parent');
41
testValue(null, "red", "[object CSSPrimitiveValue]", "rgb(255, 0, 0)", "[object CSSPrimitiveValue]");
42
43
testContainer.innerHTML = '<div id="test-js">test</div>';
44
debug("JavaScript setter tests for valid, initial, invalid and blank values:");
45
e = document.getElementById('test-js');
46
shouldBeNull("e.style.getPropertyCSSValue('-webkit-text-decoration-color')");
47
48
debug("\nValid value 'blue':");
49
testValue("blue", "blue", "[object CSSPrimitiveValue]", "rgb(0, 0, 255)", "[object CSSPrimitiveValue]");
50
51
debug("Valid value '#FFFFFF':");
52
testValue("#FFFFFF", "rgb(255, 255, 255)", "[object CSSPrimitiveValue]", "rgb(255, 255, 255)", "[object CSSPrimitiveValue]");
53
54
debug("Valid value 'rgb(0, 255, 0)':");
55
testValue("rgb(0, 255, 0)", "rgb(0, 255, 0)", "[object CSSPrimitiveValue]", "rgb(0, 255, 0)", "[object CSSPrimitiveValue]");
56
57
debug("Valid value 'rgba(100, 100, 100, 0.5)':");
58
testValue("rgba(100, 100, 100, 0.5)", "rgba(100, 100, 100, 0.498039)", "[object CSSPrimitiveValue]", "rgba(100, 100, 100, 0.498039)", "[object CSSPrimitiveValue]");
59
60
debug("Valid value 'hsl(240, 100%, 50%)':");
61
testValue("hsl(240, 100%, 50%)", "rgb(0, 0, 255)", "[object CSSPrimitiveValue]", "rgb(0, 0, 255)", "[object CSSPrimitiveValue]");
62
63
debug("Valid value 'hsla(240, 100%, 50%, 0.5)':");
64
testValue("hsla(240, 100%, 50%, 0.5)", "rgba(0, 0, 255, 0.498039)", "[object CSSPrimitiveValue]", "rgba(0, 0, 255, 0.498039)", "[object CSSPrimitiveValue]");
65
66
debug("Initial value:");
67
testValue("initial", "initial", "[object CSSValue]", "rgb(0, 0, 0)", "[object CSSPrimitiveValue]");
68
69
debug("Invalid value (ie. 'unknown'):");
70
testValue("unknown", "initial", "[object CSSValue]", "rgb(0, 0, 0)", "[object CSSPrimitiveValue]");
71
72
debug("Empty value (resets the property):");
73
testValue("", "", null, "rgb(0, 0, 0)", "[object CSSPrimitiveValue]");
74
75
debug("Empty value with different 'currentColor' initial value (red):")
76
e.style.color = 'red';
77
testValue("", "", null, "rgb(255, 0, 0)", "[object CSSPrimitiveValue]");
78
79
document.body.removeChild(testContainer);
- a/LayoutTests/fast/css3-text-decoration/repaint/repaint-text-decoration-color-expected.txt +9 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/repaint/repaint-text-decoration-color-expected.txt_sec1
1
lorem ipsum ipsum ipsum
2
3
lorem ipsum ipsum ipsum
4
5
lorem ipsum ipsum ipsum
6
7
lorem ipsum ipsum ipsum
8
9
lorem ipsum
- a/LayoutTests/fast/css3-text-decoration/repaint/repaint-text-decoration-color.html +48 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/repaint/repaint-text-decoration-color.html_sec1
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <!-- Bugzilla link: http://webkit.org/b/91638 -->
5
        <title>CSS Test: CSS3 text-decoration-color repaint</title>
6
        <link rel="help" href="http://http://dev.w3.org/csswg/css3-text/#text-decoration-color"/>
7
        <meta name="flags" content="ahem"/>
8
        <script>
9
            if (window.testRunner)
10
                testRunner.dumpAsText();
11
        </script>
12
        <script src="../../repaint/resources/repaint.js" type="text/javascript"></script>
13
        <script>
14
            function repaintTest() {
15
                document.getElementById("test-underline").style.webkitTextDecorationColor = 'green';
16
                document.getElementById("test-overline").style.webkitTextDecorationColor = 'yellow';
17
                document.getElementById("test-line-through").style.webkitTextDecorationColor = 'white';
18
                document.getElementById("test-parent").style.webkitTextDecorationColor = 'red';
19
                document.getElementById("test-ancestor-1").style.webkitTextDecorationColor = 'black';
20
                document.getElementById("test-ancestor-2").style.webkitTextDecorationColor = 'inherit';
21
                document.getElementById("test-mixed-1").style.webkitTextDecorationColor = 'black';
22
                document.getElementById("test-mixed-2").style.webkitTextDecorationColor = 'red';
23
                document.getElementById("test-mixed-3").style.webkitTextDecorationColor = 'blue';
24
            }
25
        </script>
26
        <style>
27
            .underline { text-decoration: underline; }
28
            .overline { text-decoration: overline; }
29
            .line-through { text-decoration: line-through; }
30
        </style>
31
    </head>
32
    <body onload="runRepaintTest();" style="font: 10px Ahem; -webkit-font-smoothing: none;">
33
        <!-- Red text with green underline on repaint -->
34
        <p><span class="underline" id="test-underline" style="color: red;">lorem ipsum <sub>ipsum</sub> <sup>ipsum</sup></span></p>
35
36
        <!-- Navy text with yellow overline on repaint -->
37
        <p><span class="overline" id="test-overline" style="color: navy;">lorem ipsum <sub>ipsum</sub> <sup>ipsum</sup></span></p>
38
39
        <!-- Black text with white line-through on repaint -->
40
        <p><span class="line-through" id="test-line-through" style="color: black;">lorem ipsum <sub>ipsum</sub> <sup>ipsum</sup></span></p>
41
42
        <!-- Parent color is grey, with red underline, first ancestor has black overline and latter has inherited text decoration color from parent on repaint -->
43
        <p><span class="underline" id="test-parent" style="color: rgb(100, 100, 100);">lorem <span class="overline" id="test-ancestor-1">ipsum</span> <span class="line-through" id="test-ancestor-2">ipsum</span> ipsum</span></p>
44
45
        <!-- Transparent text with red overline, blue line-through and black underline on repaint -->
46
        <p style="color: transparent;"><span id="test-mixed-1" class="underline"><span id="test-mixed-2" class="overline"><span id="test-mixed-3" class="line-through">lorem ipsum</span></span></span></p>
47
    </body>
48
</html>
- a/LayoutTests/fast/css3-text-decoration/text-decoration-color-expected.html +41 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/text-decoration-color-expected.html_sec1
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <!-- Bugzilla link: http://webkit.org/b/91638 -->
5
        <title>CSS Test: CSS3 text-decoration-color</title>
6
        <link rel="help" href="http://http://dev.w3.org/csswg/css3-text/#text-decoration-color"/>
7
        <style>
8
            .underline { text-decoration: underline; }
9
            .overline { text-decoration: overline; }
10
            .line-through { text-decoration: line-through; }
11
            .black-fill { -webkit-text-fill-color: black; }
12
            .transparent-fill { -webkit-text-fill-color: transparent; -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: black; }
13
        </style>
14
    </head>
15
    <body>
16
        <h3>Each line of this test should match its text decoration color description:</h3>
17
18
        <!-- Valid values for underline, overline and line-through text decoration lines -->
19
        <div class="underline" style="color: blue;"><span style="-webkit-text-fill-color: red;">Red text with blue underline</span></div><br/>
20
        <div class="overline" style="color: black;"><span style="-webkit-text-fill-color: green;">Green text with black overline</span></div><br/>
21
        <div class="line-through" style="color: gold;"><span style="-webkit-text-fill-color: black;">Black text with gold line-through</span></div><br/>
22
23
        <!-- Mix of underline, overline and line-through with different colors for each -->
24
        <div class="underline" style="color: blue;">
25
            <span class="overline" style="color: red;">
26
                <span class="line-through" style="color: green;">
27
                    <span class="black-fill">Black text with blue underline, red overline and green line-through</span>
28
                </span>
29
            </span>
30
        </div><br/>
31
32
        <!-- Test behavior on subscript and superscript text -->
33
        <div class="line-through" style="color: green;">
34
            <sub class="overline" style="color: red;"><span class="black-fill">subscript text</span></sub>
35
            <sup class="underline" style="color: blue;"><span class="black-fill">superscript text</span></sup>
36
        </div><br/>
37
38
        <!-- Test with text-fill-color and text-stroke-color values set -->
39
        <div class="underline" style="color: red;"><span class="transparent-fill">Transparent fill with black stroke text and red underline</span></div><br/>
40
    </body>
41
</html>
- a/LayoutTests/fast/css3-text-decoration/text-decoration-color.html +45 lines
Line 0 a/LayoutTests/fast/css3-text-decoration/text-decoration-color.html_sec1
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <!-- Bugzilla link: http://webkit.org/b/91638 -->
5
        <title>CSS Test: CSS3 text-decoration-color</title>
6
        <link rel="help" href="http://http://dev.w3.org/csswg/css3-text/#text-decoration-color"/>
7
        <style>
8
            .underline { text-decoration: underline; }
9
            .overline { text-decoration: overline; }
10
            .line-through { text-decoration: line-through; }
11
            #blue-underline { text-decoration: underline; -webkit-text-decoration-color: blue; }
12
            #red-overline { text-decoration: overline; -webkit-text-decoration-color: red; }
13
            #green-line-through { text-decoration: line-through; -webkit-text-decoration-color: green; }
14
            #transparent-fill { -webkit-text-fill-color: transparent; -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: black; }
15
        </style>
16
    </head>
17
    <body>
18
        <h3>Each line of this test should match its text decoration color description:</h3>
19
20
        <!-- Valid values for underline, overline and line-through text decoration lines -->
21
        <div class="underline" style="color: red; -webkit-text-decoration-color: blue;">Red text with blue underline</div><br/>
22
        <div class="overline" style="color: green; -webkit-text-decoration-color: black;">Green text with black overline</div><br/>
23
        <div class="line-through" style="-webkit-text-decoration-color: gold;">Black text with gold line-through</div><br/>
24
25
        <!-- Mix of underline, overline and line-through with different colors for each -->
26
        <div>
27
            <span id="blue-underline">
28
                <span id="red-overline">
29
                    <span id="green-line-through">Black text with blue underline, red overline and green line-through</span>
30
                </span>
31
            </span>
32
        </div><br/>
33
34
        <!-- Test behavior on subscript and superscript text -->
35
        <div>
36
            <span id="green-line-through">
37
                <sub id="red-overline">subscript text</sub>
38
                <sup id="blue-underline">superscript text</sup>
39
            </span>
40
        </div><br/>
41
42
        <!-- Test with text-fill-color and text-stroke-color values set -->
43
        <div class="underline" id="transparent-fill" style="-webkit-text-decoration-color: red;">Transparent fill with black stroke text and red underline</div><br/>
44
    </body>
45
</html>
- a/LayoutTests/platform/chromium/TestExpectations -3 lines
Lines 161-169 BUGWK85262 SKIP : fast/css/image-resolution = PASS a/LayoutTests/platform/chromium/TestExpectations_sec1
161
// CSS image-orientation is not yet enabled.
161
// CSS image-orientation is not yet enabled.
162
BUGWK89052 SKIP : fast/css/image-orientation = PASS
162
BUGWK89052 SKIP : fast/css/image-orientation = PASS
163
163
164
// CSS3 Text Decoration support is not yet enabled (needs ENABLE_CSS3_TEXT_DECORATION).
165
BUGWK58491 SKIP : fast/css3-text-decoration = PASS
166
167
// Chromium does not support smart pasting in text controls yet.
164
// Chromium does not support smart pasting in text controls yet.
168
BUGWK60830 SKIP : editing/pasteboard/smart-paste-in-text-control.html = PASS
165
BUGWK60830 SKIP : editing/pasteboard/smart-paste-in-text-control.html = PASS
169
166
- a/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops -1 / +1 lines
Lines 43-49 a/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops_sec1
43
	/>
43
	/>
44
  <UserMacro
44
  <UserMacro
45
		Name="ENABLE_CSS3_TEXT_DECORATION"
45
		Name="ENABLE_CSS3_TEXT_DECORATION"
46
		Value=""
46
		Value="ENABLE_CSS3_TEXT_DECORATION"
47
		PerformEnvironmentSet="true"
47
		PerformEnvironmentSet="true"
48
	/>
48
	/>
49
  <UserMacro
49
  <UserMacro
- a/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops -1 / +1 lines
Lines 43-49 a/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops_sec1
43
	/>
43
	/>
44
  <UserMacro
44
  <UserMacro
45
		Name="ENABLE_CSS3_TEXT_DECORATION"
45
		Name="ENABLE_CSS3_TEXT_DECORATION"
46
		Value=""
46
		Value="ENABLE_CSS3_TEXT_DECORATION"
47
		PerformEnvironmentSet="true"
47
		PerformEnvironmentSet="true"
48
	/>
48
	/>
49
  <UserMacro
49
  <UserMacro
- a/configure.ac -1 / +1 lines
Lines 1016-1022 AC_MSG_RESULT([$enable_css3_flexbox]) a/configure.ac_sec1
1016
AC_MSG_CHECKING([whether to enable CSS3 text decoration support])
1016
AC_MSG_CHECKING([whether to enable CSS3 text decoration support])
1017
AC_ARG_ENABLE(css3_text_decoration,
1017
AC_ARG_ENABLE(css3_text_decoration,
1018
              AC_HELP_STRING([--enable-css3-text-decoration],
1018
              AC_HELP_STRING([--enable-css3-text-decoration],
1019
                             [enable CSS3 text decoration support [default=no]]),
1019
                             [enable CSS3 text decoration support [default=yes]]),
1020
              [],[enable_css3_text_decoration=$enable_unstable_features])
1020
              [],[enable_css3_text_decoration=$enable_unstable_features])
1021
AC_MSG_RESULT([$enable_css3_text_decoration])
1021
AC_MSG_RESULT([$enable_css3_text_decoration])
1022
1022

Return to Bug 91638