2021-09-17 23:12:16 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/Forward.h>
|
|
|
|
|
#include <LibWeb/Layout/FormattingContext.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::Layout {
|
|
|
|
|
|
|
|
|
|
class SVGFormattingContext : public FormattingContext {
|
|
|
|
|
public:
|
2024-01-27 16:23:22 +00:00
|
|
|
explicit SVGFormattingContext(LayoutState&, Box const&, FormattingContext* parent, Gfx::AffineTransform parent_viewbox_transform = {});
|
2021-09-17 23:12:16 +02:00
|
|
|
~SVGFormattingContext();
|
|
|
|
|
|
2022-09-27 15:29:17 +02:00
|
|
|
virtual void run(Box const&, LayoutMode, AvailableSpace const&) override;
|
2023-03-19 09:57:31 +01:00
|
|
|
virtual CSSPixels automatic_content_width() const override;
|
2022-11-23 17:46:10 +00:00
|
|
|
virtual CSSPixels automatic_content_height() const override;
|
2024-01-27 16:23:22 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Gfx::AffineTransform m_parent_viewbox_transform {};
|
2021-09-17 23:12:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|