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

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

Issue 2520873002: [css-ui] Add support for caret-color property (Closed)
Patch Set: Patch for landing applying suggested changes Created 4 years 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 a88aa09eb673ebed99c822e09b94e6bea910bead..68faf93e8a7a5fb61e09a52c02a32e629825e2e9 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1130,7 +1130,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();
}
}
@@ -2074,6 +2078,14 @@ Color ComputedStyle::colorIncludingFallback(int colorProperty,
visitedLink ? visitedLinkBorderBottomColor() : borderBottomColor();
borderStyle = borderBottomStyle();
break;
+ case CSSPropertyCaretColor: {
+ StyleAutoColor autoColor =
+ visitedLink ? visitedLinkCaretColor() : caretColor();
+ // TODO(rego): We may want to adjust the caret color if it's the same than
+ // the background to ensure good visibility and contrast.
+ result = autoColor.toStyleColor();
+ break;
+ }
case CSSPropertyColor:
result = visitedLink ? visitedLinkColor() : color();
break;
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleRareInheritedData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698