LibWeb: Properly serialize position/edge style values

This commit is contained in:
Gingeh 2024-11-29 22:44:14 +11:00 committed by Sam Atkins
commit 84150f972f
Notes: github-actions[bot] 2024-12-13 11:36:34 +00:00
21 changed files with 461 additions and 288 deletions

View file

@ -13,10 +13,8 @@ namespace Web::CSS {
bool PositionStyleValue::is_center() const
{
return (edge_x()->edge() == PositionEdge::Left
&& edge_x()->offset().is_percentage() && edge_x()->offset().percentage() == Percentage { 50 })
&& (edge_y()->edge() == PositionEdge::Top
&& edge_y()->offset().is_percentage() && edge_y()->offset().percentage() == Percentage { 50 });
return (edge_x()->offset().is_percentage() && edge_x()->offset().percentage() == Percentage { 50 })
&& (edge_y()->offset().is_percentage() && edge_y()->offset().percentage() == Percentage { 50 });
}
CSSPixelPoint PositionStyleValue::resolved(Layout::Node const& node, CSSPixelRect const& rect) const