1<?php
2
3class BodyBox extends BlockBox {
4  function BodyBox() {
5    $this->BlockBox();
6  }
7
8  function &create(&$root, &$pipeline) {
9    $box = new BodyBox();
10    $box->readCSS($pipeline->get_current_css_state());
11    $box->create_content($root, $pipeline);
12    return $box;
13  }
14
15  function get_bottom_background() {
16    return $this->get_bottom_margin();
17  }
18
19  function get_left_background()   {
20    return $this->get_left_margin();
21  }
22
23  function get_right_background()  {
24    return $this->get_right_margin();
25  }
26
27  function get_top_background()    {
28    return $this->get_top_margin();
29  }
30
31  function reflow(&$parent, &$context) {
32    parent::reflow($parent, $context);
33
34    // Extend the body height to fit all contained floats
35    $float_bottom = $context->float_bottom();
36    if (!is_null($float_bottom)) {
37      $this->extend_height($float_bottom);
38    };
39  }
40}
41
42?>