mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibWeb: Resolve border radius during layout and save it in paintables
This change fixes a problem that we should not call `to_px()` to resolve any length or percentage values during paintables traversal because that is supposed to happen while performing layout. Also it improves performance because before we were resolving border radii during each painting phase but now it happens only once during layout.
This commit is contained in:
parent
da134f6867
commit
d1d6da6ab6
8 changed files with 139 additions and 75 deletions
|
@ -188,6 +188,9 @@ public:
|
|||
|
||||
BorderRadiiData normalized_border_radii_data(ShrinkRadiiForBorders shrink = ShrinkRadiiForBorders::No) const;
|
||||
|
||||
BorderRadiiData const& border_radii_data() const { return m_border_radii_data; }
|
||||
void set_border_radii_data(BorderRadiiData const& border_radii_data) { m_border_radii_data = border_radii_data; }
|
||||
|
||||
protected:
|
||||
explicit PaintableBox(Layout::Box const&);
|
||||
|
||||
|
@ -223,6 +226,8 @@ private:
|
|||
|
||||
Optional<BordersDataWithElementKind> m_override_borders_data;
|
||||
Optional<TableCellCoordinates> m_table_cell_coordinates;
|
||||
|
||||
BorderRadiiData m_border_radii_data;
|
||||
};
|
||||
|
||||
class PaintableWithLines : public PaintableBox {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue