diff --git a/Tests/LibWeb/Text/expected/css/replace-calc-function-with-same-kind-but-fewer-arguments.txt b/Tests/LibWeb/Text/expected/css/replace-calc-function-with-same-kind-but-fewer-arguments.txt new file mode 100644 index 0000000000..1c2cf4d94a --- /dev/null +++ b/Tests/LibWeb/Text/expected/css/replace-calc-function-with-same-kind-but-fewer-arguments.txt @@ -0,0 +1 @@ +PASS! (didn't crash) \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/css/replace-calc-function-with-same-kind-but-fewer-arguments.html b/Tests/LibWeb/Text/input/css/replace-calc-function-with-same-kind-but-fewer-arguments.html new file mode 100644 index 0000000000..b297b92f8e --- /dev/null +++ b/Tests/LibWeb/Text/input/css/replace-calc-function-with-same-kind-but-fewer-arguments.html @@ -0,0 +1,13 @@ +
PASS! (didn't crash) diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp index cffe10e09b..7733e4e9bf 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp @@ -372,6 +372,8 @@ bool SumCalculationNode::equals(CalculationNode const& other) const return true; if (type() != other.type()) return false; + if (m_values.size() != static_cast