2020-01-18 11:38:21 +03:00
|
|
|
/*
|
2023-02-20 20:56:08 +03:00
|
|
|
* Copyright (c) 2018-2023, Andreas Kling <kling@serenityos.org>
|
2020-01-18 11:38:21 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2019-06-15 23:49:44 +03:00
|
|
|
#pragma once
|
|
|
|
|
2019-06-21 19:45:35 +03:00
|
|
|
#include <AK/NonnullRefPtr.h>
|
2020-07-26 18:16:18 +03:00
|
|
|
#include <AK/TypeCasts.h>
|
2019-06-15 23:49:44 +03:00
|
|
|
#include <AK/Vector.h>
|
2020-02-06 14:04:00 +03:00
|
|
|
#include <LibGfx/Rect.h>
|
2023-01-28 19:26:03 +03:00
|
|
|
#include <LibJS/Heap/Cell.h>
|
2022-08-28 14:42:07 +03:00
|
|
|
#include <LibJS/Heap/Handle.h>
|
2021-01-06 12:34:31 +03:00
|
|
|
#include <LibWeb/CSS/ComputedValues.h>
|
2020-03-07 12:32:51 +03:00
|
|
|
#include <LibWeb/CSS/StyleProperties.h>
|
2023-04-01 23:12:15 +03:00
|
|
|
#include <LibWeb/FontCache.h>
|
2020-06-09 21:42:11 +03:00
|
|
|
#include <LibWeb/Forward.h>
|
2020-03-07 12:32:51 +03:00
|
|
|
#include <LibWeb/Layout/BoxModelMetrics.h>
|
2020-06-18 22:35:44 +03:00
|
|
|
#include <LibWeb/Painting/PaintContext.h>
|
2020-03-07 12:32:51 +03:00
|
|
|
#include <LibWeb/TreeNode.h>
|
2019-06-15 23:49:44 +03:00
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
namespace Web::Layout {
|
2020-03-07 12:27:02 +03:00
|
|
|
|
2020-11-22 15:38:18 +03:00
|
|
|
enum class LayoutMode {
|
2022-07-09 16:17:47 +03:00
|
|
|
// Normal layout. No min-content or max-content constraints applied.
|
2022-03-19 17:44:02 +03:00
|
|
|
Normal,
|
|
|
|
|
2022-07-09 16:17:47 +03:00
|
|
|
// Intrinsic size determination.
|
2022-07-17 00:43:48 +03:00
|
|
|
// Boxes honor min-content and max-content constraints (set via LayoutState::UsedValues::{width,height}_constraint)
|
2022-07-09 16:17:47 +03:00
|
|
|
// by considering their containing block to be 0-sized or infinitely large in the relevant axis.
|
2022-07-20 19:12:12 +03:00
|
|
|
// https://drafts.csswg.org/css-sizing-3/#intrinsic-sizing
|
|
|
|
IntrinsicSizing,
|
2020-11-22 15:38:18 +03:00
|
|
|
};
|
|
|
|
|
2022-10-17 15:41:50 +03:00
|
|
|
class Node
|
|
|
|
: public JS::Cell
|
|
|
|
, public TreeNode<Node>
|
|
|
|
, public Weakable<Node> {
|
|
|
|
JS_CELL(Node, JS::Cell);
|
|
|
|
|
2019-06-15 23:49:44 +03:00
|
|
|
public:
|
2020-11-22 17:53:01 +03:00
|
|
|
virtual ~Node();
|
2019-06-15 23:49:44 +03:00
|
|
|
|
2022-08-28 14:42:07 +03:00
|
|
|
bool is_anonymous() const;
|
|
|
|
DOM::Node const* dom_node() const;
|
|
|
|
DOM::Node* dom_node();
|
2019-06-15 23:49:44 +03:00
|
|
|
|
2023-08-06 02:29:55 +03:00
|
|
|
DOM::Element const* pseudo_element_generator() const;
|
|
|
|
DOM::Element* pseudo_element_generator();
|
|
|
|
|
|
|
|
enum class GeneratedFor {
|
|
|
|
NotGenerated,
|
|
|
|
PseudoBefore,
|
|
|
|
PseudoAfter
|
|
|
|
};
|
|
|
|
bool is_generated() const { return m_generated_for != GeneratedFor::NotGenerated; }
|
|
|
|
bool is_generated_for_before_pseudo_element() const { return m_generated_for == GeneratedFor::PseudoBefore; }
|
|
|
|
bool is_generated_for_after_pseudo_element() const { return m_generated_for == GeneratedFor::PseudoAfter; }
|
|
|
|
void set_generated_for(GeneratedFor type, DOM::Element& element)
|
|
|
|
{
|
|
|
|
m_generated_for = type;
|
|
|
|
m_pseudo_element_generator = &element;
|
|
|
|
}
|
2022-09-28 18:11:23 +03:00
|
|
|
|
2022-03-11 00:38:08 +03:00
|
|
|
Painting::Paintable* paintable() { return m_paintable; }
|
2022-03-10 17:50:57 +03:00
|
|
|
Painting::Paintable const* paintable() const { return m_paintable; }
|
2023-01-11 14:51:49 +03:00
|
|
|
void set_paintable(JS::GCPtr<Painting::Paintable>);
|
2022-03-10 17:50:57 +03:00
|
|
|
|
2023-01-11 14:51:49 +03:00
|
|
|
virtual JS::GCPtr<Painting::Paintable> create_paintable() const;
|
2022-03-10 17:50:57 +03:00
|
|
|
|
2022-08-28 14:42:07 +03:00
|
|
|
DOM::Document& document();
|
|
|
|
DOM::Document const& document() const;
|
2019-09-29 12:43:33 +03:00
|
|
|
|
2021-11-18 17:01:28 +03:00
|
|
|
HTML::BrowsingContext const& browsing_context() const;
|
|
|
|
HTML::BrowsingContext& browsing_context();
|
2020-06-14 17:45:45 +03:00
|
|
|
|
2023-02-25 13:04:29 +03:00
|
|
|
Viewport const& root() const;
|
|
|
|
Viewport& root();
|
2019-11-04 21:37:52 +03:00
|
|
|
|
2020-12-05 22:10:02 +03:00
|
|
|
bool is_root_element() const;
|
|
|
|
|
2022-12-04 21:02:33 +03:00
|
|
|
DeprecatedString debug_description() const;
|
2021-01-01 18:42:44 +03:00
|
|
|
|
2019-10-15 15:19:52 +03:00
|
|
|
bool has_style() const { return m_has_style; }
|
2023-04-27 16:03:49 +03:00
|
|
|
bool has_style_or_parent_with_style() const;
|
2019-10-05 23:07:45 +03:00
|
|
|
|
2020-11-29 17:29:10 +03:00
|
|
|
virtual bool can_have_children() const { return true; }
|
|
|
|
|
2022-10-06 16:33:09 +03:00
|
|
|
CSS::Display display() const;
|
|
|
|
|
2022-10-06 15:39:11 +03:00
|
|
|
bool is_inline() const;
|
2021-01-01 20:55:47 +03:00
|
|
|
bool is_inline_block() const;
|
2023-01-16 15:51:49 +03:00
|
|
|
bool is_inline_table() const;
|
2020-05-05 17:06:22 +03:00
|
|
|
|
2022-03-22 20:34:02 +03:00
|
|
|
bool is_out_of_flow(FormattingContext const&) const;
|
|
|
|
|
2021-01-17 11:34:01 +03:00
|
|
|
// These are used to optimize hot is<T> variants for some classes where dynamic_cast is too slow.
|
2021-01-07 19:31:26 +03:00
|
|
|
virtual bool is_box() const { return false; }
|
2021-10-06 21:07:13 +03:00
|
|
|
virtual bool is_block_container() const { return false; }
|
2021-10-26 17:15:53 +03:00
|
|
|
virtual bool is_break_node() const { return false; }
|
2021-01-17 11:34:01 +03:00
|
|
|
virtual bool is_text_node() const { return false; }
|
2023-02-25 13:04:29 +03:00
|
|
|
virtual bool is_viewport() const { return false; }
|
2021-10-18 17:26:05 +03:00
|
|
|
virtual bool is_svg_box() const { return false; }
|
2022-02-11 15:37:22 +03:00
|
|
|
virtual bool is_svg_geometry_box() const { return false; }
|
2023-03-10 23:16:18 +03:00
|
|
|
virtual bool is_svg_svg_box() const { return false; }
|
2021-10-27 18:58:19 +03:00
|
|
|
virtual bool is_label() const { return false; }
|
2022-03-13 19:21:27 +03:00
|
|
|
virtual bool is_replaced_box() const { return false; }
|
2023-03-10 23:16:18 +03:00
|
|
|
virtual bool is_list_item_box() const { return false; }
|
2022-03-13 19:21:27 +03:00
|
|
|
virtual bool is_list_item_marker_box() const { return false; }
|
2023-01-14 16:48:20 +03:00
|
|
|
virtual bool is_table_wrapper() const { return false; }
|
2023-03-10 23:16:18 +03:00
|
|
|
virtual bool is_node_with_style_and_box_model_metrics() const { return false; }
|
2021-01-17 11:34:01 +03:00
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
bool fast_is() const = delete;
|
2021-01-07 19:31:26 +03:00
|
|
|
|
2020-06-26 16:08:42 +03:00
|
|
|
bool is_floating() const;
|
2020-12-06 21:54:23 +03:00
|
|
|
bool is_positioned() const;
|
2020-06-05 17:54:28 +03:00
|
|
|
bool is_absolutely_positioned() const;
|
2020-06-12 15:19:03 +03:00
|
|
|
bool is_fixed_position() const;
|
2020-06-05 17:54:28 +03:00
|
|
|
|
2021-05-29 23:36:15 +03:00
|
|
|
bool is_flex_item() const { return m_is_flex_item; }
|
|
|
|
void set_flex_item(bool b) { m_is_flex_item = b; }
|
|
|
|
|
2023-01-23 16:59:51 +03:00
|
|
|
Box const* containing_block() const;
|
|
|
|
Box* containing_block() { return const_cast<Box*>(const_cast<Node const*>(this)->containing_block()); }
|
2019-07-01 08:28:37 +03:00
|
|
|
|
2023-05-24 09:57:38 +03:00
|
|
|
// Closest non-anonymous ancestor box, to be used when resolving percentage values.
|
|
|
|
// Anonymous block boxes are ignored when resolving percentage values that would refer to it:
|
|
|
|
// the closest non-anonymous ancestor box is used instead.
|
|
|
|
// https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level
|
2023-06-14 16:31:40 +03:00
|
|
|
Box const* non_anonymous_containing_block() const;
|
2023-05-24 09:57:38 +03:00
|
|
|
|
2021-05-07 19:03:25 +03:00
|
|
|
bool establishes_stacking_context() const;
|
|
|
|
|
2020-06-05 17:54:28 +03:00
|
|
|
bool can_contain_boxes_with_position_absolute() const;
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
Gfx::Font const& font() const;
|
2023-04-01 23:12:15 +03:00
|
|
|
Gfx::Font const& scaled_font(PaintContext&) const;
|
2023-07-20 22:24:22 +03:00
|
|
|
Gfx::Font const& scaled_font(float scale_factor) const;
|
2023-04-01 23:12:15 +03:00
|
|
|
|
2022-11-08 14:31:24 +03:00
|
|
|
CSS::ImmutableComputedValues const& computed_values() const;
|
|
|
|
CSSPixels line_height() const;
|
2019-10-07 10:50:31 +03:00
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
NodeWithStyle* parent();
|
2022-04-01 20:58:27 +03:00
|
|
|
NodeWithStyle const* parent() const;
|
2019-07-24 08:34:07 +03:00
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
void inserted_into(Node&) { }
|
|
|
|
void removed_from(Node&) { }
|
2020-05-26 22:53:10 +03:00
|
|
|
void children_changed() { }
|
2019-09-29 18:40:39 +03:00
|
|
|
|
2019-10-09 22:25:29 +03:00
|
|
|
bool is_visible() const { return m_visible; }
|
|
|
|
void set_visible(bool visible) { m_visible = visible; }
|
|
|
|
|
2019-10-15 17:48:38 +03:00
|
|
|
virtual void set_needs_display();
|
2019-10-09 22:25:29 +03:00
|
|
|
|
2019-10-18 00:32:08 +03:00
|
|
|
bool children_are_inline() const { return m_children_are_inline; }
|
|
|
|
void set_children_are_inline(bool value) { m_children_are_inline = value; }
|
|
|
|
|
2022-11-08 14:31:24 +03:00
|
|
|
CSSPixelPoint box_type_agnostic_position() const;
|
2019-10-20 10:14:12 +03:00
|
|
|
|
2020-08-21 18:50:41 +03:00
|
|
|
enum class SelectionState {
|
|
|
|
None, // No selection
|
2020-11-22 17:53:01 +03:00
|
|
|
Start, // Selection starts in this Node
|
|
|
|
End, // Selection ends in this Node
|
|
|
|
StartAndEnd, // Selection starts and ends in this Node
|
|
|
|
Full, // Selection starts before and ends after this Node
|
2020-08-21 18:50:41 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
SelectionState selection_state() const { return m_selection_state; }
|
|
|
|
void set_selection_state(SelectionState state) { m_selection_state = state; }
|
2020-12-06 21:59:28 +03:00
|
|
|
|
2019-06-15 23:49:44 +03:00
|
|
|
protected:
|
2020-11-22 17:53:01 +03:00
|
|
|
Node(DOM::Document&, DOM::Node*);
|
2019-06-15 23:49:44 +03:00
|
|
|
|
2022-10-17 15:41:50 +03:00
|
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
|
2019-06-15 23:49:44 +03:00
|
|
|
private:
|
2020-11-22 17:53:01 +03:00
|
|
|
friend class NodeWithStyle;
|
2019-10-07 10:50:31 +03:00
|
|
|
|
2022-10-17 15:41:50 +03:00
|
|
|
JS::NonnullGCPtr<DOM::Node> m_dom_node;
|
2023-01-11 14:51:49 +03:00
|
|
|
JS::GCPtr<Painting::Paintable> m_paintable;
|
2019-06-25 20:46:01 +03:00
|
|
|
|
2022-10-20 19:20:34 +03:00
|
|
|
JS::NonnullGCPtr<HTML::BrowsingContext> m_browsing_context;
|
|
|
|
|
2023-08-06 02:29:55 +03:00
|
|
|
JS::GCPtr<DOM::Element> m_pseudo_element_generator;
|
|
|
|
|
2022-10-16 17:42:39 +03:00
|
|
|
bool m_anonymous { false };
|
2019-10-07 10:50:31 +03:00
|
|
|
bool m_has_style { false };
|
2019-10-09 22:25:29 +03:00
|
|
|
bool m_visible { true };
|
2019-10-18 00:32:08 +03:00
|
|
|
bool m_children_are_inline { false };
|
2020-08-21 18:50:41 +03:00
|
|
|
SelectionState m_selection_state { SelectionState::None };
|
2021-05-29 23:36:15 +03:00
|
|
|
|
|
|
|
bool m_is_flex_item { false };
|
2023-08-06 02:29:55 +03:00
|
|
|
GeneratedFor m_generated_for { GeneratedFor::NotGenerated };
|
2019-06-15 23:49:44 +03:00
|
|
|
};
|
2019-10-07 10:50:31 +03:00
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
class NodeWithStyle : public Node {
|
2022-10-17 15:41:50 +03:00
|
|
|
JS_CELL(NodeWithStyle, Node);
|
|
|
|
|
2019-10-07 10:50:31 +03:00
|
|
|
public:
|
2022-03-14 22:21:51 +03:00
|
|
|
virtual ~NodeWithStyle() override = default;
|
2019-10-07 10:50:31 +03:00
|
|
|
|
2021-01-06 12:34:31 +03:00
|
|
|
const CSS::ImmutableComputedValues& computed_values() const { return static_cast<const CSS::ImmutableComputedValues&>(m_computed_values); }
|
2020-06-24 15:17:05 +03:00
|
|
|
|
2020-07-26 21:01:35 +03:00
|
|
|
void apply_style(const CSS::StyleProperties&);
|
2020-06-24 20:41:12 +03:00
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
Gfx::Font const& font() const { return *m_font; }
|
2022-11-08 14:31:24 +03:00
|
|
|
CSSPixels line_height() const { return m_line_height; }
|
2023-08-11 06:19:31 +03:00
|
|
|
void set_line_height(CSSPixels line_height) { m_line_height = line_height; }
|
2021-11-12 15:11:01 +03:00
|
|
|
Vector<CSS::BackgroundLayerData> const& background_layers() const { return computed_values().background_layers(); }
|
2022-07-31 03:11:59 +03:00
|
|
|
const CSS::AbstractImageStyleValue* list_style_image() const { return m_list_style_image; }
|
2021-01-06 13:05:23 +03:00
|
|
|
|
2022-10-17 15:41:50 +03:00
|
|
|
JS::NonnullGCPtr<NodeWithStyle> create_anonymous_wrapper() const;
|
2021-01-06 16:10:53 +03:00
|
|
|
|
2023-06-22 15:22:29 +03:00
|
|
|
void transfer_table_box_computed_values_to_wrapper_computed_values(CSS::ComputedValues& wrapper_computed_values);
|
2023-01-09 08:27:39 +03:00
|
|
|
|
2019-10-07 10:50:31 +03:00
|
|
|
protected:
|
2020-11-22 17:53:01 +03:00
|
|
|
NodeWithStyle(DOM::Document&, DOM::Node*, NonnullRefPtr<CSS::StyleProperties>);
|
2021-01-06 16:10:53 +03:00
|
|
|
NodeWithStyle(DOM::Document&, DOM::Node*, CSS::ComputedValues);
|
2019-10-07 10:50:31 +03:00
|
|
|
|
|
|
|
private:
|
2023-06-22 15:22:29 +03:00
|
|
|
void reset_table_box_computed_values_used_by_wrapper_to_init_values();
|
|
|
|
|
2021-01-06 12:34:31 +03:00
|
|
|
CSS::ComputedValues m_computed_values;
|
2023-02-20 20:56:08 +03:00
|
|
|
RefPtr<Gfx::Font const> m_font;
|
2022-11-08 14:31:24 +03:00
|
|
|
CSSPixels m_line_height { 0 };
|
2023-02-20 20:56:08 +03:00
|
|
|
RefPtr<CSS::AbstractImageStyleValue const> m_list_style_image;
|
2019-10-07 10:50:31 +03:00
|
|
|
};
|
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
class NodeWithStyleAndBoxModelMetrics : public NodeWithStyle {
|
2022-10-17 15:41:50 +03:00
|
|
|
JS_CELL(NodeWithStyleAndBoxModelMetrics, NodeWithStyle);
|
|
|
|
|
2019-10-15 17:48:38 +03:00
|
|
|
public:
|
|
|
|
BoxModelMetrics& box_model() { return m_box_model; }
|
2022-04-01 20:58:27 +03:00
|
|
|
BoxModelMetrics const& box_model() const { return m_box_model; }
|
2019-10-15 17:48:38 +03:00
|
|
|
|
|
|
|
protected:
|
2020-11-22 17:53:01 +03:00
|
|
|
NodeWithStyleAndBoxModelMetrics(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
|
|
|
|
: NodeWithStyle(document, node, move(style))
|
2019-10-15 17:48:38 +03:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-01-06 16:10:53 +03:00
|
|
|
NodeWithStyleAndBoxModelMetrics(DOM::Document& document, DOM::Node* node, CSS::ComputedValues computed_values)
|
|
|
|
: NodeWithStyle(document, node, move(computed_values))
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-10-15 17:48:38 +03:00
|
|
|
private:
|
2023-03-10 23:16:18 +03:00
|
|
|
virtual bool is_node_with_style_and_box_model_metrics() const final { return true; }
|
|
|
|
|
2019-10-15 17:48:38 +03:00
|
|
|
BoxModelMetrics m_box_model;
|
|
|
|
};
|
|
|
|
|
2023-03-10 23:16:18 +03:00
|
|
|
template<>
|
|
|
|
inline bool Node::fast_is<NodeWithStyleAndBoxModelMetrics>() const { return is_node_with_style_and_box_model_metrics(); }
|
|
|
|
|
2023-04-27 16:03:49 +03:00
|
|
|
inline bool Node::has_style_or_parent_with_style() const
|
|
|
|
{
|
|
|
|
return m_has_style || (parent() != nullptr && parent()->has_style_or_parent_with_style());
|
|
|
|
}
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
inline Gfx::Font const& Node::font() const
|
2021-01-06 13:05:23 +03:00
|
|
|
{
|
2023-04-27 16:03:49 +03:00
|
|
|
VERIFY(has_style_or_parent_with_style());
|
|
|
|
|
2021-01-06 13:05:23 +03:00
|
|
|
if (m_has_style)
|
2022-04-01 20:58:27 +03:00
|
|
|
return static_cast<NodeWithStyle const*>(this)->font();
|
2021-01-06 13:05:23 +03:00
|
|
|
return parent()->font();
|
|
|
|
}
|
|
|
|
|
2023-04-01 23:12:15 +03:00
|
|
|
inline Gfx::Font const& Node::scaled_font(PaintContext& context) const
|
|
|
|
{
|
2023-07-20 22:24:22 +03:00
|
|
|
return scaled_font(context.device_pixels_per_css_pixel());
|
|
|
|
}
|
|
|
|
|
|
|
|
inline Gfx::Font const& Node::scaled_font(float scale_factor) const
|
|
|
|
{
|
|
|
|
return *FontCache::the().scaled_font(font(), scale_factor);
|
2023-04-01 23:12:15 +03:00
|
|
|
}
|
|
|
|
|
2021-01-06 13:07:02 +03:00
|
|
|
inline const CSS::ImmutableComputedValues& Node::computed_values() const
|
2020-06-24 15:17:05 +03:00
|
|
|
{
|
2023-04-27 16:03:49 +03:00
|
|
|
VERIFY(has_style_or_parent_with_style());
|
|
|
|
|
2020-06-24 15:17:05 +03:00
|
|
|
if (m_has_style)
|
2022-04-01 20:58:27 +03:00
|
|
|
return static_cast<NodeWithStyle const*>(this)->computed_values();
|
2021-01-06 12:34:31 +03:00
|
|
|
return parent()->computed_values();
|
2020-06-24 15:17:05 +03:00
|
|
|
}
|
|
|
|
|
2022-11-08 14:31:24 +03:00
|
|
|
inline CSSPixels Node::line_height() const
|
2022-03-24 19:37:24 +03:00
|
|
|
{
|
2023-04-27 16:03:49 +03:00
|
|
|
VERIFY(has_style_or_parent_with_style());
|
|
|
|
|
2022-03-24 19:37:24 +03:00
|
|
|
if (m_has_style)
|
|
|
|
return static_cast<NodeWithStyle const*>(this)->line_height();
|
|
|
|
return parent()->line_height();
|
|
|
|
}
|
|
|
|
|
2022-04-01 20:58:27 +03:00
|
|
|
inline NodeWithStyle const* Node::parent() const
|
2019-10-07 10:50:31 +03:00
|
|
|
{
|
2022-04-01 20:58:27 +03:00
|
|
|
return static_cast<NodeWithStyle const*>(TreeNode<Node>::parent());
|
2019-10-07 10:50:31 +03:00
|
|
|
}
|
2019-10-15 15:19:52 +03:00
|
|
|
|
2020-11-22 17:53:01 +03:00
|
|
|
inline NodeWithStyle* Node::parent()
|
2019-10-18 11:16:33 +03:00
|
|
|
{
|
2020-11-22 17:53:01 +03:00
|
|
|
return static_cast<NodeWithStyle*>(TreeNode<Node>::parent());
|
2019-10-18 11:16:33 +03:00
|
|
|
}
|
|
|
|
|
2020-06-09 21:42:11 +03:00
|
|
|
}
|