2020-01-18 05:38:21 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2019-10-12 08:47:49 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-07-26 10:08:16 -03:00
|
|
|
#include <LibWeb/HTML/HTMLBRElement.h>
|
2020-11-22 11:53:01 -03:00
|
|
|
#include <LibWeb/Layout/Node.h>
|
2019-10-12 08:47:49 -03:00
|
|
|
|
2020-11-22 11:53:01 -03:00
|
|
|
namespace Web::Layout {
|
2020-03-07 06:27:02 -03:00
|
|
|
|
2020-11-22 11:53:01 -03:00
|
|
|
class BreakNode final : public NodeWithStyleAndBoxModelMetrics {
|
2019-10-12 08:47:49 -03:00
|
|
|
public:
|
2020-11-22 11:53:01 -03:00
|
|
|
BreakNode(DOM::Document&, HTML::HTMLBRElement&);
|
|
|
|
|
virtual ~BreakNode() override;
|
2019-10-12 08:47:49 -03:00
|
|
|
|
2021-06-24 14:53:42 -03:00
|
|
|
const HTML::HTMLBRElement& dom_node() const { return verify_cast<HTML::HTMLBRElement>(*Node::dom_node()); }
|
2019-10-12 08:47:49 -03:00
|
|
|
|
|
|
|
|
private:
|
2021-09-15 09:53:44 -03:00
|
|
|
virtual void paint(PaintContext&, PaintPhase) override;
|
|
|
|
|
|
2020-12-05 16:10:39 -03:00
|
|
|
virtual void split_into_lines(InlineFormattingContext&, LayoutMode) override;
|
2019-10-12 08:47:49 -03:00
|
|
|
};
|
2020-03-07 06:27:02 -03:00
|
|
|
|
|
|
|
|
}
|