mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Show iframe URLs in layout tree dumps
This commit is contained in:
parent
602f927982
commit
99ecc216d7
Notes:
sideshowbarker
2024-07-17 08:25:15 +09:00
Author: https://github.com/awesomekling
Commit: 99ecc216d7
1 changed files with 10 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/HTML/HTMLTemplateElement.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/FrameBox.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/Layout/SVGBox.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
|
@ -226,6 +227,15 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
|
|||
|
||||
builder.appendff(" children: {}", box.children_are_inline() ? "inline" : "not-inline");
|
||||
|
||||
if (is<Layout::FrameBox>(box)) {
|
||||
auto const& frame_box = static_cast<Layout::FrameBox const&>(box);
|
||||
if (auto* nested_browsing_context = frame_box.dom_node().nested_browsing_context()) {
|
||||
if (auto* document = nested_browsing_context->active_document()) {
|
||||
builder.appendff(" (url: {})", document->url());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
builder.append("\n"sv);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue