| Differences between
and this patch
- a/Source/WebCore/ChangeLog +50 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2012-09-04  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
        Added parsing-related checks for text-decoration-color property.
29
        * css/CSSPropertyNames.in: Added '-webkit-text-decoration-color' property name.
30
        * css/StyleBuilder.cpp:
31
        (WebCore::StyleBuilder::StyleBuilder): Set property handler for text-decoration-color.
32
        * css/StyleResolver.cpp: Added switch case checks for text-decoration-color property on visited link checks and property appliance.
33
        * rendering/RenderObject.cpp:
34
        (WebCore::decorationColor):
35
        This static function shall be removed when the feature flag is no longer
36
        required, as text decoration color fallback logic should come from
37
        RenderStyle::colorIncludingFallback.
38
        * rendering/style/RenderStyle.cpp:
39
        (WebCore::RenderStyle::diff):
40
        (WebCore::RenderStyle::colorIncludingFallback):
41
        Added color fallback logic for text-decoration-color property.
42
        * rendering/style/RenderStyle.h: Added visited/non-visited text decoration color getters and setters.
43
        * rendering/style/StyleRareNonInheritedData.cpp:
44
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
45
        (WebCore::StyleRareNonInheritedData::operator==):
46
        Added visited/non-visited text decoration color variables initialization
47
        to copy constructor and operator assignment functions.
48
        * rendering/style/StyleRareNonInheritedData.h:
49
        (StyleRareNonInheritedData): Added visited/non-visited text decoration color variables here as they won't be needed regularly.
50
1
2012-09-04  Andrey Adaikin  <aandrey@chromium.org>
51
2012-09-04  Andrey Adaikin  <aandrey@chromium.org>
2
52
3
        Web Inspector: [WebGL] Bugfix: wrong texture binding target in replay for 3D textures
53
        Web Inspector: [WebGL] Bugfix: wrong texture binding target in replay for 3D textures
- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +3 lines
Lines 179-184 static const CSSPropertyID computedProperties[] = { a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec1
179
#if ENABLE(CSS3_TEXT_DECORATION)
179
#if ENABLE(CSS3_TEXT_DECORATION)
180
    CSSPropertyWebkitTextDecorationLine,
180
    CSSPropertyWebkitTextDecorationLine,
181
    CSSPropertyWebkitTextDecorationStyle,
181
    CSSPropertyWebkitTextDecorationStyle,
182
    CSSPropertyWebkitTextDecorationColor,
182
#endif // CSS3_TEXT_DECORATION
183
#endif // CSS3_TEXT_DECORATION
183
    CSSPropertyTextIndent,
184
    CSSPropertyTextIndent,
184
    CSSPropertyTextRendering,
185
    CSSPropertyTextRendering,
Lines 1971-1976 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp_sec2
1971
            return renderTextDecorationFlagsToCSSValue(style->textDecoration());
1972
            return renderTextDecorationFlagsToCSSValue(style->textDecoration());
1972
        case CSSPropertyWebkitTextDecorationStyle:
1973
        case CSSPropertyWebkitTextDecorationStyle:
1973
            return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
1974
            return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
1975
        case CSSPropertyWebkitTextDecorationColor:
1976
            return currentColorOrValidColor(style.get(), style->textDecorationColor());
1974
#endif // CSS3_TEXT_DECORATION
1977
#endif // CSS3_TEXT_DECORATION
1975
        case CSSPropertyWebkitTextDecorationsInEffect:
1978
        case CSSPropertyWebkitTextDecorationsInEffect:
1976
            return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
1979
            return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
- a/Source/WebCore/css/CSSParser.cpp +6 lines
Lines 406-411 static inline bool isColorPropertyID(CSSPropertyID propertyId) a/Source/WebCore/css/CSSParser.cpp_sec1
406
    case CSSPropertyWebkitBorderEndColor:
406
    case CSSPropertyWebkitBorderEndColor:
407
    case CSSPropertyWebkitBorderStartColor:
407
    case CSSPropertyWebkitBorderStartColor:
408
    case CSSPropertyWebkitColumnRuleColor:
408
    case CSSPropertyWebkitColumnRuleColor:
409
#if ENABLE(CSS3_TEXT_DECORATION)
410
    case CSSPropertyWebkitTextDecorationColor:
411
#endif // CSS3_TEXT_DECORATION
409
    case CSSPropertyWebkitTextEmphasisColor:
412
    case CSSPropertyWebkitTextEmphasisColor:
410
    case CSSPropertyWebkitTextFillColor:
413
    case CSSPropertyWebkitTextFillColor:
411
    case CSSPropertyWebkitTextStrokeColor:
414
    case CSSPropertyWebkitTextStrokeColor:
Lines 1886-1891 bool CSSParser::parseValue(CSSPropertyID propId, bool important) a/Source/WebCore/css/CSSParser.cpp_sec2
1886
    case CSSPropertyTextUnderlineColor:
1889
    case CSSPropertyTextUnderlineColor:
1887
    case CSSPropertyTextOverlineColor:
1890
    case CSSPropertyTextOverlineColor:
1888
    case CSSPropertyWebkitColumnRuleColor:
1891
    case CSSPropertyWebkitColumnRuleColor:
1892
#if ENABLE(CSS3_TEXT_DECORATION)
1893
    case CSSPropertyWebkitTextDecorationColor:
1894
#endif // CSS3_TEXT_DECORATION
1889
    case CSSPropertyWebkitTextEmphasisColor:
1895
    case CSSPropertyWebkitTextEmphasisColor:
1890
    case CSSPropertyWebkitTextFillColor:
1896
    case CSSPropertyWebkitTextFillColor:
1891
    case CSSPropertyWebkitTextStrokeColor:
1897
    case CSSPropertyWebkitTextStrokeColor:
- a/Source/WebCore/css/CSSProperty.cpp +1 lines
Lines 650-655 bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID) a/Source/WebCore/css/CSSProperty.cpp_sec1
650
    case CSSPropertyWebkitPerspectiveOriginY:
650
    case CSSPropertyWebkitPerspectiveOriginY:
651
#if ENABLE(CSS3_TEXT_DECORATION)
651
#if ENABLE(CSS3_TEXT_DECORATION)
652
    case CSSPropertyWebkitTextDecorationStyle:
652
    case CSSPropertyWebkitTextDecorationStyle:
653
    case CSSPropertyWebkitTextDecorationColor:
653
#endif // CSS3_TEXT_DECORATION
654
#endif // CSS3_TEXT_DECORATION
654
    case CSSPropertyWebkitTransform:
655
    case CSSPropertyWebkitTransform:
655
    case CSSPropertyWebkitTransformOrigin:
656
    case CSSPropertyWebkitTransformOrigin:
- a/Source/WebCore/css/CSSPropertyNames.in +1 lines
Lines 356-361 z-index a/Source/WebCore/css/CSSPropertyNames.in_sec1
356
#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
356
#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
357
-webkit-text-decoration-line
357
-webkit-text-decoration-line
358
-webkit-text-decoration-style
358
-webkit-text-decoration-style
359
-webkit-text-decoration-color
359
#endif
360
#endif
360
-webkit-text-decorations-in-effect
361
-webkit-text-decorations-in-effect
361
-webkit-text-emphasis
362
-webkit-text-emphasis
- a/Source/WebCore/css/StyleBuilder.cpp +1 lines
Lines 1925-1930 StyleBuilder::StyleBuilder() a/Source/WebCore/css/StyleBuilder.cpp_sec1
1925
#if ENABLE(CSS3_TEXT_DECORATION)
1925
#if ENABLE(CSS3_TEXT_DECORATION)
1926
    setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
1926
    setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
1927
    setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
1927
    setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
1928
    setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor, &RenderStyle::color>::createHandler());
1928
#endif // CSS3_TEXT_DECORATION
1929
#endif // CSS3_TEXT_DECORATION
1929
    setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
1930
    setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
1930
    setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
1931
    setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());
- a/Source/WebCore/css/StyleResolver.cpp +4 lines
Lines 3240-3245 inline bool isValidVisitedLinkProperty(CSSPropertyID id) a/Source/WebCore/css/StyleResolver.cpp_sec1
3240
    case CSSPropertyColor:
3240
    case CSSPropertyColor:
3241
    case CSSPropertyOutlineColor:
3241
    case CSSPropertyOutlineColor:
3242
    case CSSPropertyWebkitColumnRuleColor:
3242
    case CSSPropertyWebkitColumnRuleColor:
3243
#if ENABLE(CSS3_TEXT_DECORATION)
3244
    case CSSPropertyWebkitTextDecorationColor:
3245
#endif // CSS3_TEXT_DECORATION
3243
    case CSSPropertyWebkitTextEmphasisColor:
3246
    case CSSPropertyWebkitTextEmphasisColor:
3244
    case CSSPropertyWebkitTextFillColor:
3247
    case CSSPropertyWebkitTextFillColor:
3245
    case CSSPropertyWebkitTextStrokeColor:
3248
    case CSSPropertyWebkitTextStrokeColor:
Lines 4443-4448 void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value) a/Source/WebCore/css/StyleResolver.cpp_sec2
4443
#if ENABLE(CSS3_TEXT_DECORATION)
4446
#if ENABLE(CSS3_TEXT_DECORATION)
4444
    case CSSPropertyWebkitTextDecorationLine:
4447
    case CSSPropertyWebkitTextDecorationLine:
4445
    case CSSPropertyWebkitTextDecorationStyle:
4448
    case CSSPropertyWebkitTextDecorationStyle:
4449
    case CSSPropertyWebkitTextDecorationColor:
4446
#endif // CSS3_TEXT_DECORATION
4450
#endif // CSS3_TEXT_DECORATION
4447
    case CSSPropertyWebkitTextEmphasisColor:
4451
    case CSSPropertyWebkitTextEmphasisColor:
4448
    case CSSPropertyWebkitTextEmphasisPosition:
4452
    case CSSPropertyWebkitTextEmphasisPosition:
- a/Source/WebCore/rendering/RenderObject.cpp +5 lines
Lines 2688-2693 PassRefPtr<RenderStyle> RenderObject::getUncachedPseudoStyle(PseudoId pseudo, Re a/Source/WebCore/rendering/RenderObject.cpp_sec1
2688
2688
2689
static Color decorationColor(RenderStyle* style)
2689
static Color decorationColor(RenderStyle* style)
2690
{
2690
{
2691
#if ENABLE(CSS3_TEXT_DECORATION)
2692
    // Text decoration color fallbacks are handled internally.
2693
    return style->visitedDependentColor(CSSPropertyWebkitTextDecorationColor);
2694
#else
2691
    Color result;
2695
    Color result;
2692
    if (style->textStrokeWidth() > 0) {
2696
    if (style->textStrokeWidth() > 0) {
2693
        // Prefer stroke color if possible but not if it's fully transparent.
2697
        // Prefer stroke color if possible but not if it's fully transparent.
Lines 2698-2703 static Color decorationColor(RenderStyle* style) a/Source/WebCore/rendering/RenderObject.cpp_sec2
2698
    
2702
    
2699
    result = style->visitedDependentColor(CSSPropertyWebkitTextFillColor);
2703
    result = style->visitedDependentColor(CSSPropertyWebkitTextFillColor);
2700
    return result;
2704
    return result;
2705
#endif // CSS3_TEXT_DECORATION
2701
}
2706
}
2702
2707
2703
void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline,
2708
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 1361-1366 Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c a/Source/WebCore/rendering/style/RenderStyle.cpp_sec2
1361
    case CSSPropertyWebkitColumnRuleColor:
1362
    case CSSPropertyWebkitColumnRuleColor:
1362
        result = visitedLink ? rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor : columnRuleColor();
1363
        result = visitedLink ? rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor : columnRuleColor();
1363
        break;
1364
        break;
1365
#if ENABLE(CSS3_TEXT_DECORATION)
1366
    case CSSPropertyWebkitTextDecorationColor:
1367
        result = visitedLink ? rareNonInheritedData->m_visitedLinkTextDecorationColor : textDecorationColor();
1368
        break;
1369
#endif // CSS3_TEXT_DECORATION
1364
    case CSSPropertyWebkitTextEmphasisColor:
1370
    case CSSPropertyWebkitTextEmphasisColor:
1365
        result = visitedLink ? rareInheritedData->visitedLinkTextEmphasisColor : textEmphasisColor();
1371
        result = visitedLink ? rareInheritedData->visitedLinkTextEmphasisColor : textEmphasisColor();
1366
        break;
1372
        break;
Lines 1375-1380 Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c a/Source/WebCore/rendering/style/RenderStyle.cpp_sec3
1375
        break;
1381
        break;
1376
    }
1382
    }
1377
1383
1384
#if ENABLE(CSS3_TEXT_DECORATION)
1385
    // Text decoration color has a four-way fallback (text decoration color, then text stroke color
1386
    // if stroke width is non-zero or text fill color, which falls back to color if invalid.
1387
    if (colorProperty == CSSPropertyWebkitTextDecorationColor) {
1388
        if (result.alpha() && result.isValid())
1389
            return result;
1390
        if (textStrokeWidth() > 0) {
1391
            // Prefer stroke color if possible but not if it's fully transparent.
1392
            result = colorIncludingFallback(CSSPropertyWebkitTextStrokeColor, visitedLink);
1393
            if (result.alpha())
1394
                return result;
1395
        }
1396
        return colorIncludingFallback(CSSPropertyWebkitTextFillColor, visitedLink);
1397
    }
1398
#endif // CSS3_TEXT_DECORATION
1399
1378
    if (!result.isValid()) {
1400
    if (!result.isValid()) {
1379
        if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || borderStyle == RIDGE || borderStyle == GROOVE))
1401
        if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || borderStyle == RIDGE || borderStyle == GROOVE))
1380
            result.setRGB(238, 238, 238);
1402
            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 1746-1751 private: a/Source/WebCore/rendering/style/RenderStyle.h_sec2
1746
    void setVisitedLinkBorderTopColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderTopColor, v) }
1749
    void setVisitedLinkBorderTopColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkBorderTopColor, v) }
1747
    void setVisitedLinkOutlineColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkOutlineColor, v) }
1750
    void setVisitedLinkOutlineColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkOutlineColor, v) }
1748
    void setVisitedLinkColumnRuleColor(const Color& v) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v) }
1751
    void setVisitedLinkColumnRuleColor(const Color& v) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_visitedLinkColumnRuleColor, v) }
1752
#if ENABLE(CSS3_TEXT_DECORATION)
1753
    void setVisitedLinkTextDecorationColor(const Color& v) { SET_VAR(rareNonInheritedData, m_visitedLinkTextDecorationColor, v) }
1754
#endif // CSS3_TEXT_DECORATION
1749
    void setVisitedLinkTextEmphasisColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextEmphasisColor, v) }
1755
    void setVisitedLinkTextEmphasisColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextEmphasisColor, v) }
1750
    void setVisitedLinkTextFillColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextFillColor, v) }
1756
    void setVisitedLinkTextFillColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextFillColor, v) }
1751
    void setVisitedLinkTextStrokeColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextStrokeColor, v) }
1757
    void setVisitedLinkTextStrokeColor(const Color& v) { SET_VAR(rareInheritedData, visitedLinkTextStrokeColor, v) }
Lines 1795-1800 private: a/Source/WebCore/rendering/style/RenderStyle.h_sec3
1795
    Color visitedLinkBorderTopColor() const { return rareNonInheritedData->m_visitedLinkBorderTopColor; }
1801
    Color visitedLinkBorderTopColor() const { return rareNonInheritedData->m_visitedLinkBorderTopColor; }
1796
    Color visitedLinkOutlineColor() const { return rareNonInheritedData->m_visitedLinkOutlineColor; }
1802
    Color visitedLinkOutlineColor() const { return rareNonInheritedData->m_visitedLinkOutlineColor; }
1797
    Color visitedLinkColumnRuleColor() const { return rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor; }
1803
    Color visitedLinkColumnRuleColor() const { return rareNonInheritedData->m_multiCol->m_visitedLinkColumnRuleColor; }
1804
#if ENABLE(CSS3_TEXT_DECORATION)
1805
    Color textDecorationColor() const { return rareNonInheritedData->m_textDecorationColor; }
1806
    Color visitedLinkTextDecorationColor() const { return rareNonInheritedData->m_visitedLinkTextDecorationColor; }
1807
#endif // CSS3_TEXT_DECORATION
1798
    Color visitedLinkTextEmphasisColor() const { return rareInheritedData->visitedLinkTextEmphasisColor; }
1808
    Color visitedLinkTextEmphasisColor() const { return rareInheritedData->visitedLinkTextEmphasisColor; }
1799
    Color visitedLinkTextFillColor() const { return rareInheritedData->visitedLinkTextFillColor; }
1809
    Color visitedLinkTextFillColor() const { return rareInheritedData->visitedLinkTextFillColor; }
1800
    Color visitedLinkTextStrokeColor() const { return rareInheritedData->visitedLinkTextStrokeColor; }
1810
    Color visitedLinkTextStrokeColor() const { return rareInheritedData->visitedLinkTextStrokeColor; }
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp +8 lines
Lines 120-125 StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec1
120
    , m_wrapMargin(o.m_wrapMargin)
120
    , m_wrapMargin(o.m_wrapMargin)
121
    , m_wrapPadding(o.m_wrapPadding)
121
    , m_wrapPadding(o.m_wrapPadding)
122
    , m_clipPath(o.m_clipPath)
122
    , m_clipPath(o.m_clipPath)
123
#if ENABLE(CSS3_TEXT_DECORATION)
124
    , m_textDecorationColor(o.m_textDecorationColor)
125
    , m_visitedLinkTextDecorationColor(o.m_visitedLinkTextDecorationColor)
126
#endif // CSS3_TEXT_DECORATION
123
    , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
127
    , m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
124
    , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
128
    , m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
125
    , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
129
    , m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
Lines 202-207 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp_sec2
202
        && m_wrapMargin == o.m_wrapMargin
206
        && m_wrapMargin == o.m_wrapMargin
203
        && m_wrapPadding == o.m_wrapPadding
207
        && m_wrapPadding == o.m_wrapPadding
204
        && m_clipPath == o.m_clipPath
208
        && m_clipPath == o.m_clipPath
209
#if ENABLE(CSS3_TEXT_DECORATION)
210
        && m_textDecorationColor == o.m_textDecorationColor
211
        && m_visitedLinkTextDecorationColor == o.m_visitedLinkTextDecorationColor
212
#endif // CSS3_TEXT_DECORATION
205
        && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
213
        && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
206
        && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
214
        && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
207
        && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
215
        && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h +4 lines
Lines 141-146 public: a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h_sec1
141
141
142
    RefPtr<BasicShape> m_clipPath;
142
    RefPtr<BasicShape> m_clipPath;
143
143
144
#if ENABLE(CSS3_TEXT_DECORATION)
145
    Color m_textDecorationColor;
146
    Color m_visitedLinkTextDecorationColor;
147
#endif // CSS3_TEXT_DECORATION
144
    Color m_visitedLinkBackgroundColor;
148
    Color m_visitedLinkBackgroundColor;
145
    Color m_visitedLinkOutlineColor;
149
    Color m_visitedLinkOutlineColor;
146
    Color m_visitedLinkBorderLeftColor;
150
    Color m_visitedLinkBorderLeftColor;
- a/LayoutTests/ChangeLog +25 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2012-09-04  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-09-04  Thiago Marcos P. Santos  <thiago.santos@intel.com>
26
2012-09-04  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2
27
3
        [EFL] Gardening of failing tests
28
        [EFL] Gardening of failing tests
- 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 'green' 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 'green':
13
PASS e.style.webkitTextDecorationColor is 'green'
14
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
15
PASS e.style.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'green'
16
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').toString() is '[object CSSPrimitiveValue]'
17
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-color').cssText is 'rgb(0, 128, 0)'
18
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 128, 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 (green):
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(0, 128, 0)'
97
PASS computedStyle.webkitTextDecorationColor is 'rgb(0, 128, 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: green !important;">hello <span id="test-ancestor">world</span></div>';
35
debug("Ancestor should not inherit 'green' 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 'green':");
40
e = document.getElementById('test-parent');
41
testValue(null, "green", "[object CSSPrimitiveValue]", "rgb(0, 128, 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 (green):")
76
e.style.color = 'green';
77
testValue("", "", null, "rgb(0, 128, 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 = 'gray';
16
                document.getElementById("test-overline").style.webkitTextDecorationColor = 'yellow';
17
                document.getElementById("test-line-through").style.webkitTextDecorationColor = 'white';
18
                document.getElementById("test-parent").style.webkitTextDecorationColor = 'green';
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 = 'green';
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
        <!-- Green text with gray underline on repaint -->
34
        <p><span class="underline" id="test-underline" style="color: green;">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 green 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 green 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 +33 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
        <div class="underline" style="color: blue;"><span style="-webkit-text-fill-color: gray;">Gray text with blue underline</span></div><br/>
18
        <div class="overline" style="color: black;"><span style="-webkit-text-fill-color: green;">Green text with black overline</span></div><br/>
19
        <div class="line-through" style="color: gold;"><span style="-webkit-text-fill-color: black;">Black text with gold line-through</span></div><br/>
20
        <div class="underline" style="color: blue;">
21
            <span class="overline" style="color: gray;">
22
                <span class="line-through" style="color: green;">
23
                    <span class="black-fill">Black text with blue underline, gray overline and green line-through</span>
24
                </span>
25
            </span>
26
        </div><br/>
27
        <div class="line-through" style="color: green;">
28
            <sub class="overline" style="color: gray;"><span class="black-fill">subscript text</span></sub>
29
            <sup class="underline" style="color: blue;"><span class="black-fill">superscript text</span></sup>
30
        </div><br/>
31
        <div class="underline" style="color: green;"><span class="transparent-fill">Transparent fill with black stroke text and green underline</span></div><br/>
32
    </body>
33
</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
            #gray-overline { text-decoration: overline; -webkit-text-decoration-color: gray; }
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: gray; -webkit-text-decoration-color: blue;">Gray 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="gray-overline">
29
                    <span id="green-line-through">Black text with blue underline, gray 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="gray-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: green;">Transparent fill with black stroke text and green underline</div><br/>
44
    </body>
45
</html>

Return to Bug 91638