mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibWeb: Rename SVGPathBox -> SVGGeometryBox
This fits better since it's now used by all SVGGeometryElements.
This commit is contained in:
parent
326a5a82eb
commit
784c3183f7
7 changed files with 18 additions and 18 deletions
31
Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h
Normal file
31
Userland/Libraries/LibWeb/Layout/SVGGeometryBox.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Layout/SVGGraphicsBox.h>
|
||||
#include <LibWeb/SVG/SVGGeometryElement.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
class SVGGeometryBox final : public SVGGraphicsBox {
|
||||
public:
|
||||
SVGGeometryBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||
virtual ~SVGGeometryBox() override = default;
|
||||
|
||||
SVG::SVGGeometryElement& dom_node() { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); }
|
||||
SVG::SVGGeometryElement const& dom_node() const { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); }
|
||||
|
||||
virtual void paint(PaintContext& context, PaintPhase phase) override;
|
||||
|
||||
private:
|
||||
virtual bool is_svg_geometry_box() const final { return true; }
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Node::fast_is<SVGGeometryBox>() const { return is_svg_geometry_box(); }
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue