diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-27 10:56:03 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-04-27 10:56:03 +0100 |
commit | ed0b3a8c9d3549fb0a66372d4bbd3566138c2a06 (patch) | |
tree | d3a8fc64ba19b5ed420b08d1dd9441a32be546b0 /src/select/properties/box_sizing.c | |
parent | 4729f01919b7ba3f99abfea8900931616fbb8320 (diff) | |
download | libcss-ed0b3a8c9d3549fb0a66372d4bbd3566138c2a06.tar.gz libcss-ed0b3a8c9d3549fb0a66372d4bbd3566138c2a06.tar.bz2 |
Parsing: Add support for parsing the CSS3 box-sizing property.
Diffstat (limited to 'src/select/properties/box_sizing.c')
-rw-r--r-- | src/select/properties/box_sizing.c | 66 |
1 files changed, 66 insertions, 0 deletions
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; +} + |