Skip to content

Commit

Permalink
LibWeb: Small improvements to layout tree dumps
Browse files Browse the repository at this point in the history
- Say "content-size" instead of just "size" to clarify which size it is
- Show box model metrics by default
  • Loading branch information
awesomekling committed Mar 3, 2022
1 parent ae25916 commit ed44f9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/Dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
if (interactive)
builder.appendff("@{:p} ", &layout_node);

builder.appendff("at ({},{}) size {}x{}",
builder.appendff("at ({},{}) content-size {}x{}",
box.absolute_x(),
box.absolute_y(),
box.content_width(),
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/Dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Web {
void dump_tree(StringBuilder&, DOM::Node const&);
void dump_tree(DOM::Node const&);
void dump_tree(StringBuilder&, Layout::Node const&, bool show_box_model = false, bool show_specified_style = false, bool colorize = false);
void dump_tree(Layout::Node const&, bool show_box_model = false, bool show_specified_style = false);
void dump_tree(Layout::Node const&, bool show_box_model = true, bool show_specified_style = false);
void dump_sheet(StringBuilder&, CSS::StyleSheet const&);
void dump_sheet(CSS::StyleSheet const&);
void dump_rule(StringBuilder&, CSS::CSSRule const&, int indent_levels = 0);
Expand Down

0 comments on commit ed44f9e

Please sign in to comment.