1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

LibWeb: Cache the used CSS text-align property on LayoutNodeWithStyle

This commit is contained in:
Andreas Kling 2020-06-23 23:28:40 +02:00
parent ae181e1573
commit f4ecb5362f
6 changed files with 28 additions and 16 deletions

View file

@ -259,6 +259,7 @@ public:
void set_style(const StyleProperties& style) { m_style = style; }
CSS::Position position() const { return m_position; }
CSS::TextAlign text_align() const { return m_text_align; }
protected:
explicit LayoutNodeWithStyle(const Node*, NonnullRefPtr<StyleProperties>);
@ -266,6 +267,7 @@ protected:
private:
NonnullRefPtr<StyleProperties> m_style;
CSS::Position m_position;
CSS::TextAlign m_text_align;
};
class LayoutNodeWithStyleAndBoxModelMetrics : public LayoutNodeWithStyle {