mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-28 12:10:28 +00:00
Move ComputedProperties and CascadedProperties out of the GC. They no longer contain strong references to GC-managed data. Keep computed styles alive from DOM elements and animation updates with RefPtr. Pass style into layout constructors by reference, since layout only copies the values it needs while building nodes. Use GC::Weak for cascade source links, so entries no longer keep the style declaration or shadow root alive.
24 lines
566 B
C++
24 lines
566 B
C++
/*
|
|
* Copyright (c) 2023, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Layout/SVGTextPathBox.h>
|
|
#include <LibWeb/Painting/SVGPathPaintable.h>
|
|
|
|
namespace Web::Layout {
|
|
|
|
GC_DEFINE_ALLOCATOR(SVGTextPathBox);
|
|
|
|
SVGTextPathBox::SVGTextPathBox(DOM::Document& document, SVG::SVGTextPathElement& element, CSS::ComputedProperties const& style)
|
|
: SVGGraphicsBox(document, element, style)
|
|
{
|
|
}
|
|
|
|
RefPtr<Painting::Paintable> SVGTextPathBox::create_paintable() const
|
|
{
|
|
return Painting::SVGPathPaintable::create(*this);
|
|
}
|
|
|
|
}
|