mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
LibWeb: Resolve CSS transform properties during layout commit
Now, instead of resolving "transform" and "transform-origin" during the construction of the stacking context tree, we do so during the layout commit. This is part of a refactoring effort to make the paintable tree independent from the layout tree.
This commit is contained in:
parent
aab3cd33f6
commit
ef0c390b79
5 changed files with 57 additions and 42 deletions
|
@ -185,6 +185,12 @@ public:
|
|||
void set_box_shadow_data(Vector<ShadowData> box_shadow_data) { m_box_shadow_data = move(box_shadow_data); }
|
||||
Vector<ShadowData> const& box_shadow_data() const { return m_box_shadow_data; }
|
||||
|
||||
void set_transform(Gfx::FloatMatrix4x4 transform) { m_transform = transform; }
|
||||
Gfx::FloatMatrix4x4 const& transform() const { return m_transform; }
|
||||
|
||||
void set_transform_origin(CSSPixelPoint transform_origin) { m_transform_origin = transform_origin; }
|
||||
CSSPixelPoint const& transform_origin() const { return m_transform_origin; }
|
||||
|
||||
protected:
|
||||
explicit PaintableBox(Layout::Box const&);
|
||||
|
||||
|
@ -219,6 +225,8 @@ private:
|
|||
|
||||
BorderRadiiData m_border_radii_data;
|
||||
Vector<ShadowData> m_box_shadow_data;
|
||||
Gfx::FloatMatrix4x4 m_transform { Gfx::FloatMatrix4x4::identity() };
|
||||
CSSPixelPoint m_transform_origin;
|
||||
};
|
||||
|
||||
class PaintableWithLines : public PaintableBox {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue