dymokomi/luce-browser-engine
Source of release 0.6.0
0.6.0 / src / web / layout / legend_box.lucb
#==============================================================================================
#
# legend_box - Layout::LegendBox: the box of <legend>
#
# DESCRIPTION:
# Port of LibWeb/Layout/LegendBox.cpp (lines 1-20) and LegendBox.h.
#
# Copyright (c) 2024, Kostya Farber <kostya.farber@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================
## Ported from Libraries/LibWeb/Layout/LegendBox.cpp:13 Web::Layout::LegendBox::LegendBox.
pub func layout_legend_box_construct(this: LayoutLegendBox*, document: DomDocument*, element: DomElement*, style: CssComputedProperties*):
layout_block_container_construct_css_computed_properties(this.layout_block_container(), document, element.dom_node(), style)
## Ported from Libraries/LibWeb/Layout/LegendBox.h:22 Web::Layout::LegendBox::dom_node.
pub func layout_legend_box_dom_node(this: LayoutLegendBox*) -> DomElement*:
let dom_node = layout_node_dom_node(this.layout_node()) else trap("VERIFY: a legend box has a DOM node")
return (DomElement*)dom_node
## Ported from Libraries/LibWeb/Layout/LegendBox.h:23 Web::Layout::LegendBox::dom_node.
pub func layout_legend_box_dom_node_const(this: LayoutLegendBox*) -> DomElement*:
return layout_legend_box_dom_node(this)
## Ported from Libraries/LibWeb/Layout/LegendBox.h:26 Web::Layout::LegendBox::is_legend_box (override).
pub func layout_legend_box_is_legend_box_impl(base: LayoutNode*) -> bool:
_ = base
return true