diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-06 11:14:13 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-06 11:26:34 +0200 |
commit | c8e5039418e2e02537a2b9f107307537e57355ff (patch) | |
tree | f71a120f6d8e06eb444a6ffcbae2c96465d329a8 /Libraries | |
parent | 1b7aa00768d2415626782a51ca0adcc2fe710eb1 (diff) | |
download | serenity-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')
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutInline.cpp | 5 | ||||
-rw-r--r-- | Libraries/LibHTML/Layout/LayoutInline.h | 2 |
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"; } |