LibWeb: Save layout mode inside formatting context object

FormattingContext::run() does not allow reentrancy, so it's safe to
save and access layout mode from FC object. This avoids need to drill it
through methods of a formatting context and makes it clear that this
value could never be changed after FC construction.
This commit is contained in:
Aliaksandr Kalenik 2024-09-11 01:03:02 +02:00 committed by Andreas Kling
commit 90b8bfc04c
Notes: github-actions[bot] 2024-09-11 07:30:59 +00:00
15 changed files with 124 additions and 124 deletions

View file

@ -18,10 +18,10 @@ namespace Web::Layout {
class SVGFormattingContext : public FormattingContext {
public:
explicit SVGFormattingContext(LayoutState&, Box const&, FormattingContext* parent, Gfx::AffineTransform parent_viewbox_transform = {});
explicit SVGFormattingContext(LayoutState&, LayoutMode, Box const&, FormattingContext* parent, Gfx::AffineTransform parent_viewbox_transform = {});
~SVGFormattingContext();
virtual void run(LayoutMode, AvailableSpace const&) override;
virtual void run(AvailableSpace const&) override;
virtual CSSPixels automatic_content_width() const override;
virtual CSSPixels automatic_content_height() const override;