summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-05 19:01:12 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-05 22:50:39 +0100
commit270aa9e5d074a5c77b4b24fe553edbc3c6c554d8 (patch)
tree55b02f688ee36e13da02a2b0c8768b56697e2638 /Userland/Services
parente2c71b67253fa90a59fdb93b4b2aecf1bed561e9 (diff)
downloadserenity-270aa9e5d074a5c77b4b24fe553edbc3c6c554d8.zip
Browser: Add Debug menu action for dumping the stacking context tree
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/WebContent/ClientConnection.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/ClientConnection.cpp b/Userland/Services/WebContent/ClientConnection.cpp
index 75dd46a519..33bc6be0de 100644
--- a/Userland/Services/WebContent/ClientConnection.cpp
+++ b/Userland/Services/WebContent/ClientConnection.cpp
@@ -183,6 +183,15 @@ void ClientConnection::debug_request(const String& request, const String& argume
}
}
+ if (request == "dump-stacking-context-tree") {
+ if (auto* doc = page().top_level_browsing_context().active_document()) {
+ if (auto* icb = doc->layout_node()) {
+ if (auto* stacking_context = icb->stacking_context())
+ stacking_context->dump();
+ }
+ }
+ }
+
if (request == "dump-style-sheets") {
if (auto* doc = page().top_level_browsing_context().active_document()) {
for (auto& sheet : doc->style_sheets().sheets()) {