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

Unified Diff: third_party/WebKit/Source/core/style/StyleRareInheritedData.h

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/StyleRareInheritedData.h
diff --git a/third_party/WebKit/Source/core/style/StyleRareInheritedData.h b/third_party/WebKit/Source/core/style/StyleRareInheritedData.h
index e84256b4e5e8f0d8e4b1496a52afdf0e59a903f0..2bc5e622445bd8715b84d3bfb7eb9f0c19f6d00e 100644
--- a/third_party/WebKit/Source/core/style/StyleRareInheritedData.h
+++ b/third_party/WebKit/Source/core/style/StyleRareInheritedData.h
@@ -87,6 +87,13 @@ class CORE_EXPORT StyleRareInheritedData
return m_textEmphasisColorIsCurrentColor ? StyleColor::currentColor()
: StyleColor(m_textEmphasisColor);
}
+ StyleColor caretColor() const {
+ if (m_caretColorIsCurrentColor)
+ return StyleColor::currentColor();
+ if (m_caretColorIsAuto)
+ return StyleColor::autoColor();
+ return StyleColor(m_caretColor);
+ }
StyleColor visitedLinkTextStrokeColor() const {
return m_visitedLinkTextStrokeColorIsCurrentColor
? StyleColor::currentColor()
@@ -102,6 +109,13 @@ class CORE_EXPORT StyleRareInheritedData
? StyleColor::currentColor()
: StyleColor(m_visitedLinkTextEmphasisColor);
}
+ StyleColor visitedLinkCaretColor() const {
+ if (m_visitedLinkCaretColorIsCurrentColor)
+ return StyleColor::currentColor();
+ if (m_visitedLinkCaretColorIsAuto)
+ return StyleColor::autoColor();
+ return StyleColor(m_visitedLinkCaretColor);
+ }
void setTextStrokeColor(const StyleColor& color) {
m_textStrokeColor = color.resolve(Color());
@@ -115,6 +129,11 @@ class CORE_EXPORT StyleRareInheritedData
m_textEmphasisColor = color.resolve(Color());
m_textEmphasisColorIsCurrentColor = color.isCurrentColor();
}
+ void setCaretColor(const StyleColor& color) {
+ m_caretColor = color.resolve(Color());
+ m_caretColorIsCurrentColor = color.isCurrentColor();
+ m_caretColorIsAuto = color.isAutoColor();
+ }
void setVisitedLinkTextStrokeColor(const StyleColor& color) {
m_visitedLinkTextStrokeColor = color.resolve(Color());
m_visitedLinkTextStrokeColorIsCurrentColor = color.isCurrentColor();
@@ -127,15 +146,22 @@ class CORE_EXPORT StyleRareInheritedData
m_visitedLinkTextEmphasisColor = color.resolve(Color());
m_visitedLinkTextEmphasisColorIsCurrentColor = color.isCurrentColor();
}
+ void setVisitedLinkCaretColor(const StyleColor& color) {
+ m_visitedLinkCaretColor = color.resolve(Color());
+ m_visitedLinkCaretColorIsCurrentColor = color.isCurrentColor();
+ m_visitedLinkCaretColorIsAuto = color.isAutoColor();
+ }
Color m_textStrokeColor;
float textStrokeWidth;
Color m_textFillColor;
Color m_textEmphasisColor;
+ Color m_caretColor;
Color m_visitedLinkTextStrokeColor;
Color m_visitedLinkTextFillColor;
Color m_visitedLinkTextEmphasisColor;
+ Color m_visitedLinkCaretColor;
RefPtr<ShadowList>
textShadow; // Our text shadow information for shadowed text drawing.
@@ -154,9 +180,13 @@ class CORE_EXPORT StyleRareInheritedData
unsigned m_textStrokeColorIsCurrentColor : 1;
unsigned m_textFillColorIsCurrentColor : 1;
unsigned m_textEmphasisColorIsCurrentColor : 1;
+ unsigned m_caretColorIsCurrentColor : 1;
+ unsigned m_caretColorIsAuto : 1;
unsigned m_visitedLinkTextStrokeColorIsCurrentColor : 1;
unsigned m_visitedLinkTextFillColorIsCurrentColor : 1;
unsigned m_visitedLinkTextEmphasisColorIsCurrentColor : 1;
+ unsigned m_visitedLinkCaretColorIsCurrentColor : 1;
+ unsigned m_visitedLinkCaretColorIsAuto : 1;
unsigned textSecurity : 2; // ETextSecurity
unsigned userModify : 2; // EUserModify (editing)

Powered by Google App Engine
This is Rietveld 408576698