summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Layout
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-06 11:14:13 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-06 11:26:34 +0200
commitc8e5039418e2e02537a2b9f107307537e57355ff (patch)
treef71a120f6d8e06eb444a6ffcbae2c96465d329a8 /Libraries/LibHTML/Layout
parent1b7aa00768d2415626782a51ca0adcc2fe710eb1 (diff)
downloadserenity-c8e5039418e2e02537a2b9f107307537e57355ff.zip
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.
Diffstat (limited to 'Libraries/LibHTML/Layout')
-rw-r--r--Libraries/LibHTML/Layout/LayoutInline.cpp5
-rw-r--r--Libraries/LibHTML/Layout/LayoutInline.h2
2 files changed, 4 insertions, 3 deletions
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 <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);
}
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<StyleProperties>);
+ LayoutInline(const Element&, NonnullRefPtr<StyleProperties>);
virtual ~LayoutInline() override;
virtual const char* class_name() const override { return "LayoutInline"; }