mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-08 20:12:01 +03:00
Box: Add helper to check if box is first child.
This commit is contained in:
parent
948207472a
commit
049695fa07
@ -366,4 +366,15 @@ bool box_normalise_block(
|
||||
const struct box *root,
|
||||
struct html_content *c);
|
||||
|
||||
/**
|
||||
* Check if layout box is a first child.
|
||||
*
|
||||
* \param[in] b Box to check.
|
||||
* \return true iff box is first child.
|
||||
*/
|
||||
static inline bool box_is_first_child(struct box *b)
|
||||
{
|
||||
return (b->parent == NULL || b == b->parent->children);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user