mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-20 00:14:06 +03:00
html: layout helpers: Add helpers for width/height indirection
This commit is contained in:
parent
0718e58681
commit
6c2f9f3285
@ -231,6 +231,20 @@ static inline int lh__delta_outer_cross(
|
||||
}
|
||||
}
|
||||
|
||||
static inline int *lh__box_size_main(
|
||||
bool horizontal,
|
||||
struct box *b)
|
||||
{
|
||||
return horizontal ? &b->width : &b->height;
|
||||
}
|
||||
|
||||
static inline int *lh__box_size_cross(
|
||||
bool horizontal,
|
||||
struct box *b)
|
||||
{
|
||||
return horizontal ? &b->height : &b->width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine width of margin, borders, and padding on one side of a box.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user