mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibHTML: Add layout() overrides for LayoutText and LayoutBlock.
This commit is contained in:
parent
8cb0c765ca
commit
2e2b97dc8a
6 changed files with 38 additions and 0 deletions
|
@ -14,6 +14,17 @@ public:
|
|||
|
||||
virtual const char* class_name() const override { return "LayoutText"; }
|
||||
virtual bool is_text() const final { return true; }
|
||||
virtual void layout() override;
|
||||
|
||||
struct Run {
|
||||
Point pos;
|
||||
String text;
|
||||
};
|
||||
|
||||
const Vector<Run>& runs() const { return m_runs; }
|
||||
|
||||
private:
|
||||
void compute_runs();
|
||||
|
||||
Vector<Run> m_runs;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue