ladybird/Userland/Libraries/LibWeb/Layout/SVGGraphicsBox.cpp
Andreas Kling ec5d5918c4 LibWeb: Make SVG <g> elements generate a SVGGraphicsPaintable
...instead of defaulting to a PaintableBox. This way it gets the same
behavior as other SVG boxes during paint.
2023-04-19 07:52:26 +02:00

24 lines
601 B
C++

/*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/Painting/SVGGraphicsPaintable.h>
#include <LibWeb/Painting/StackingContext.h>
namespace Web::Layout {
SVGGraphicsBox::SVGGraphicsBox(DOM::Document& document, SVG::SVGGraphicsElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
: SVGBox(document, element, properties)
{
}
JS::GCPtr<Painting::Paintable> SVGGraphicsBox::create_paintable() const
{
return Painting::SVGGraphicsPaintable::create(*this);
}
}