mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb: Properly serialize position/edge style values
This commit is contained in:
parent
583ca6af89
commit
84150f972f
Notes:
github-actions[bot]
2024-12-13 11:36:34 +00:00
Author: https://github.com/Gingeh
Commit: 84150f972f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2651
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/awesomekling
21 changed files with 461 additions and 288 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue