1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00:00

LibWeb: Make SVG <svg> elements behave as CSS replaced elements

This makes SVG-in-HTML behave quite a bit better by following general
replaced layout rules. It also turns <svg> elements into inline-level
boxes instead of block-level boxes.
This commit is contained in:
Andreas Kling 2022-03-18 22:13:26 +01:00
parent 48abbefb99
commit 28b771560a
10 changed files with 21 additions and 14 deletions

View file

@ -9,7 +9,7 @@
namespace Web::Layout {
SVGBox::SVGBox(DOM::Document& document, SVG::SVGElement& element, NonnullRefPtr<CSS::StyleProperties> style)
: BlockContainer(document, &element, move(style))
: Box(document, &element, move(style))
{
}