1
Fork 0
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:
Andreas Kling 2019-06-20 23:00:26 +02:00
parent 8cb0c765ca
commit 2e2b97dc8a
6 changed files with 38 additions and 0 deletions

View file

@ -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;
};