mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 08:18:49 +00:00
LayoutReplaced objects can now participate in inline layout. It's very hackish, but basically LayoutReplaced will just add itself to the last line in the containing block. This patch gets rid of the idea that only LayoutInline subclasses can be split into lines, by moving the split_into_lines() virtual up to LayoutNode and overriding it in LayoutReplaced.
15 lines
448 B
C++
15 lines
448 B
C++
#pragma once
|
|
|
|
#include <LibHTML/DOM/HTMLElement.h>
|
|
|
|
class HTMLImageElement : public HTMLElement {
|
|
public:
|
|
HTMLImageElement(Document&, const String& tag_name);
|
|
virtual ~HTMLImageElement() override;
|
|
|
|
String alt() const { return attribute("alt"); }
|
|
String src() const { return attribute("src"); }
|
|
|
|
private:
|
|
virtual RefPtr<LayoutNode> create_layout_node(const StyleResolver&, const StyleProperties* parent_style) const override;
|
|
};
|