From ae93aeb414334e5bb58517279783c01b95c74ca9 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 15 Feb 2022 16:42:00 +0000 Subject: [PATCH] LibWeb: Give `` elements a size again This replaces the unused width() and height() methods. The size now defaults to 100% by 100% as in the spec. --- .../Libraries/LibWeb/SVG/SVGSVGElement.cpp | 20 +++++++++++++------ Userland/Libraries/LibWeb/SVG/SVGSVGElement.h | 3 +-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp index f7583076a0..df0e3b937a 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGSVGElement.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -24,14 +25,21 @@ RefPtr SVGSVGElement::create_layout_node(NonnullRefPtr create_layout_node(NonnullRefPtr) override; - unsigned width() const; - unsigned height() const; + virtual void apply_presentational_hints(CSS::StyleProperties&) const override; virtual bool requires_svg_container() const override { return false; } virtual bool is_svg_container() const override { return true; }