Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
// $Header: /cvsroot/html2ps/css.height.inc.php,v 1.27 2006/11/11 13:43:52 Konstantin Exp $
3
 
4
require_once(HTML2PS_DIR.'value.height.php');
5
 
6
class CSSHeight extends CSSPropertyHandler {
7
  var $_autoValue;
8
 
9
  function CSSHeight() {
10
    $this->CSSPropertyHandler(true, false);
11
    $this->_autoValue = ValueHeight::fromString('auto');
12
  }
13
 
14
  /**
15
   * 'height' CSS property should be inherited by table cells from table rows
16
   */
17
  function inherit($old_state, &$new_state) {
18
    $parent_display = $old_state[CSS_DISPLAY];
19
    $this->replace_array(($parent_display === 'table-row') ? $old_state[CSS_HEIGHT] : $this->default_value(),
20
                         $new_state);
21
  }
22
 
23
  function _getAutoValue() {
24
    return $this->_autoValue->copy();
25
  }
26
 
27
  function default_value() {
28
    return $this->_getAutoValue();
29
  }
30
 
31
  function parse($value) {
32
    return ValueHeight::fromString($value);
33
  }
34
 
35
  function get_property_code() {
36
    return CSS_HEIGHT;
37
  }
38
 
39
  function get_property_name() {
40
    return 'height';
41
  }
42
}
43
 
44
CSS::register_css_property(new CSSHeight);
45
 
46
?>