
The <br> element will produce a special LayoutBreak node in the layout tree, which forces a break in the line layout whenever encountered. This patch also makes LayoutBlock use the current line-height as the minimum effective height for each line box. This ensures that having multiple <br> elements in a row doesn't create 0-height line boxes.
16 lines
385 B
C++
16 lines
385 B
C++
#include <LibHTML/DOM/HTMLBRElement.h>
|
|
#include <LibHTML/Layout/LayoutBreak.h>
|
|
|
|
HTMLBRElement::HTMLBRElement(Document& document, const String& tag_name)
|
|
: HTMLElement(document, tag_name)
|
|
{
|
|
}
|
|
|
|
HTMLBRElement::~HTMLBRElement()
|
|
{
|
|
}
|
|
|
|
RefPtr<LayoutNode> HTMLBRElement::create_layout_node(const StyleResolver&, const StyleProperties*) const
|
|
{
|
|
return adopt(*new LayoutBreak(*this));
|
|
}
|