/* * Copyright (c) 2025, Lucien Fiorini * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include #include namespace Web::SVG { GC_DEFINE_ALLOCATOR(SVGFEFloodElement); SVGFEFloodElement::SVGFEFloodElement(DOM::Document& document, DOM::QualifiedName qualified_name) : SVGElement(document, qualified_name) { } void SVGFEFloodElement::initialize(JS::Realm& realm) { WEB_SET_PROTOTYPE_FOR_INTERFACE(SVGFEFloodElement); Base::initialize(realm); } void SVGFEFloodElement::visit_edges(Cell::Visitor& visitor) { Base::visit_edges(visitor); SVGFilterPrimitiveStandardAttributes::visit_edges(visitor); } GC::Ptr SVGFEFloodElement::create_layout_node(GC::Ref style) { return heap().allocate(document(), *this, move(style)); } // https://www.w3.org/TR/filter-effects-1/#FloodColorProperty Gfx::Color SVGFEFloodElement::flood_color() const { // FIXME: Find a way to get the Gfx::Color of the flood_color property // without having a layout node. return Color::Black; } // https://www.w3.org/TR/filter-effects-1/#FloodOpacityProperty float SVGFEFloodElement::flood_opacity() const { return computed_properties()->flood_opacity(); } }