From c8e5039418e2e02537a2b9f107307537e57355ff Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 6 Oct 2019 11:14:13 +0200 Subject: 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. --- Libraries/LibHTML/Layout/LayoutInline.cpp | 5 +++-- Libraries/LibHTML/Layout/LayoutInline.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'Libraries') diff --git a/Libraries/LibHTML/Layout/LayoutInline.cpp b/Libraries/LibHTML/Layout/LayoutInline.cpp index 41133cbd2d..0b0d1db62b 100644 --- a/Libraries/LibHTML/Layout/LayoutInline.cpp +++ b/Libraries/LibHTML/Layout/LayoutInline.cpp @@ -1,8 +1,9 @@ +#include #include #include -LayoutInline::LayoutInline(const Node& node, RefPtr style_properties) - : LayoutNode(&node, move(style_properties)) +LayoutInline::LayoutInline(const Element& element, NonnullRefPtr style) + : LayoutNode(&element, move(style)) { set_inline(true); } diff --git a/Libraries/LibHTML/Layout/LayoutInline.h b/Libraries/LibHTML/Layout/LayoutInline.h index 3f9f6e019a..7103afb72e 100644 --- a/Libraries/LibHTML/Layout/LayoutInline.h +++ b/Libraries/LibHTML/Layout/LayoutInline.h @@ -6,7 +6,7 @@ class LayoutBlock; class LayoutInline : public LayoutNode { public: - LayoutInline(const Node&, RefPtr); + LayoutInline(const Element&, NonnullRefPtr); virtual ~LayoutInline() override; virtual const char* class_name() const override { return "LayoutInline"; } -- cgit v1.2.3