mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
LibWeb: Demangle the names returned by Layout::Node::class_name()
Note that these are only used in debugging/test output so it's not performance sensitive.
This commit is contained in:
parent
730af2c524
commit
fc86717f43
3 changed files with 10 additions and 5 deletions
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/QuickSort.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/Layout/Box.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlockBox.h>
|
||||
|
@ -82,9 +83,11 @@ HitTestResult StackingContext::hit_test(const Gfx::IntPoint& position, HitTestTy
|
|||
|
||||
void StackingContext::dump(int indent) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
for (int i = 0; i < indent; ++i)
|
||||
dbgprintf(" ");
|
||||
dbgprintf("SC for %s{%s} %s [children: %zu]\n", m_box.class_name(), m_box.dom_node() ? m_box.dom_node()->node_name().characters() : "(anonymous)", m_box.absolute_rect().to_string().characters(), m_children.size());
|
||||
builder.append(' ');
|
||||
builder.appendff("SC for {}({}) {} [children: {}]", m_box.class_name(), m_box.dom_node() ? m_box.dom_node()->node_name().characters() : "(anonymous)", m_box.absolute_rect().to_string().characters(), m_children.size());
|
||||
dbgln("{}", builder.string_view());
|
||||
for (auto& child : m_children)
|
||||
child->dump(indent + 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue