Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of LibCSS
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
  6.  */
  7.  
  8. #include "bytecode/bytecode.h"
  9. #include "bytecode/opcodes.h"
  10. #include "select/propset.h"
  11. #include "select/propget.h"
  12. #include "utils/utils.h"
  13.  
  14. #include "select/properties/properties.h"
  15. #include "select/properties/helpers.h"
  16.  
  17. css_error css__cascade_border_bottom_style(uint32_t opv, css_style *style,
  18.                 css_select_state *state)
  19. {
  20.         return css__cascade_border_style(opv, style, state, set_border_bottom_style);
  21. }
  22.  
  23. css_error css__set_border_bottom_style_from_hint(const css_hint *hint,
  24.                 css_computed_style *style)
  25. {
  26.         return set_border_bottom_style(style, hint->status);
  27. }
  28.  
  29. css_error css__initial_border_bottom_style(css_select_state *state)
  30. {
  31.         return set_border_bottom_style(state->computed, CSS_BORDER_STYLE_NONE);
  32. }
  33.  
  34. css_error css__compose_border_bottom_style(const css_computed_style *parent,
  35.                 const css_computed_style *child,
  36.                 css_computed_style *result)
  37. {
  38.         uint8_t type = get_border_bottom_style(child);
  39.  
  40.         if (type == CSS_BORDER_STYLE_INHERIT) {
  41.                 type = get_border_bottom_style(parent);
  42.         }
  43.  
  44.         return set_border_bottom_style(result, type);
  45. }
  46.  
  47.