4 * @link http://dompdf.github.com/
5 * @author Benj Carson <benjcarson@digitaljunkies.ca>
6 * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8 namespace Dompdf\FrameReflower
;
10 use Dompdf\FrameDecorator\Block
as BlockFrameDecorator
;
11 use Dompdf\FrameDecorator\Table
as TableFrameDecorator
;
14 * Reflows table row groups (e.g. tbody tags)
18 class TableRowGroup
extends AbstractFrameReflower
21 function __construct($frame)
23 parent
::__construct($frame);
26 function reflow(BlockFrameDecorator
$block = null)
28 $page = $this->_frame
->get_root();
30 $style = $this->_frame
->get_style();
32 // Our width is equal to the width of our parent table
33 $table = TableFrameDecorator
::find_parent_table($this->_frame
);
35 $cb = $this->_frame
->get_containing_block();
37 foreach ($this->_frame
->get_children() as $child) {
38 // Bail if the page is full
42 $child->set_containing_block($cb["x"], $cb["y"], $cb["w"], $cb["h"]);
45 // Check if a split has occured
46 $page->check_page_break($child);
53 $cellmap = $table->get_cellmap();
54 $style->width
= $cellmap->get_frame_width($this->_frame
);
55 $style->height
= $cellmap->get_frame_height($this->_frame
);
57 $this->_frame
->set_position($cellmap->get_frame_position($this->_frame
));
59 if ($table->get_style()->border_collapse
=== "collapse")
60 // Unset our borders because our cells are now using them
61 $style->border_style
= "none";