mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-27 19:07:24 +00:00
This uses the same trick as done for masks in #23554. Each use of an SVG `<clipPath>` becomes it's own layout subtree rooted at it's user. This allows each use have it's own layout (which allows supporting features such as `clipPathUnits`).
22 lines
475 B
C++
22 lines
475 B
C++
/*
|
|
* Copyright (c) 2024, MacDue <macdue@dueutil.tech>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Painting/SVGClipPaintable.h>
|
|
|
|
namespace Web::Painting {
|
|
|
|
JS::NonnullGCPtr<SVGClipPaintable> SVGClipPaintable::create(Layout::SVGClipBox const& layout_box)
|
|
{
|
|
return layout_box.heap().allocate_without_realm<SVGClipPaintable>(layout_box);
|
|
}
|
|
|
|
SVGClipPaintable::SVGClipPaintable(Layout::SVGClipBox const& layout_box)
|
|
: SVGPaintable(layout_box)
|
|
{
|
|
}
|
|
|
|
}
|