Implement stroke-color CSS property.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Apr 2017 08:01:51 +0000 (08:01 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Apr 2017 08:01:51 +0000 (08:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=169352

Reviewed by Jon Lee.

Source/WebCore:

Support setting text stroke color using the CSS property stroke-color, see https://drafts.fxtf.org/paint/.
Text stroke color can currently be set with the -webkit-text-stroke-color property. To make sure this still
works, I added a check to determine if the stroke-color property has been explicitly set. If it has not been
set, we fall back to the value of the -webkit-text-stroke-color property.

Tests: fast/css/stroke-color-fallback.html
       fast/css/stroke-color.html
       fast/css/visited-link-stroke-color.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueStrokeColor):
* css/StyleResolver.cpp:
(WebCore::isValidVisitedLinkProperty):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::isColorPropertyID):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
* rendering/TextDecorationPainter.cpp:
(WebCore::decorationColor):
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextPaintStyle):
(WebCore::computeTextSelectionPaintStyle):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::colorIncludingFallback):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::strokeColor):
(WebCore::RenderStyle::setStrokeColor):
(WebCore::RenderStyle::setVisitedLinkStrokeColor):
(WebCore::RenderStyle::visitedLinkStrokeColor):
(WebCore::RenderStyle::setHasExplicitlySetStrokeColor):
(WebCore::RenderStyle::hasExplicitlySetStrokeColor):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:

LayoutTests:

* fast/css/stroke-color-expected.html: Added.
* fast/css/stroke-color-fallback-expected.html: Added.
* fast/css/stroke-color-fallback.html: Added.
* fast/css/stroke-color.html: Added.
* fast/css/visited-link-stroke-color-expected.html: Added.
* fast/css/visited-link-stroke-color.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/stroke-color-expected.html [new file with mode: 0644]
LayoutTests/fast/css/stroke-color-fallback-expected.html [new file with mode: 0644]
LayoutTests/fast/css/stroke-color-fallback.html [new file with mode: 0644]
LayoutTests/fast/css/stroke-color.html [new file with mode: 0644]
LayoutTests/fast/css/visited-link-stroke-color-expected.html [new file with mode: 0644]
LayoutTests/fast/css/visited-link-stroke-color.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/css/parser/CSSPropertyParser.cpp
Source/WebCore/rendering/TextDecorationPainter.cpp
Source/WebCore/rendering/TextPaintStyle.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h

index a330041..31a9960 100644 (file)
@@ -1,3 +1,17 @@
+2017-04-12  Per Arne Vollan  <pvollan@apple.com>
+
+        Implement stroke-color CSS property.
+        https://bugs.webkit.org/show_bug.cgi?id=169352
+
+        Reviewed by Jon Lee.
+
+        * fast/css/stroke-color-expected.html: Added.
+        * fast/css/stroke-color-fallback-expected.html: Added.
+        * fast/css/stroke-color-fallback.html: Added.
+        * fast/css/stroke-color.html: Added.
+        * fast/css/visited-link-stroke-color-expected.html: Added.
+        * fast/css/visited-link-stroke-color.html: Added.
+
 2017-04-11  Youenn Fablet  <youenn@apple.com>
 
         LayoutTest webrtc/video-mute.html is a flaky failure
diff --git a/LayoutTests/fast/css/stroke-color-expected.html b/LayoutTests/fast/css/stroke-color-expected.html
new file mode 100644 (file)
index 0000000..0425687
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        div {
+            font-size: 80px;
+            color: gray;
+            text-shadow: none;
+            -webkit-text-stroke-width: 10px;
+        }
+    </style>
+</head>
+<body>
+
+<div style="-webkit-text-stroke-color: red;">&#x25fc;</div>
+<div style="-webkit-text-stroke-color: blue;">&#x25fc;</div>
+<div style="-webkit-text-stroke-color: #ff00ffff;">&#x25fc;</div>
+<div style="-webkit-text-stroke-color: #ffff00ff;">&#x25fc;</div>
+
+<div style="-webkit-text-stroke-color: red;"><span>&#x25fc;</span></div>
+<div style="-webkit-text-stroke-color: blue;"><span>&#x25fc;</span></div>
+<div style="-webkit-text-stroke-color: #ff00ffff;"><span>&#x25fc;</span></div>
+<div style="-webkit-text-stroke-color: #ffff00ff;"><span>&#x25fc;</span></div>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/css/stroke-color-fallback-expected.html b/LayoutTests/fast/css/stroke-color-fallback-expected.html
new file mode 100644 (file)
index 0000000..58b102c
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        div {
+            font-size: 80px;
+            color: gray;
+            text-shadow: none;
+            -webkit-text-stroke-width: 10px;
+        }
+    
+        stroke-color-class {
+            stroke-color: green;
+        }
+    </style>
+</head>
+<body>
+
+<div style="stroke-color: blue;">&#x25fc;</div>
+<div style="stroke-color: green;">&#x25fc;</div>
+<div style="stroke-color: green;">&#x25fc;</div>
+<div style="stroke-color: yellow;">&#x25fc;</div>
+<div style="stroke-color: green;">&#x25fc;</div>
+
+<div style="stroke-color: green;"><span>&#x25fc;</span></div>
+<div style="stroke-color: green;"><span>&#x25fc;</span></div>
+<div style="stroke-color: blue;"><span>&#x25fc;</span></div>
+<div style="stroke-color: green;"><span>&#x25fc;</span></div>
+<div style="stroke-color: green;"><span>&#x25fc;</span></div>
+
+<div style="stroke-color: green;">&#x25fc;</div>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/css/stroke-color-fallback.html b/LayoutTests/fast/css/stroke-color-fallback.html
new file mode 100644 (file)
index 0000000..d798bb7
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        div {
+            font-size: 80px;
+            color: gray;
+            text-shadow: none;
+            -webkit-text-stroke-width: 10px;
+        }
+    
+        stroke-color-class {
+            stroke-color: green;
+        }
+    </style>
+</head>
+<body>
+
+<div style="-webkit-text-stroke-color: blue;">&#x25fc;</div>
+<div style="stroke-color: green; -webkit-text-stroke-color: blue;">&#x25fc;</div>
+<div style="-webkit-text-stroke-color: blue; stroke-color: green;">&#x25fc;</div>
+<div style="-webkit-text-stroke-color: blue; stroke-color: green; stroke-color: yellow;">&#x25fc;</div>
+<div style="-webkit-text-stroke-color: blue; stroke-color: green; -webkit-text-stroke-color: red;">&#x25fc;</div>
+
+<div style="stroke-color: green;"><span style="-webkit-text-stroke-color: blue;">&#x25fc;</span></div>
+<div style="-webkit-text-stroke-color: blue;"><span style="stroke-color: green;">&#x25fc;</span></div>
+<div style="-webkit-text-stroke-color: blue;"><span>&#x25fc;</span></div>
+<div style="stroke-color: green; -webkit-text-stroke-color: blue;"><span>&#x25fc;</span></div>
+<div style="-webkit-text-stroke-color: blue; stroke-color: green;"><span>&#x25fc;</span></div>
+
+<div class="stroke-color-class" style="-webkit-text-stroke-color: blue;">&#x25fc;</div>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/css/stroke-color.html b/LayoutTests/fast/css/stroke-color.html
new file mode 100644 (file)
index 0000000..91c074f
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style>
+        div {
+            font-size: 80px;
+            color: gray;
+            text-shadow: none;
+            -webkit-text-stroke-width: 10px;
+        }
+    </style>
+</head>
+<body>
+
+<div style="stroke-color: red;">&#x25fc;</div>
+<div style="stroke-color: blue;">&#x25fc;</div>
+<div style="stroke-color: #ff00ffff;">&#x25fc;</div>
+<div style="stroke-color: #ffff00ff;">&#x25fc;</div>
+
+<div style="stroke-color: red;"><span>&#x25fc;</span></div>
+<div style="stroke-color: blue;"><span>&#x25fc;</span></div>
+<div style="stroke-color: #ff00ffff;"><span>&#x25fc;</span></div>
+<div style="stroke-color: #ffff00ff;"><span>&#x25fc;</span></div>
+
+</body>
+</html>
diff --git a/LayoutTests/fast/css/visited-link-stroke-color-expected.html b/LayoutTests/fast/css/visited-link-stroke-color-expected.html
new file mode 100644 (file)
index 0000000..3bf6c17
--- /dev/null
@@ -0,0 +1,18 @@
+<html>
+<head>
+<style>
+    a {
+        font-size: 300%;
+        -webkit-text-stroke-width: 2px;
+        -webkit-text-stroke-color: green;
+    }
+    a:visited {
+        color: red;
+        -webkit-text-stroke-color: blue;
+    }
+</style>
+</head>
+<body>
+<a href>Visited link with blue stroke color</a>
+</body>
+</html>
diff --git a/LayoutTests/fast/css/visited-link-stroke-color.html b/LayoutTests/fast/css/visited-link-stroke-color.html
new file mode 100644 (file)
index 0000000..29fd79a
--- /dev/null
@@ -0,0 +1,18 @@
+<html>
+<head>
+<style>
+    a {
+        font-size: 300%;
+        stroke-width: 2px;
+        stroke-color: green;
+    }
+    a:visited {
+        color: red;
+        stroke-color: blue;
+    }
+</style>
+</head>
+<body>
+<a href>Visited link with blue stroke color</a>
+</body>
+</html>
index 0c16232..28036f5 100644 (file)
@@ -1,3 +1,50 @@
+2017-04-12  Per Arne Vollan  <pvollan@apple.com>
+
+        Implement stroke-color CSS property.
+        https://bugs.webkit.org/show_bug.cgi?id=169352
+
+        Reviewed by Jon Lee.
+
+        Support setting text stroke color using the CSS property stroke-color, see https://drafts.fxtf.org/paint/.
+        Text stroke color can currently be set with the -webkit-text-stroke-color property. To make sure this still
+        works, I added a check to determine if the stroke-color property has been explicitly set. If it has not been
+        set, we fall back to the value of the -webkit-text-stroke-color property.
+
+        Tests: fast/css/stroke-color-fallback.html
+               fast/css/stroke-color.html
+               fast/css/visited-link-stroke-color.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSProperties.json:
+        * css/StyleBuilderCustom.h:
+        (WebCore::StyleBuilderCustom::applyValueStrokeColor):
+        * css/StyleResolver.cpp:
+        (WebCore::isValidVisitedLinkProperty):
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::isColorPropertyID):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::parseSingleValue):
+        * rendering/TextDecorationPainter.cpp:
+        (WebCore::decorationColor):
+        * rendering/TextPaintStyle.cpp:
+        (WebCore::computeTextPaintStyle):
+        (WebCore::computeTextSelectionPaintStyle):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
+        (WebCore::RenderStyle::colorIncludingFallback):
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::strokeColor):
+        (WebCore::RenderStyle::setStrokeColor):
+        (WebCore::RenderStyle::setVisitedLinkStrokeColor):
+        (WebCore::RenderStyle::visitedLinkStrokeColor):
+        (WebCore::RenderStyle::setHasExplicitlySetStrokeColor):
+        (WebCore::RenderStyle::hasExplicitlySetStrokeColor):
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+        (WebCore::StyleRareInheritedData::operator==):
+        * rendering/style/StyleRareInheritedData.h:
+
 2017-04-11  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Use the DisplayRefreshMonitor facilities
index f9a9733..419d498 100644 (file)
@@ -460,6 +460,7 @@ static const CSSPropertyID computedProperties[] = {
     CSSPropertyRx,
     CSSPropertyRy,
     CSSPropertyStroke,
+    CSSPropertyStrokeColor,
     CSSPropertyStrokeDasharray,
     CSSPropertyStrokeDashoffset,
     CSSPropertyStrokeLinecap,
@@ -3920,6 +3921,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
             return CSSPrimitiveValue::create(style->joinStyle());
         case CSSPropertyStrokeWidth:
             return zoomAdjustedPixelValueForLength(style->strokeWidth(), *style);
+        case CSSPropertyStrokeColor:
+            return currentColorOrValidColor(style, style->strokeColor());
         case CSSPropertyStrokeMiterlimit:
             return CSSPrimitiveValue::create(style->strokeMiterLimit(), CSSPrimitiveValue::CSS_NUMBER);
 
index a1931ce..2d977a3 100644 (file)
                 "url": "https://www.w3.org/TR/SVG11/painting.html#StrokeOpacityProperty"
             }
         },
+        "stroke-color": {
+            "inherited": true,
+            "codegen-properties": {
+                "custom": "Value",
+                "initial": "invalidColor",
+                "visited-link-color-support": true
+            },
+            "status": "supported",
+            "specification": {
+                "category": "css-text-fill-and-stroke",
+                "url": "https://drafts.fxtf.org/fill-stroke-3/#propdef-stroke-color"
+            }
+        },
         "stroke-width": {
             "inherited": true,
             "codegen-properties": {
index d64898d..52b95ef 100644 (file)
@@ -140,6 +140,7 @@ public:
     static void applyValueWillChange(StyleResolver&, CSSValue&);
 
     static void applyValueStrokeWidth(StyleResolver&, CSSValue&);
+    static void applyValueStrokeColor(StyleResolver&, CSSValue&);
 
 private:
     static void resetEffectiveZoom(StyleResolver&);
@@ -1788,4 +1789,14 @@ inline void StyleBuilderCustom::applyValueStrokeWidth(StyleResolver& styleResolv
     styleResolver.style()->setHasExplicitlySetStrokeWidth(true);
 }
 
+inline void StyleBuilderCustom::applyValueStrokeColor(StyleResolver& styleResolver, CSSValue& value)
+{
+    auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
+    if (styleResolver.applyPropertyToRegularStyle())
+        styleResolver.style()->setStrokeColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false));
+    if (styleResolver.applyPropertyToVisitedLinkStyle())
+        styleResolver.style()->setVisitedLinkStrokeColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true));
+    styleResolver.style()->setHasExplicitlySetStrokeColor(true);
+}
+
 } // namespace WebCore
index 4aa12d7..1abfe9b 100644 (file)
@@ -1468,6 +1468,7 @@ inline bool isValidVisitedLinkProperty(CSSPropertyID id)
     case CSSPropertyWebkitTextStrokeColor:
     case CSSPropertyFill:
     case CSSPropertyStroke:
+    case CSSPropertyStrokeColor:
         return true;
     default:
         break;
index b58560d..e224cad 100644 (file)
@@ -168,6 +168,7 @@ static inline bool isColorPropertyID(CSSPropertyID propertyId)
     case CSSPropertyOutlineColor:
     case CSSPropertyStopColor:
     case CSSPropertyStroke:
+    case CSSPropertyStrokeColor:
     case CSSPropertyWebkitBorderAfterColor:
     case CSSPropertyWebkitBorderBeforeColor:
     case CSSPropertyWebkitBorderEndColor:
index df82ad4..949f4d4 100644 (file)
@@ -4014,6 +4014,7 @@ RefPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSS
     case CSSPropertyWebkitBorderBeforeColor:
     case CSSPropertyWebkitBorderAfterColor:
     case CSSPropertyWebkitTextStrokeColor:
+    case CSSPropertyStrokeColor:
     case CSSPropertyStopColor:
     case CSSPropertyFloodColor:
     case CSSPropertyLightingColor:
index 56c109f..25254d6 100644 (file)
@@ -359,7 +359,7 @@ static Color decorationColor(const RenderStyle& style)
         return result;
     if (style.hasPositiveStrokeWidth()) {
         // Prefer stroke color if possible but not if it's fully transparent.
-        result = style.visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
+        result = style.visitedDependentColor(style.hasExplicitlySetStrokeColor() ? CSSPropertyStrokeColor :  CSSPropertyWebkitTextStrokeColor);
         if (result.isVisible())
             return result;
     }
index 8fec00c..db20ebb 100644 (file)
@@ -103,7 +103,7 @@ TextPaintStyle computeTextPaintStyle(const Frame& frame, const RenderStyle& line
     if (forceBackgroundToWhite)
         paintStyle.fillColor = adjustColorForVisibilityOnBackground(paintStyle.fillColor, Color::white);
 
-    paintStyle.strokeColor = lineStyle.visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
+    paintStyle.strokeColor = lineStyle.visitedDependentColor(lineStyle.hasExplicitlySetStrokeColor() ? CSSPropertyStrokeColor : CSSPropertyWebkitTextStrokeColor);
 
     // Make the text stroke color legible against a white background
     if (forceBackgroundToWhite)
@@ -158,7 +158,7 @@ TextPaintStyle computeTextSelectionPaintStyle(const TextPaintStyle& textPaintSty
             selectionPaintStyle.strokeWidth = strokeWidth;
         }
 
-        Color stroke = paintInfo.forceTextColor() ? paintInfo.forcedTextColor() : pseudoStyle->visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
+        Color stroke = paintInfo.forceTextColor() ? paintInfo.forcedTextColor() : pseudoStyle->visitedDependentColor(pseudoStyle->hasExplicitlySetStrokeColor() ? CSSPropertyStrokeColor : CSSPropertyWebkitTextStrokeColor);
         if (stroke != selectionPaintStyle.strokeColor) {
             if (!paintSelectedTextOnly)
                 paintSelectedTextSeparately = true;
index a215618..812a804 100644 (file)
@@ -886,7 +886,8 @@ bool RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle
         || m_rareInheritedData->textFillColor != other.m_rareInheritedData->textFillColor
         || m_rareInheritedData->textStrokeColor != other.m_rareInheritedData->textStrokeColor
         || m_rareInheritedData->textEmphasisColor != other.m_rareInheritedData->textEmphasisColor
-        || m_rareInheritedData->textEmphasisFill != other.m_rareInheritedData->textEmphasisFill)
+        || m_rareInheritedData->textEmphasisFill != other.m_rareInheritedData->textEmphasisFill
+        || m_rareInheritedData->strokeColor != other.m_rareInheritedData->strokeColor)
         return true;
 
     return false;
@@ -1755,6 +1756,9 @@ Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c
     case CSSPropertyWebkitTextStrokeColor:
         result = visitedLink ? visitedLinkTextStrokeColor() : textStrokeColor();
         break;
+    case CSSPropertyStrokeColor:
+        result = visitedLink ? visitedLinkStrokeColor() : strokeColor();
+        break;
     default:
         ASSERT_NOT_REACHED();
         break;
index b8beec2..0d99e59 100644 (file)
@@ -1268,6 +1268,13 @@ public:
     bool hasExplicitlySetStrokeWidth() const { return m_rareInheritedData->hasSetStrokeWidth; };
     bool hasPositiveStrokeWidth() const;
     
+    Color strokeColor() const { return m_rareInheritedData->strokeColor; }
+    void setStrokeColor(const Color& v)  { SET_VAR(m_rareInheritedData, strokeColor, v); }
+    void setVisitedLinkStrokeColor(const Color& v) { SET_VAR(m_rareInheritedData, visitedLinkStrokeColor, v); }
+    const Color& visitedLinkStrokeColor() const { return m_rareInheritedData->visitedLinkStrokeColor; }
+    void setHasExplicitlySetStrokeColor(bool v) { SET_VAR(m_rareInheritedData, hasSetStrokeColor, static_cast<unsigned>(v)); }
+    bool hasExplicitlySetStrokeColor() const { return m_rareInheritedData->hasSetStrokeColor; };
+    
     float strokeMiterLimit() const { return m_rareInheritedData->miterLimit; }
     void setStrokeMiterLimit(float f) { SET_VAR(m_rareInheritedData, miterLimit, f); }
     static float initialStrokeMiterLimit() { return defaultMiterLimit; }
index d38baea..14cd0fd 100644 (file)
@@ -38,7 +38,7 @@ struct GreaterThanOrSameSizeAsStyleRareInheritedData : public RefCounted<Greater
     void* styleImage;
     Color firstColor;
     float firstFloat;
-    Color colors[5];
+    Color colors[7];
     void* ownPtrs[1];
     AtomicString atomicStrings[5];
     void* refPtrs[2];
@@ -129,6 +129,7 @@ StyleRareInheritedData::StyleRareInheritedData()
     , capStyle(RenderStyle::initialCapStyle())
     , joinStyle(RenderStyle::initialJoinStyle())
     , hasSetStrokeWidth(false)
+    , hasSetStrokeColor(false)
     , strokeWidth(RenderStyle::initialOneLength())
     , miterLimit(RenderStyle::initialStrokeMiterLimit())
     , hyphenationLimitBefore(-1)
@@ -217,7 +218,10 @@ inline StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedDa
     , capStyle(o.capStyle)
     , joinStyle(o.joinStyle)
     , hasSetStrokeWidth(o.hasSetStrokeWidth)
+    , hasSetStrokeColor(o.hasSetStrokeColor)
     , strokeWidth(o.strokeWidth)
+    , strokeColor(o.strokeColor)
+    , visitedLinkStrokeColor(o.visitedLinkStrokeColor)
     , miterLimit(o.miterLimit)
     , hyphenationString(o.hyphenationString)
     , hyphenationLimitBefore(o.hyphenationLimitBefore)
@@ -329,7 +333,10 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
         && capStyle == o.capStyle
         && joinStyle == o.joinStyle
         && hasSetStrokeWidth == o.hasSetStrokeWidth
+        && hasSetStrokeColor == o.hasSetStrokeColor
         && strokeWidth == o.strokeWidth
+        && strokeColor == o.strokeColor
+        && visitedLinkStrokeColor == o.visitedLinkStrokeColor
         && miterLimit == o.miterLimit
         && customProperties == o.customProperties
         && arePointingToEqualData(listStyleImage, o.listStyleImage);
index f034ad6..87f09a9 100644 (file)
@@ -140,7 +140,10 @@ public:
     unsigned capStyle : 2; // LineCap
     unsigned joinStyle : 2; // LineJoin
     unsigned hasSetStrokeWidth : 1;
-    Length strokeWidth;    
+    unsigned hasSetStrokeColor : 1;
+    Length strokeWidth;
+    Color strokeColor;
+    Color visitedLinkStrokeColor;
     float miterLimit;
 
     AtomicString hyphenationString;