mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
LibWeb: Move a FIXME comment where it belongs
`var()` is now handled in `expand_variables()`, so let's have the FIXME where it applies to the entire process.
This commit is contained in:
parent
733ad57f39
commit
cab8b3e180
1 changed files with 4 additions and 4 deletions
|
@ -1057,10 +1057,6 @@ bool StyleComputer::expand_variables(DOM::Element& element, Optional<CSS::Select
|
|||
|
||||
bool StyleComputer::expand_unresolved_values(DOM::Element& element, StringView property_name, Parser::TokenStream<Parser::ComponentValue>& source, Vector<Parser::ComponentValue>& dest) const
|
||||
{
|
||||
// FIXME: Do this better!
|
||||
// We build a copy of the tree of ComponentValues, with all var()s and attr()s replaced with their contents.
|
||||
// This is a very naive solution, and we could do better if the CSS Parser could accept tokens one at a time.
|
||||
|
||||
while (source.has_next_token()) {
|
||||
auto const& value = source.next_token();
|
||||
if (value.is_function()) {
|
||||
|
@ -1168,6 +1164,10 @@ NonnullRefPtr<StyleValue> StyleComputer::resolve_unresolved_style_value(DOM::Ele
|
|||
|
||||
// If the value is invalid, we fall back to `unset`: https://www.w3.org/TR/css-variables-1/#invalid-at-computed-value-time
|
||||
|
||||
// FIXME: Do this better!
|
||||
// We build a copy of the tree of ComponentValues, with all var()s and attr()s replaced with their contents.
|
||||
// This is a very naive solution, and we could do better if the CSS Parser could accept tokens one at a time.
|
||||
|
||||
Parser::TokenStream unresolved_values_without_variables_expanded { unresolved.values() };
|
||||
Vector<Parser::ComponentValue> values_with_variables_expanded;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue