mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb/CSS: Absolutize color KeywordStyleValues
These get computed to an equivalent RGBColorStyleValue. To support this, we now store the computed color-scheme on the ComputationContext when computing properties that might contain a color. This has a nice bonus of correcting the css-accent-color test's result.
This commit is contained in:
Notes:
github-actions[bot]
2026-02-06 10:32:27 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/92897a1dec7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7722 Reviewed-by: https://github.com/Calme1709
@@ -799,7 +799,8 @@ void StyleComputer::collect_animation_into(DOM::AbstractElement abstract_element
|
||||
.viewport_rect = viewport_rect(),
|
||||
.font_metrics = font_metrics,
|
||||
.root_font_metrics = m_root_element_font_metrics },
|
||||
.abstract_element = abstract_element
|
||||
.abstract_element = abstract_element,
|
||||
.color_scheme = computed_properties.color_scheme(document().page().preferred_color_scheme(), document().supported_color_schemes()),
|
||||
};
|
||||
|
||||
// NOTE: This doesn't necessarily return the specified value if we reach into computed_properties but that
|
||||
@@ -1569,7 +1570,8 @@ void StyleComputer::compute_property_values(ComputedProperties& style, Optional<
|
||||
.font_metrics = font_metrics,
|
||||
.root_font_metrics = m_root_element_font_metrics,
|
||||
},
|
||||
.abstract_element = abstract_element
|
||||
.abstract_element = abstract_element,
|
||||
.color_scheme = style.color_scheme(document().page().preferred_color_scheme(), document().supported_color_schemes())
|
||||
};
|
||||
|
||||
// NOTE: This doesn't necessarily return the specified value if we have already computed this property but that
|
||||
|
||||
Reference in New Issue
Block a user