mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
LibWeb: Make Layout::SVGBox a BlockContainer again
This wasn't worth the headache of trying to make SVG boxes work together with BFC right now. Let's just make it a block container once again, and have its corresponding SVGPaintable inherit from PaintableWithLines. We'll have to revisit this as SVG support improves.
This commit is contained in:
parent
e4eb6d4f1f
commit
aa969cc591
Notes:
sideshowbarker
2024-07-17 17:31:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/aa969cc591
@ -9,7 +9,7 @@
|
||||
namespace Web::Layout {
|
||||
|
||||
SVGBox::SVGBox(DOM::Document& document, SVG::SVGElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||
: Box(document, &element, move(style))
|
||||
: BlockContainer(document, &element, move(style))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
class SVGBox : public Box {
|
||||
class SVGBox : public BlockContainer {
|
||||
public:
|
||||
SVGBox(DOM::Document&, SVG::SVGElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||
virtual ~SVGBox() override = default;
|
||||
|
@ -166,9 +166,10 @@ public:
|
||||
|
||||
virtual HitTestResult hit_test(Gfx::IntPoint const&, HitTestType) const override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
PaintableWithLines(Layout::BlockContainer const&);
|
||||
|
||||
private:
|
||||
Vector<Layout::LineBox> m_line_boxes;
|
||||
};
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
namespace Web::Painting {
|
||||
|
||||
SVGPaintable::SVGPaintable(Layout::SVGBox const& layout_box)
|
||||
: PaintableBox(layout_box)
|
||||
: PaintableWithLines(layout_box)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
class SVGPaintable : public PaintableBox {
|
||||
class SVGPaintable : public PaintableWithLines {
|
||||
public:
|
||||
virtual void before_children_paint(PaintContext&, PaintPhase) const override;
|
||||
virtual void after_children_paint(PaintContext&, PaintPhase) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user