1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:57:35 +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:
Aliaksandr Kalenik 2023-12-07 06:16:17 +01:00 committed by Andreas Kling
parent da134f6867
commit d1d6da6ab6
8 changed files with 139 additions and 75 deletions

View file

@ -16,8 +16,6 @@
namespace Web::Painting {
BorderRadiiData normalized_border_radii_data(Layout::Node const&, CSSPixelRect const&, CSS::BorderRadiusData top_left_radius, CSS::BorderRadiusData top_right_radius, CSS::BorderRadiusData bottom_right_radius, CSS::BorderRadiusData bottom_left_radius);
enum class BorderEdge {
Top,
Right,