dymokomi/luce-browser-engine
Source of release 0.6.1
0.6.1 / src / web / svg / svg_animated_length.lucb
#==============================================================================================
#
# svg_animated_length - SVG::SVGAnimatedLength: a base value and an animated value
#
# DESCRIPTION:
# Port of LibWeb/SVG/SVGAnimatedLength.cpp with the inline members of
# SVGAnimatedLength.h (https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedLength).
#
#==============================================================================================
## Ported from Libraries/LibWeb/SVG/SVGAnimatedLength.cpp:15 Web::SVG::SVGAnimatedLength::create.
pub func svg_animated_length_create(realm: Realm*, base_val: SvgLength*, anim_val: SvgLength*) -> SvgAnimatedLength*:
return realm_create_svg_animated_length(realm, realm, base_val, anim_val)
## Ported from Libraries/LibWeb/SVG/SVGAnimatedLength.cpp:20 Web::SVG::SVGAnimatedLength::SVGAnimatedLength.
pub func svg_animated_length_construct(this: SvgAnimatedLength*, realm: Realm*, base_val: SvgLength*, anim_val: SvgLength*):
bind_platform_object_construct_realm(this.bind_platform_object(), realm)
this.m_base_val = base_val
this.m_anim_val = anim_val
# The object referenced by animVal will always be distinct from the one referenced by baseVal, even when the
# attribute is not animated.
assert(this.m_base_val != this.m_anim_val)
# https://svgwg.org/svg2-draft/types.html#InterfaceSVGLength
# SVGLength objects reflected through the animVal IDL attribute are always read only.
assert(svg_length_read_only(this.m_anim_val) == SvgLengthReadOnly.yes)
## Ported from Libraries/LibWeb/SVG/SVGAnimatedLength.h:23 Web::SVG::SVGAnimatedLength::base_val.
pub func svg_animated_length_base_val(this: SvgAnimatedLength*) -> SvgLength*:
return this.m_base_val
## Ported from Libraries/LibWeb/SVG/SVGAnimatedLength.h:24 Web::SVG::SVGAnimatedLength::anim_val.
pub func svg_animated_length_anim_val(this: SvgAnimatedLength*) -> SvgLength*:
return this.m_anim_val
## Ported from Libraries/LibWeb/SVG/SVGAnimatedLength.cpp:36 Web::SVG::SVGAnimatedLength::initialize (override).
pub func svg_animated_length_initialize_impl(base: JsCell*, realm: Realm*):
web_set_prototype_for_interface(base, realm, BindInterfaceName.svg_animated_length)
js_cell_initialize_impl(base, realm)
## Ported from Libraries/LibWeb/SVG/SVGAnimatedLength.cpp:42 Web::SVG::SVGAnimatedLength::visit_edges (override).
pub func svg_animated_length_visit_edges_impl(base: gc.Cell*, visitor: gc.CellVisitor*):
let this = (SvgAnimatedLength*)base
bind_platform_object_visit_edges_impl(base, visitor)
gc.cell_visitor_visit_t_2(visitor, this.m_base_val)
gc.cell_visitor_visit_t_2(visitor, this.m_anim_val)