1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibWeb: Parse the <svg viewBox> attribute

Just parse it into an SVG::ViewBox object for now, we don't actually use
it for anything yet.
This commit is contained in:
Andreas Kling 2021-09-15 01:12:41 +02:00
parent 63c4fcdc69
commit 7de23aede2
2 changed files with 15 additions and 0 deletions

View file

@ -8,6 +8,7 @@
#include <LibGfx/Bitmap.h>
#include <LibWeb/SVG/SVGGraphicsElement.h>
#include <LibWeb/SVG/ViewBox.h>
namespace Web::SVG {
@ -25,8 +26,13 @@ public:
virtual bool requires_svg_container() const override { return false; }
virtual bool is_svg_container() const override { return true; }
Optional<ViewBox> const& view_box() { return m_view_box; }
private:
virtual void parse_attribute(FlyString const& name, String const& value) override;
RefPtr<Gfx::Bitmap> m_bitmap;
Optional<ViewBox> m_view_box;
};
}