diff options
Diffstat (limited to 'src/select')
-rw-r--r-- | src/select/dispatch.c | 5 | ||||
-rw-r--r-- | src/select/properties/Makefile | 1 | ||||
-rw-r--r-- | src/select/properties/box_sizing.c | 66 | ||||
-rw-r--r-- | src/select/properties/properties.h | 1 |
4 files changed, 73 insertions, 0 deletions
diff --git a/src/select/dispatch.c b/src/select/dispatch.c index 326da58..7af9000 100644 --- a/src/select/dispatch.c +++ b/src/select/dispatch.c @@ -582,5 +582,10 @@ struct prop_table prop_dispatch[CSS_N_PROPERTIES] = { PROPERTY_FUNCS(overflow_y), 0, GROUP_NORMAL + }, + { + PROPERTY_FUNCS(box_sizing), + 0, + GROUP_NORMAL } }; diff --git a/src/select/properties/Makefile b/src/select/properties/Makefile index ce3ddfa..288eda9 100644 --- a/src/select/properties/Makefile +++ b/src/select/properties/Makefile @@ -21,6 +21,7 @@ border_top_color.c \ border_top_style.c \ border_top_width.c \ bottom.c \ +box_sizing.c \ break_after.c \ break_before.c \ break_inside.c \ diff --git a/src/select/properties/box_sizing.c b/src/select/properties/box_sizing.c new file mode 100644 index 0000000..357dd3c --- /dev/null +++ b/src/select/properties/box_sizing.c @@ -0,0 +1,66 @@ +/* + * This file is part of LibCSS + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2017 Michael Drake <tlsa@netsurf-browser.org> + */ + +#include "bytecode/bytecode.h" +#include "bytecode/opcodes.h" +#include "select/propset.h" +#include "select/propget.h" +#include "utils/utils.h" + +#include "select/properties/properties.h" +#include "select/properties/helpers.h" + +css_error css__cascade_box_sizing(uint32_t opv, css_style *style, + css_select_state *state) +{ + UNUSED(style); + + if (isInherit(opv) == false) { + switch (getValue(opv)) { + case BOX_SIZING_CONTENT_BOX: + case BOX_SIZING_BORDER_BOX: + /** \todo convert to public values */ + break; + } + } + + if (css__outranks_existing(getOpcode(opv), isImportant(opv), state, + isInherit(opv))) { + /** \todo set computed value */ + } + + return CSS_OK; +} + +css_error css__set_box_sizing_from_hint(const css_hint *hint, + css_computed_style *style) +{ + UNUSED(hint); + UNUSED(style); + + return CSS_OK; +} + +css_error css__initial_box_sizing(css_select_state *state) +{ + UNUSED(state); + + return CSS_OK; +} + +css_error css__compose_box_sizing( + const css_computed_style *parent, + const css_computed_style *child, + css_computed_style *result) +{ + UNUSED(parent); + UNUSED(child); + UNUSED(result); + + return CSS_OK; +} + diff --git a/src/select/properties/properties.h b/src/select/properties/properties.h index f0ab29d..a1ab49f 100644 --- a/src/select/properties/properties.h +++ b/src/select/properties/properties.h @@ -42,6 +42,7 @@ PROPERTY_FUNCS(border_right_width); PROPERTY_FUNCS(border_bottom_width); PROPERTY_FUNCS(border_left_width); PROPERTY_FUNCS(bottom); +PROPERTY_FUNCS(box_sizing); PROPERTY_FUNCS(break_after); PROPERTY_FUNCS(break_before); PROPERTY_FUNCS(break_inside); |