test-web: Dump stacking context tree in layout test output

This will allow us to test (and catch regressions in) stacking context
tree construction and updates, etc.
This commit is contained in:
Andreas Kling 2025-07-06 14:45:04 +02:00 committed by Andreas Kling
commit dab1fd265d
Notes: github-actions[bot] 2025-07-09 12:38:27 +00:00
776 changed files with 2365 additions and 9 deletions

View file

@ -460,9 +460,8 @@ TraversalDecision StackingContext::hit_test(CSSPixelPoint position, HitTestType
return TraversalDecision::Continue;
}
void StackingContext::dump(int indent) const
void StackingContext::dump(StringBuilder& builder, int indent) const
{
StringBuilder builder;
for (int i = 0; i < indent; ++i)
builder.append(' ');
CSSPixelRect rect = paintable_box().absolute_rect();
@ -478,9 +477,9 @@ void StackingContext::dump(int indent) const
if (!affine_transform.is_identity()) {
builder.appendff(", transform: {}", affine_transform);
}
dbgln("{}", builder.string_view());
builder.append('\n');
for (auto& child : m_children)
child->dump(indent + 1);
child->dump(builder, indent + 1);
}
}