Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-engine

Source of release 0.6.1

0.6.1 / src / web / svg / svg_style_element.lucb

#==============================================================================================
#
#   svg_style_element - SVG::SVGStyleElement: <style> in SVG
#
#   DESCRIPTION:
#       Port of LibWeb/SVG/SVGStyleElement.cpp with the inline members of SVGStyleElement.h: an SVGElement with the StyleElementBase of <style>.
#
#==============================================================================================

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.cpp:14 Web::SVG::SVGStyleElement::SVGStyleElement.
pub func svg_style_element_construct(this: SvgStyleElement*, document: DomDocument*, qualified_name: DomQualifiedName):
    svg_element_construct(this.svg_element(), document, qualified_name)
    # The vptrs of the mixin bases move to SVGStyleElement's tables; the DOM::StyleElementBase base
    # (default-constructed: no sheet, no list, no load event delayer) gets its table.
    let element = this.svg_element()
    element.element.slottable_mixin.vtable = &svg_style_element_slottable_mixin_vtable
    element.element.aria_mixin.vtable = &svg_style_element_aria_mixin_vtable
    element.element.animatable.vtable = &svg_style_element_animatable_vtable
    element.global_event_handlers.vtable = &svg_style_element_global_event_handlers_vtable
    this.style_element_base.vtable = &svg_style_element_style_element_base_vtable
    this.style_element_base.class_id = this.cell().class_id

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.cpp:21 Web::SVG::SVGStyleElement::initialize (override).
pub func svg_style_element_initialize_impl(base: JsCell*, realm: Realm*):
    web_set_prototype_for_interface(base, realm, BindInterfaceName.svg_style_element)
    svg_element_initialize_impl(base, realm)

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.cpp:27 Web::SVG::SVGStyleElement::visit_edges (override).
pub func svg_style_element_visit_edges_impl(base: gc.Cell*, visitor: gc.CellVisitor*):
    let this = (SvgStyleElement*)base
    svg_element_visit_edges_impl(base, visitor)
    dom_style_element_base_visit_style_element_edges(&this.style_element_base, visitor)

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.cpp:33 Web::SVG::SVGStyleElement::children_changed (override).
pub func svg_style_element_children_changed_impl(base: DomNode*, metadata: DomNodeChildrenChangedMetadata):
    let this = (SvgStyleElement*)base
    svg_element_children_changed_impl(base, metadata)
    dom_style_element_base_update_a_style_block(&this.style_element_base)

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.cpp:39 Web::SVG::SVGStyleElement::inserted (override).
pub func svg_style_element_inserted_impl(base: DomNode*):
    let this = (SvgStyleElement*)base
    svg_element_inserted_impl(base)
    dom_style_element_base_update_a_style_block(&this.style_element_base)

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.cpp:45 Web::SVG::SVGStyleElement::removed_from (override).
pub func svg_style_element_removed_from_impl(base: DomNode*, is_subtree_root: DomNodeIsSubtreeRoot, old_ancestor: DomNode*?, old_root: DomNode*):
    let this = (SvgStyleElement*)base
    svg_element_removed_from_impl(base, is_subtree_root, old_ancestor, old_root)
    dom_style_element_base_update_a_style_block(&this.style_element_base)

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.h:31 Web::SVG::SVGStyleElement::is_svg_style_element (override).
pub func svg_style_element_is_svg_style_element_impl(base: DomNode*) -> bool:
    return true

## Ported from Libraries/LibWeb/SVG/SVGStyleElement.h:34 Web::SVG::SVGStyleElement::as_element (override).
pub func svg_style_element_as_element_impl(base: DomStyleElementBase*) -> DomElement*:
    return (DomElement*)((u8*)base - memory.offset_of(SvgStyleElement, style_element_base))