19#ifndef NETSURF_CSS_UTILS_H_
20#define NETSURF_CSS_UTILS_H_
22#include <libcss/libcss.h>
34 const css_computed_style *style,
bool root)
36 uint8_t value = css_computed_display(style,
root);
39 case CSS_DISPLAY_GRID:
40 return CSS_DISPLAY_BLOCK;
42 case CSS_DISPLAY_INLINE_GRID:
43 return CSS_DISPLAY_INLINE_BLOCK;
57 const css_computed_style *style)
59 uint8_t value = css_computed_display_static(style);
62 case CSS_DISPLAY_GRID:
63 return CSS_DISPLAY_BLOCK;
65 case CSS_DISPLAY_INLINE_GRID:
66 return CSS_DISPLAY_INLINE_BLOCK;
76 const css_computed_style *style,
77 css_fixed *length, css_unit *unit)
79 uint8_t value = css_computed_min_height(style, length, unit);
81 if (value == CSS_MIN_HEIGHT_AUTO) {
82 value = CSS_MIN_HEIGHT_SET;
92 const css_computed_style *style,
93 css_fixed *length, css_unit *unit)
95 uint8_t value = css_computed_min_width(style, length, unit);
97 if (value == CSS_MIN_WIDTH_AUTO) {
98 value = CSS_MIN_WIDTH_SET;
static uint8_t ns_computed_display(const css_computed_style *style, bool root)
Temporary helper wrappers for for libcss computed style getter, while we don't support all values of ...
css_fixed nscss_screen_dpi
DPI of the screen, in fixed point units.
static uint8_t ns_computed_min_height(const css_computed_style *style, css_fixed *length, css_unit *unit)
static uint8_t ns_computed_min_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
static uint8_t ns_computed_display_static(const css_computed_style *style)
Temporary helper wrappers for for libcss computed style getter, while we don't support all values of ...
static struct directory * root