mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibHTML: LayoutInline can only be constructed with an Element
Since LayoutText no longer inherits from LayoutInline, all of the DOM nodes with a LayoutInline are going to be Elements.
This commit is contained in:
parent
1b7aa00768
commit
c8e5039418
Notes:
sideshowbarker
2024-07-19 11:48:04 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c8e5039418e
2 changed files with 4 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
|||
#include <LibHTML/DOM/Element.h>
|
||||
#include <LibHTML/Layout/LayoutBlock.h>
|
||||
#include <LibHTML/Layout/LayoutInline.h>
|
||||
|
||||
LayoutInline::LayoutInline(const Node& node, RefPtr<StyleProperties> style_properties)
|
||||
: LayoutNode(&node, move(style_properties))
|
||||
LayoutInline::LayoutInline(const Element& element, NonnullRefPtr<StyleProperties> style)
|
||||
: LayoutNode(&element, move(style))
|
||||
{
|
||||
set_inline(true);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class LayoutBlock;
|
|||
|
||||
class LayoutInline : public LayoutNode {
|
||||
public:
|
||||
LayoutInline(const Node&, RefPtr<StyleProperties>);
|
||||
LayoutInline(const Element&, NonnullRefPtr<StyleProperties>);
|
||||
virtual ~LayoutInline() override;
|
||||
|
||||
virtual const char* class_name() const override { return "LayoutInline"; }
|
||||
|
|
Loading…
Add table
Reference in a new issue