From 4ecf56cadf263406775f2a689dd1641fd14e4b5e Mon Sep 17 00:00:00 2001 From: Gingeh <39150378+Gingeh@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:29:03 +1100 Subject: [PATCH] LibWeb: Allow calculated values in css filters --- .../Screenshot/css-filter-drop-shadow.html | 1 + Tests/LibWeb/Screenshot/css-filter.html | 74 ++++++++++++++++++ .../images/css-filter-drop-shadow-ref.png | Bin 6700 -> 6701 bytes .../Screenshot/images/css-filter-ref.png | Bin 0 -> 115603 bytes .../Screenshot/reference/css-filter-ref.html | 10 +++ .../Text/expected/css/calc-coverage.txt | 16 ++-- .../Libraries/LibWeb/CSS/Parser/Parser.cpp | 63 ++++++++------- Userland/Libraries/LibWeb/CSS/Parser/Parser.h | 1 + .../StyleValues/FilterValueListStyleValue.cpp | 34 +++++--- .../StyleValues/FilterValueListStyleValue.h | 17 ++-- Userland/Libraries/LibWeb/Layout/Node.cpp | 9 ++- 11 files changed, 166 insertions(+), 59 deletions(-) create mode 100644 Tests/LibWeb/Screenshot/css-filter.html create mode 100644 Tests/LibWeb/Screenshot/images/css-filter-ref.png create mode 100644 Tests/LibWeb/Screenshot/reference/css-filter-ref.html diff --git a/Tests/LibWeb/Screenshot/css-filter-drop-shadow.html b/Tests/LibWeb/Screenshot/css-filter-drop-shadow.html index 84a285d8eb7..ef380851ac9 100644 --- a/Tests/LibWeb/Screenshot/css-filter-drop-shadow.html +++ b/Tests/LibWeb/Screenshot/css-filter-drop-shadow.html @@ -20,3 +20,4 @@
+ diff --git a/Tests/LibWeb/Screenshot/css-filter.html b/Tests/LibWeb/Screenshot/css-filter.html new file mode 100644 index 00000000000..4344a29075b --- /dev/null +++ b/Tests/LibWeb/Screenshot/css-filter.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/LibWeb/Screenshot/images/css-filter-drop-shadow-ref.png b/Tests/LibWeb/Scre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