dymokomi/luce-browser-engine
Source of release 0.6.0
0.6.0 / src / web / layout / replaced_box.lucb
#==============================================================================================
#
# replaced_box - Layout::ReplacedBox: the box of a replaced element
#
# DESCRIPTION:
# Port of LibWeb/Layout/ReplacedBox.cpp (lines 1-21) and ReplacedBox.h.
#
# Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
# SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================
## Ported from Libraries/LibWeb/Layout/ReplacedBox.cpp:14 Web::Layout::ReplacedBox::ReplacedBox.
pub func layout_replaced_box_construct(this: LayoutReplacedBox*, document: DomDocument*, element: DomElement*?, style: CssComputedProperties*):
layout_box_construct_css_computed_properties(this.layout_box(), document, (DomNode*?)element, style)
## Ported from Libraries/LibWeb/Layout/ReplacedBox.h:21 Web::Layout::ReplacedBox::dom_node.
pub func layout_replaced_box_dom_node_const(this: LayoutReplacedBox*) -> DomElement*?:
return layout_replaced_box_dom_node(this)
## Ported from Libraries/LibWeb/Layout/ReplacedBox.h:22 Web::Layout::ReplacedBox::dom_node.
pub func layout_replaced_box_dom_node(this: LayoutReplacedBox*) -> DomElement*?:
let dom_node = layout_node_dom_node(this.layout_node()) else return none
return as_dom_element(dom_node)
## Ported from Libraries/LibWeb/Layout/ReplacedBox.h:24 Web::Layout::ReplacedBox::can_have_children (override).
pub func layout_replaced_box_can_have_children_impl(base: LayoutNode*) -> bool:
_ = base
return false
## Ported from Libraries/LibWeb/Layout/ReplacedBox.h:27 Web::Layout::ReplacedBox::is_replaced_box (override).
pub func layout_replaced_box_is_replaced_box_impl(base: LayoutNode*) -> bool:
_ = base
return true
## Ported from Libraries/LibWeb/Layout/ReplacedBox.h:28 Web::Layout::ReplacedBox::has_auto_content_box_size (override).
pub func layout_replaced_box_has_auto_content_box_size_impl(base: LayoutBox*) -> bool:
_ = base
return true