mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
LibWeb: Add helpers for adding margin box to flex item's content size
This commit is contained in:
parent
c2a1817c70
commit
b71f747453
Notes:
sideshowbarker
2024-07-17 08:36:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b71f747453
@ -61,6 +61,16 @@ private:
|
||||
DirectionAgnosticMargins padding {};
|
||||
bool is_min_violation { false };
|
||||
bool is_max_violation { false };
|
||||
|
||||
float add_main_margin_box_sizes(float content_size) const
|
||||
{
|
||||
return content_size + margins.main_before + margins.main_after + borders.main_before + borders.main_after + padding.main_before + padding.main_after;
|
||||
}
|
||||
|
||||
float add_cross_margin_box_sizes(float content_size) const
|
||||
{
|
||||
return content_size + margins.cross_before + margins.cross_after + borders.cross_before + borders.cross_after + padding.cross_before + padding.cross_after;
|
||||
}
|
||||
};
|
||||
|
||||
struct FlexLine {
|
||||
|
Loading…
Reference in New Issue
Block a user