1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:05:08 +00:00
serenity/Userland/Libraries/LibWeb/Layout/InlineNode.h
Sam Atkins 7bb721bea2 LibWeb: Make display: foo box constructors take the Element by pointer
This means we can instantiate them for pseudo-elements, which don't have
an associated Element. They all pass it to their parent as a
`Layout::Node*` and handle a lack of `layout_node()` already so this
won't affect any functionality.
2022-02-25 19:35:34 +01:00

25 lines
523 B
C++

/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Layout/Box.h>
namespace Web::Layout {
class InlineNode : public NodeWithStyleAndBoxModelMetrics {
public:
InlineNode(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
virtual ~InlineNode() override;
virtual void paint(PaintContext&, PaintPhase) override;
private:
template<typename Callback>
void for_each_fragment(Callback);
};
}