1<?php
2
3class PostTreeFilterPositioned extends PreTreeFilter {
4  var $_context;
5
6  function PostTreeFilterPositioned(&$context) {
7    $this->_context =& $context;
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_ABSOLUTE) {
17          $this->_context->add_absolute_positioned($tree->content[$i]);
18        } elseif ($position == POSITION_FIXED) {
19          $this->_context->add_fixed_positioned($tree->content[$i]);
20        };
21
22        $this->process($tree->content[$i], $data, $pipeline);
23      };
24    };
25
26    return true;
27  }
28}
29?>