mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-09 16:42:10 +02:00
This element allows images to be embedded within SVGs. (cherry picked from commit 03bbc2b111b211f472bfbc0f04c10f03e28dbbdf)
25 lines
639 B
C++
25 lines
639 B
C++
/*
|
|
* Copyright (c) 2024, Tim Ledbetter <tim.ledbetter@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Layout/SVGImageBox.h>
|
|
#include <LibWeb/Painting/ImagePaintable.h>
|
|
#include <LibWeb/Painting/SVGGraphicsPaintable.h>
|
|
#include <LibWeb/Painting/StackingContext.h>
|
|
|
|
namespace Web::Layout {
|
|
|
|
SVGImageBox::SVGImageBox(DOM::Document& document, SVG::SVGGraphicsElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
|
: SVGGraphicsBox(document, element, properties)
|
|
{
|
|
}
|
|
|
|
JS::GCPtr<Painting::Paintable> SVGImageBox::create_paintable() const
|
|
{
|
|
return Painting::ImagePaintable::create(*this);
|
|
}
|
|
|
|
}
|