mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-27 03:10:01 +00:00
LibWeb/CSS: Implement the caret-color
property
This commit is contained in:
parent
bf15b7ac12
commit
88d35c547c
Notes:
github-actions[bot]
2025-03-09 18:37:22 +00:00
Author: https://github.com/tcl3
Commit: 88d35c547c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3876
16 changed files with 381 additions and 218 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue