mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-02 16:25:34 +03:00
LibWeb: Output display type inline-table in layout dump
This commit is contained in:
parent
276a77f02d
commit
45e85d20b6
Notes:
sideshowbarker
2024-07-17 01:35:52 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/45e85d20b6 Pull-request: https://github.com/SerenityOS/serenity/pull/17041
@ -121,7 +121,7 @@ void dump_tree(StringBuilder& builder, Layout::Node const& layout_node, bool sho
|
||||
StringView svg_box_color_on = ""sv;
|
||||
StringView positioned_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 fragment_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;
|
||||
positioned_color_on = "\033[31;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;
|
||||
fragment_color_on = "\033[35;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())
|
||||
builder.appendff(" {}floating{}", floating_color_on, color_off);
|
||||
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()) {
|
||||
StringView 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();
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
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_block() const;
|
||||
bool is_inline_table() const;
|
||||
|
||||
bool is_out_of_flow(FormattingContext const&) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user