dymokomi/luce-browser-engine
Source of release 0.6.0
0.6.0 / src / web / layout / svg_foreign_object_box.lucb
#==============================================================================================
#
# svg_foreign_object_box - Layout::SVGForeignObjectBox: the block container of a
# <foreignObject>
#
# DESCRIPTION:
# Port of LibWeb/Layout/SVGForeignObjectBox.cpp (lines 1-25) and SVGForeignObjectBox.h:
# the constructor, the <foreignObject> element and the SVGForeignObjectPaintable.
#
# Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================
## Ported from Libraries/LibWeb/Layout/SVGForeignObjectBox.cpp:15 Web::Layout::SVGForeignObjectBox::SVGForeignObjectBox.
pub func layout_svg_foreign_object_box_construct(this: LayoutSvgForeignObjectBox*, document: DomDocument*, element: SvgForeignObjectElement*, style: CssComputedProperties*):
layout_block_container_construct_css_computed_properties(this.layout_block_container(), document, element.dom_node(), style)
## Ported from Libraries/LibWeb/Layout/SVGForeignObjectBox.h:24 Web::Layout::SVGForeignObjectBox::dom_node.
pub func layout_svg_foreign_object_box_dom_node(this: LayoutSvgForeignObjectBox*) -> SvgForeignObjectElement*:
return (SvgForeignObjectElement*)(layout_node_dom_node(this.layout_node()) else trap("VERIFY: a foreignObject box has a DOM node"))
## Ported from Libraries/LibWeb/Layout/SVGForeignObjectBox.h:25 Web::Layout::SVGForeignObjectBox::dom_node.
pub func layout_svg_foreign_object_box_dom_node_const(this: LayoutSvgForeignObjectBox*) -> SvgForeignObjectElement*:
return layout_svg_foreign_object_box_dom_node(this)
## Ported from Libraries/LibWeb/Layout/SVGForeignObjectBox.cpp:20 Web::Layout::SVGForeignObjectBox::create_paintable (override).
pub func layout_svg_foreign_object_box_create_paintable_impl(base: LayoutNode*) -> PaintPaintable*?:
return paint_svg_foreign_object_paintable_create((LayoutSvgForeignObjectBox*)base).paint_paintable()
## Ported from Libraries/LibWeb/Layout/SVGForeignObjectBox.h:30 Web::Layout::SVGForeignObjectBox::is_svg_foreign_object_box (override).
pub func layout_svg_foreign_object_box_is_svg_foreign_object_box_impl(base: LayoutNode*) -> bool:
_ = base
return true