Issue #1668 - Part 1: Implement support for caret-color property.

This CSS property allows input carets (that blinking input cursor you see in text fields), to be given a custom color. This was implemented in Firefox 53, and it was such a minor feature that no one ever missed it, but I don't see any harm in implementing this.

https://bugzilla.mozilla.org/show_bug.cgi?id=1063162
This commit is contained in:
athenian200 2020-09-29 11:31:46 -05:00 committed by roytam1
commit 33e50615d9
13 changed files with 118 additions and 11 deletions

View file

@ -4468,8 +4468,12 @@ StyleAnimationValue::ExtractComputedValue(nsCSSPropertyID aProperty,
StyleDataAtOffset<nscolor>(styleStruct, ssOffset));
return true;
case eStyleAnimType_ComplexColor: {
aComputedValue.SetComplexColorValue(
StyleDataAtOffset<StyleComplexColor>(styleStruct, ssOffset));
auto& color = StyleDataAtOffset<StyleComplexColor>(styleStruct, ssOffset);
if (color.mIsAuto) {
aComputedValue.SetAutoValue();
} else {
aComputedValue.SetComplexColorValue(color);
}
return true;
}
case eStyleAnimType_PaintServer: {
@ -4782,7 +4786,9 @@ StyleAnimationValue::SetCurrentColorValue()
void
StyleAnimationValue::SetComplexColorValue(const StyleComplexColor& aColor)
{
if (aColor.IsCurrentColor()) {
if (aColor.mIsAuto) {
SetAutoValue();
} else if (aColor.IsCurrentColor()) {
SetCurrentColorValue();
} else if (aColor.IsNumericColor()) {
SetColorValue(aColor.mColor);