diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index e8436c87bd..a8af89d46f 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -452,14 +453,12 @@ struct MatchingDeclarations { Vector author_rules; }; -bool StyleComputer::expand_unresolved_values(DOM::Element& element, Vector const& source, Vector& dest, size_t source_start_index) const +bool StyleComputer::expand_unresolved_values(DOM::Element& element, StringView property_name, HashMap>& dependencies, Vector const& source, Vector& dest, size_t source_start_index) const { // FIXME: Do this better! // We build a copy of the tree of StyleComponentValueRules, with all var()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. - // FIXME: Handle dependency cycles. https://www.w3.org/TR/css-variables-1/#cycles - // Arbitrary large value chosen to avoid the billion-laughs attack. // https://www.w3.org/TR/css-variables-1/#long-variables const size_t MAX_VALUE_COUNT = 16384; @@ -475,6 +474,16 @@ bool StyleComputer::expand_unresolved_values(DOM::Element& element, Vector