mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Never blockify HTML <br> elements
This is a bit iffy, but since <br> elements can't be implemented in "just CSS" today, we should also exclude them from the blockification algorithm. This is important, since <br> is expected to always have inline-like behavior.
This commit is contained in:
@@ -19,9 +19,16 @@ public:
|
||||
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
|
||||
private:
|
||||
virtual bool is_html_br_element() const override { return true; }
|
||||
|
||||
HTMLBRElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLBRElement>() const { return is_html_br_element(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user