1<?php
2
3class PostTreeFilterPostponed extends PreTreeFilter {
4  var $_driver;
5
6  function PostTreeFilterPostponed(&$driver) {
7    $this->_driver  =& $driver;
8  }
9
10  function process(&$tree, $data, &$pipeline) {
11    if (is_a($tree, 'GenericContainerBox')) {
12      for ($i=0; $i<count($tree->content); $i++) {
13        $position = $tree->content[$i]->get_css_property(CSS_POSITION);
14        $float    = $tree->content[$i]->get_css_property(CSS_FLOAT);
15
16        if ($position == POSITION_RELATIVE) {
17          $this->_driver->postpone($tree->content[$i]);
18        } elseif ($float != FLOAT_NONE) {
19          $this->_driver->postpone($tree->content[$i]);
20        };
21
22        $this->process($tree->content[$i], $data, $pipeline);
23      };
24    };
25
26    return true;
27  }
28}
29?>