mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibHTML: Add LayoutNode classes for "display: list-item" and its marker
This patch removes the hard-coded hack for "display: list-item" from LayoutBlock and adds LayoutListItem and LayoutListItemMarker. Elements with "display: list-item" now generate a LayoutListItem, which may then also generate a LayoutListItemMarker if appropriate. :^)
This commit is contained in:
parent
d3d972820e
commit
f5bf8f6380
7 changed files with 81 additions and 13 deletions
19
Libraries/LibHTML/Layout/LayoutListItem.h
Normal file
19
Libraries/LibHTML/Layout/LayoutListItem.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibHTML/DOM/Element.h>
|
||||
#include <LibHTML/Layout/LayoutBlock.h>
|
||||
|
||||
class LayoutListItemMarker;
|
||||
|
||||
class LayoutListItem final : public LayoutBlock {
|
||||
public:
|
||||
LayoutListItem(const Element&, NonnullRefPtr<StyleProperties>);
|
||||
virtual ~LayoutListItem() override;
|
||||
|
||||
virtual void layout() override;
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "LayoutListItem"; }
|
||||
|
||||
RefPtr<LayoutListItemMarker> m_marker;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue