diff options
Diffstat (limited to 'layout/style/nsRuleNode.cpp')
-rw-r--r-- | layout/style/nsRuleNode.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 036d97f867..66345390e5 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -1152,13 +1152,16 @@ SetComplexColor(const nsCSSValue& aValue, aResult = StyleComplexColor::CurrentColor(); } else if (unit == eCSSUnit_ComplexColor) { aResult = aValue.GetStyleComplexColorValue(); + } else if (unit == eCSSUnit_Auto) { + aResult = StyleComplexColor::Auto(); } else { + nscolor resultColor; if (!SetColor(aValue, aParentColor.mColor, aPresContext, - nullptr, aResult.mColor, aConditions)) { + nullptr, resultColor, aConditions)) { MOZ_ASSERT_UNREACHABLE("Unknown color value"); return; } - aResult.mForegroundRatio = 0; + aResult = StyleComplexColor::FromColor(resultColor); } } @@ -5210,6 +5213,14 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct, parentUI->mPointerEvents, NS_STYLE_POINTER_EVENTS_AUTO); + // caret-color: auto, color, inherit + const nsCSSValue* caretColorValue = aRuleData->ValueForCaretColor(); + SetComplexColor<eUnsetInherit>(*caretColorValue, + parentUI->mCaretColor, + StyleComplexColor::Auto(), + mPresContext, + ui->mCaretColor, conditions); + COMPUTE_END_INHERITED(UserInterface, ui) } |