mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 16:51:52 +00:00
LibWeb: Oops, not all length boxes should default to 'auto' values
Only the offset box (left/top/right/bottom) box defaults to 'auto'. Both the padding and margin boxes default to '0' for all values.
This commit is contained in:
parent
30685a7714
commit
92d8e559ba
Notes:
sideshowbarker
2024-07-19 00:48:38 +09:00
Author: https://github.com/awesomekling
Commit: 92d8e559ba
3 changed files with 9 additions and 9 deletions
|
@ -77,13 +77,13 @@ Length StyleProperties::length_or_fallback(CSS::PropertyID id, const Length& fal
|
|||
return value.value()->to_length();
|
||||
}
|
||||
|
||||
LengthBox StyleProperties::length_box(CSS::PropertyID left_id, CSS::PropertyID top_id, CSS::PropertyID right_id, CSS::PropertyID bottom_id) const
|
||||
LengthBox StyleProperties::length_box(CSS::PropertyID left_id, CSS::PropertyID top_id, CSS::PropertyID right_id, CSS::PropertyID bottom_id, const CSS::Length& default_value) const
|
||||
{
|
||||
LengthBox box;
|
||||
box.left = length_or_fallback(left_id, CSS::Length::make_auto());
|
||||
box.top = length_or_fallback(top_id, CSS::Length::make_auto());
|
||||
box.right = length_or_fallback(right_id, CSS::Length::make_auto());
|
||||
box.bottom = length_or_fallback(bottom_id, CSS::Length::make_auto());
|
||||
box.left = length_or_fallback(left_id, default_value);
|
||||
box.top = length_or_fallback(top_id, default_value);
|
||||
box.right = length_or_fallback(right_id, default_value);
|
||||
box.bottom = length_or_fallback(bottom_id, default_value);
|
||||
return box;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue