/* * Copyright (c) 2020, Matthew Olsson * Copyright (c) 2022-2024, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include namespace Web::Layout { SVGSVGBox::SVGSVGBox(DOM::Document& document, SVG::SVGSVGElement& element, CSS::ComputedProperties const& style) : ReplacedBox(document, element, style) { } RefPtr SVGSVGBox::create_paintable() const { return Painting::SVGSVGPaintable::create(*this); } CSS::SizeWithAspectRatio SVGSVGBox::natural_size() const { auto metrics = SVG::SVGSVGElement::negotiate_natural_metrics(dom_node()); return { metrics.width, metrics.height, metrics.aspect_ratio }; } }