mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
LibWeb: Show formatting context roots in layout tree dumps
This patch does three things: - Factors out the code that determines whether a box will create a new formatting context for its children (and which type of context) - Uses that code to mark all formatting context roots in layout tree dumps. This makes it much easier to follow along with layout since you can now see exactly where control is transferred to a new formatting context. - Rebaselines all existing layout tests, since the output format has changed slightly.
This commit is contained in:
parent
42e118e6a9
commit
968db96101
117 changed files with 905 additions and 851 deletions
|
@ -24,6 +24,8 @@ public:
|
|||
Grid,
|
||||
Table,
|
||||
SVG,
|
||||
InternalReplaced, // Internal hack formatting context for replaced elements. FIXME: Get rid of this.
|
||||
InternalDummy, // Internal hack formatting context for unimplemented things. FIXME: Get rid of this.
|
||||
};
|
||||
|
||||
virtual void run(Box const&, LayoutMode, AvailableSpace const&) = 0;
|
||||
|
@ -44,6 +46,8 @@ public:
|
|||
|
||||
virtual bool inhibits_floating() const { return false; }
|
||||
|
||||
[[nodiscard]] static Optional<Type> formatting_context_type_created_by_box(Box const&);
|
||||
|
||||
static bool creates_block_formatting_context(Box const&);
|
||||
|
||||
static CSSPixels compute_width_for_replaced_element(LayoutState const&, ReplacedBox const&, AvailableSpace const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue