Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
index 55cf0444de026ab6d120d4a87c310dc304f9162a..8fb94596b8c6effde335059f51c0a56e5001098e 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -2207,11 +2207,13 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
case CSSPropertyCaptionSide: |
return CSSIdentifierValue::create(style.captionSide()); |
case CSSPropertyCaretColor: |
- if (style.caretColor().isCurrentColor()) |
- return CSSIdentifierValue::create(CSSValueCurrentcolor); |
- if (style.caretColor().isAutoColor()) |
- return CSSIdentifierValue::create(CSSValueAuto); |
- return CSSColorValue::create(style.caretColor().color().rgb()); |
+ return allowVisitedStyle |
+ ? CSSColorValue::create( |
+ style.visitedDependentColor(CSSPropertyCaretColor).rgb()) |
+ : currentColorOrValidColor( |
+ style, style.caretColor().isAutoColor() |
+ ? StyleColor::currentColor() |
+ : style.caretColor().toStyleColor()); |
case CSSPropertyClear: |
return CSSIdentifierValue::create(style.clear()); |
case CSSPropertyColor: |