1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

LibWeb: Rename the LayoutMode enum values and explain them

The old mode names, while mechanically accurate, didn't really reflect
their relationship to the CSS specifications.

This patch renames them as follows:

    Default => Normal
    AllPossibleLineBreaks => MinContent
    OnlyRequiredLineBreaks => MaxContent

There's also now an explainer comment with the LayoutMode enum about the
specific implications of layout in each mode.
This commit is contained in:
Andreas Kling 2022-03-19 15:44:02 +01:00
parent ceb055a75e
commit c1f0d21bbe
10 changed files with 43 additions and 32 deletions

View file

@ -27,7 +27,7 @@ public:
auto const& right_side_floats() const { return m_right_floats; }
static float compute_theoretical_height(FormattingState const&, Box const&);
void compute_width(Box const&, LayoutMode = LayoutMode::Default);
void compute_width(Box const&, LayoutMode = LayoutMode::Normal);
// https://www.w3.org/TR/css-display/#block-formatting-context-root
BlockContainer const& root() const { return static_cast<BlockContainer const&>(context_box()); }