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_pitch(uint32_t opv, css_style *style,
  18.                 css_select_state *state)
  19. {
  20.         css_fixed freq = 0;
  21.         uint32_t unit = UNIT_HZ;
  22.  
  23.         if (isInherit(opv) == false) {
  24.                 switch (getValue(opv)) {
  25.                 case PITCH_FREQUENCY:
  26.                         freq = *((css_fixed *) style->bytecode);
  27.                         advance_bytecode(style, sizeof(freq));
  28.                         unit = *((uint32_t *) style->bytecode);
  29.                         advance_bytecode(style, sizeof(unit));
  30.                         break;
  31.                 case PITCH_X_LOW:
  32.                 case PITCH_LOW:
  33.                 case PITCH_MEDIUM:
  34.                 case PITCH_HIGH:
  35.                 case PITCH_X_HIGH:
  36.                         /** \todo convert to public values */
  37.                         break;
  38.                 }
  39.         }
  40.  
  41.         unit = css__to_css_unit(unit);
  42.  
  43.         if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
  44.                         isInherit(opv))) {
  45.                 /** \todo pitch */
  46.         }
  47.  
  48.         return CSS_OK;
  49. }
  50.  
  51. css_error css__set_pitch_from_hint(const css_hint *hint,
  52.                 css_computed_style *style)
  53. {
  54.         UNUSED(hint);
  55.         UNUSED(style);
  56.  
  57.         return CSS_OK;
  58. }
  59.  
  60. css_error css__initial_pitch(css_select_state *state)
  61. {
  62.         UNUSED(state);
  63.  
  64.         return CSS_OK;
  65. }
  66.  
  67. css_error css__compose_pitch(const css_computed_style *parent,
  68.                 const css_computed_style *child,
  69.                 css_computed_style *result)
  70. {
  71.         UNUSED(parent);
  72.         UNUSED(child);
  73.         UNUSED(result);
  74.  
  75.         return CSS_OK;
  76. }
  77.  
  78.