LibWebView: Add style invalidation counter dump option

Add --dump-style-invalidation-counters=N to Ladybird and propagate it
to WebContent helper processes.

When enabled, WebContent dumps the current document style invalidation
counters with dbgln() after every N recorded style invalidations. This
makes it possible to collect the counters while browsing without adding
temporary C++ logging.
This commit is contained in:
Andreas Kling
2026-04-29 19:34:24 +02:00
committed by Alexander Kalenik
parent f785e13ae9
commit c919f1c28f
Notes: github-actions[bot] 2026-04-29 22:25:29 +00:00
8 changed files with 100 additions and 3 deletions

View File

@@ -130,6 +130,10 @@ static ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_proc
arguments.append("--default-time-zone");
arguments.append(web_content_options.default_time_zone.value());
}
if (web_content_options.style_invalidation_counter_dump_interval.has_value()) {
arguments.append("--dump-style-invalidation-counters"sv);
arguments.append(ByteString::number(*web_content_options.style_invalidation_counter_dump_interval));
}
if (auto server = mach_server_name(); server.has_value()) {
arguments.append("--mach-server-name"sv);