mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb/CSS: Implement the caret-color property
This commit is contained in:
committed by
Alexander Kalenik
parent
bf15b7ac12
commit
88d35c547c
Notes:
github-actions[bot]
2025-03-09 18:37:22 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/88d35c547c4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3876
@@ -832,6 +832,18 @@ Float ComputedProperties::float_() const
|
||||
return keyword_to_float(value.to_keyword()).release_value();
|
||||
}
|
||||
|
||||
Color ComputedProperties::caret_color(Layout::NodeWithStyle const& node) const
|
||||
{
|
||||
auto const& value = property(PropertyID::CaretColor);
|
||||
if (value.is_keyword() && value.to_keyword() == Keyword::Auto)
|
||||
return node.computed_values().color();
|
||||
|
||||
if (value.has_color())
|
||||
return value.to_color(node);
|
||||
|
||||
return InitialValues::caret_color();
|
||||
}
|
||||
|
||||
Clear ComputedProperties::clear() const
|
||||
{
|
||||
auto const& value = property(PropertyID::Clear);
|
||||
|
||||
Reference in New Issue
Block a user