mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
LibWeb: Output display type inline-table in layout dump
This commit is contained in:
parent
276a77f02d
commit
45e85d20b6
3 changed files with 12 additions and 3 deletions
|
@ -121,7 +121,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
|
||||||
StringView svg_box_color_on = ""sv;
|
StringView svg_box_color_on = ""sv;
|
||||||
StringView positioned_color_on = ""sv;
|
StringView positioned_color_on = ""sv;
|
||||||
StringView floating_color_on = ""sv;
|
StringView floating_color_on = ""sv;
|
||||||
StringView inline_block_color_on = ""sv;
|
StringView inline_color_on = ""sv;
|
||||||
StringView line_box_color_on = ""sv;
|
StringView line_box_color_on = ""sv;
|
||||||
StringView fragment_color_on = ""sv;
|
StringView fragment_color_on = ""sv;
|
||||||
StringView flex_color_on = ""sv;
|
StringView flex_color_on = ""sv;
|
||||||
|
@ -133,7 +133,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
|
||||||
svg_box_color_on = "\033[31m"sv;
|
svg_box_color_on = "\033[31m"sv;
|
||||||
positioned_color_on = "\033[31;1m"sv;
|
positioned_color_on = "\033[31;1m"sv;
|
||||||
floating_color_on = "\033[32;1m"sv;
|
floating_color_on = "\033[32;1m"sv;
|
||||||
inline_block_color_on = "\033[36;1m"sv;
|
inline_color_on = "\033[36;1m"sv;
|
||||||
line_box_color_on = "\033[34;1m"sv;
|
line_box_color_on = "\033[34;1m"sv;
|
||||||
fragment_color_on = "\033[35;1m"sv;
|
fragment_color_on = "\033[35;1m"sv;
|
||||||
flex_color_on = "\033[34;1m"sv;
|
flex_color_on = "\033[34;1m"sv;
|
||||||
|
@ -178,7 +178,9 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
|
||||||
if (box.is_floating())
|
if (box.is_floating())
|
||||||
builder.appendff(" {}floating{}", floating_color_on, color_off);
|
builder.appendff(" {}floating{}", floating_color_on, color_off);
|
||||||
if (box.is_inline_block())
|
if (box.is_inline_block())
|
||||||
builder.appendff(" {}inline-block{}", inline_block_color_on, color_off);
|
builder.appendff(" {}inline-block{}", inline_color_on, color_off);
|
||||||
|
if (box.is_inline_table())
|
||||||
|
builder.appendff(" {}inline-table{}", inline_color_on, color_off);
|
||||||
if (box.display().is_flex_inside()) {
|
if (box.display().is_flex_inside()) {
|
||||||
StringView direction;
|
StringView direction;
|
||||||
switch (box.computed_values().flex_direction()) {
|
switch (box.computed_values().flex_direction()) {
|
||||||
|
|
|
@ -659,6 +659,12 @@ bool Node::is_inline_block() const
|
||||||
return display.is_inline_outside() && display.is_flow_root_inside();
|
return display.is_inline_outside() && display.is_flow_root_inside();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Node::is_inline_table() const
|
||||||
|
{
|
||||||
|
auto display = this->display();
|
||||||
|
return display.is_inline_outside() && display.is_table_inside();
|
||||||
|
}
|
||||||
|
|
||||||
JS::NonnullGCPtr<NodeWithStyle> NodeWithStyle::create_anonymous_wrapper() const
|
JS::NonnullGCPtr<NodeWithStyle> NodeWithStyle::create_anonymous_wrapper() const
|
||||||
{
|
{
|
||||||
auto wrapper = heap().allocate_without_realm<BlockContainer>(const_cast<DOM::Document&>(document()), nullptr, m_computed_values.clone_inherited_values());
|
auto wrapper = heap().allocate_without_realm<BlockContainer>(const_cast<DOM::Document&>(document()), nullptr, m_computed_values.clone_inherited_values());
|
||||||
|
|
|
@ -76,6 +76,7 @@ public:
|
||||||
|
|
||||||
bool is_inline() const;
|
bool is_inline() const;
|
||||||
bool is_inline_block() const;
|
bool is_inline_block() const;
|
||||||
|
bool is_inline_table() const;
|
||||||
|
|
||||||
bool is_out_of_flow(FormattingContext const&) const;
|
bool is_out_of_flow(FormattingContext const&) const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue