mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 04:59:23 +00:00
LibWeb: Make LengthBox hold LengthPercentageOrAuto
Not every user of this requires an `auto` state, but most do. This has quite a big diff but most of that is mechanical: LengthPercentageOrAuto has `resolved_or_auto()` instead of `resolved()`, and `to_px_or_zero()` instead of `to_px()`, to make their output clearer.
This commit is contained in:
parent
70609cbf4d
commit
dd122e2f74
Notes:
github-actions[bot]
2025-09-04 12:32:43 +00:00
Author: https://github.com/AtkinsSJ
Commit: dd122e2f74
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6043
17 changed files with 199 additions and 215 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2022, Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
|
||||
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -10,18 +11,18 @@
|
|||
namespace Web::CSS {
|
||||
|
||||
LengthBox::LengthBox()
|
||||
: m_top(Length::make_auto())
|
||||
, m_right(Length::make_auto())
|
||||
, m_bottom(Length::make_auto())
|
||||
, m_left(Length::make_auto())
|
||||
: m_top(LengthPercentageOrAuto::make_auto())
|
||||
, m_right(LengthPercentageOrAuto::make_auto())
|
||||
, m_bottom(LengthPercentageOrAuto::make_auto())
|
||||
, m_left(LengthPercentageOrAuto::make_auto())
|
||||
{
|
||||
}
|
||||
|
||||
LengthBox::LengthBox(LengthPercentage top, LengthPercentage right, LengthPercentage bottom, LengthPercentage left)
|
||||
: m_top(top)
|
||||
, m_right(right)
|
||||
, m_bottom(bottom)
|
||||
, m_left(left)
|
||||
LengthBox::LengthBox(LengthPercentageOrAuto top, LengthPercentageOrAuto right, LengthPercentageOrAuto bottom, LengthPercentageOrAuto left)
|
||||
: m_top(move(top))
|
||||
, m_right(move(right))
|
||||
, m_bottom(move(bottom))
|
||||
, m_left(move(left))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue