LibWeb: Ignore non-element nodes when evaluating filters
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This prevents an unknown filter debug message would be printed for
comments.
This commit is contained in:
Tim Ledbetter 2025-08-08 18:44:49 +01:00 committed by Tim Ledbetter
commit b15c4cccbf
Notes: github-actions[bot] 2025-08-08 22:55:26 +00:00

View file

@ -110,10 +110,7 @@ Optional<Gfx::Filter> SVGFilterElement::gfx_filter()
return root_filter;
};
for_each_child([&](auto& node) {
if (is<DOM::Text>(node))
return IterationDecision::Continue;
for_each_child_of_type<DOM::Element>([&](auto& node) {
if (auto* flood_primitive = as_if<SVGFEFloodElement>(node)) {
root_filter = Gfx::Filter::flood(flood_primitive->flood_color(), flood_primitive->flood_opacity());
update_result_map(*flood_primitive);