mirror of
https://github.com/RGBCube/serenity
synced 2025-06-20 01:52:07 +00:00

The basic idea of block layout is: width, then children based on width, then height based on height of children.
21 lines
437 B
C++
21 lines
437 B
C++
#pragma once
|
|
|
|
#include <LibHTML/Layout/LayoutNode.h>
|
|
|
|
class Element;
|
|
|
|
class LayoutBlock : public LayoutNode {
|
|
public:
|
|
explicit LayoutBlock(const Node&);
|
|
virtual ~LayoutBlock() override;
|
|
|
|
virtual const char* class_name() const override { return "LayoutBlock"; }
|
|
|
|
virtual void layout() override;
|
|
|
|
private:
|
|
virtual bool is_block() const override { return true; }
|
|
|
|
void compute_width();
|
|
void compute_height();
|
|
};
|