Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2520873002: [css-ui] Add support for caret-color property (Closed)
Patch Set: Fix tests that were listing all the CSS properties Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index c45ebe126090d8488234a29ce3e6f6f678725ff6..d53fa3889c44a20934d904b71d37e6bcbbbcb945 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1131,7 +1131,11 @@ void ComputedStyle::updatePropertySpecificDifferences(
m_rareInheritedData->m_textDecorationSkip !=
other.m_rareInheritedData->m_textDecorationSkip ||
m_rareInheritedData->appliedTextDecorations !=
- other.m_rareInheritedData->appliedTextDecorations)) {
+ other.m_rareInheritedData->appliedTextDecorations ||
+ m_rareInheritedData->caretColor() !=
+ other.m_rareInheritedData->caretColor() ||
+ m_rareInheritedData->visitedLinkCaretColor() !=
+ other.m_rareInheritedData->visitedLinkCaretColor())) {
diff.setTextDecorationOrColorChanged();
}
}
@@ -2075,6 +2079,11 @@ Color ComputedStyle::colorIncludingFallback(int colorProperty,
visitedLink ? visitedLinkBorderBottomColor() : borderBottomColor();
borderStyle = borderBottomStyle();
break;
+ case CSSPropertyCaretColor:
+ result = visitedLink ? visitedLinkCaretColor() : caretColor();
+ if (result.isAutoColor())
Timothy Loh 2016/11/22 02:17:35 Maybe this logic for resolving auto is better in p
Manuel Rego 2016/11/22 09:36:01 If we don't do this here, we need to modify the if
+ result = StyleColor::currentColor();
yosin_UTC9 2016/11/22 02:25:10 Could you add TODO for improving "auto" color hand
Manuel Rego 2016/11/22 09:36:01 Sure that would allow us to pass: caret-color-006.
+ break;
case CSSPropertyColor:
result = visitedLink ? visitedLinkColor() : color();
break;

Powered by Google App Engine
This is Rietveld 408576698