1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

LibWeb: Add SVGFormattingContext to handle SVG box trees

Instead of trying to layout SVG boxes as if they are regular CSS boxes,
let's invent an "SVG formatting context" and let it manage SVG boxes.

To facilitate this, Layout::SVGBox no longer inherits from ReplacedBox,
and is instead a simple, "inline-block" style BlockBox.
This commit is contained in:
Andreas Kling 2021-09-17 23:12:16 +02:00
parent 4417f26d7c
commit 92c08ad4ac
11 changed files with 65 additions and 26 deletions

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Format.h>
#include <LibWeb/Layout/SVGFormattingContext.h>
#include <LibWeb/Layout/SVGSVGBox.h>
namespace Web::Layout {
SVGFormattingContext::SVGFormattingContext(Box& box, FormattingContext* parent)
: FormattingContext(box, parent)
{
}
SVGFormattingContext::~SVGFormattingContext()
{
}
void SVGFormattingContext::run(Box&, LayoutMode)
{
}
}