<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;?php
/**
 * DOMPDF - PHP5 HTML to PDF renderer
 *
 * File: $RCSfile: table_row_frame_reflower.cls.php,v $
 * Created on: 2004-06-17
 *
 * Copyright (c) 2004 - Benj Carson &lt;benjcarson@digitaljunkies.ca&gt;
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library in the file LICENSE.LGPL; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 * 02111-1307 USA
 *
 * Alternatively, you may distribute this software under the terms of the
 * PHP License, version 3.0 or later.  A copy of this license should have
 * been distributed with this file in the file LICENSE.PHP .  If this is not
 * the case, you can obtain a copy at http://www.php.net/license/3_0.txt.
 *
 * The latest version of DOMPDF might be available at:
 * http://www.dompdf.com/
 *
 * @link http://www.dompdf.com/
 * @copyright 2004 Benj Carson
 * @author Benj Carson &lt;benjcarson@digitaljunkies.ca&gt;
 * @package dompdf

 */

/* $Id: table_row_frame_reflower.cls.php 216 2010-03-11 22:49:18Z ryan.masten $ */

/**
 * Reflows table rows
 *
 * @access private
 * @package dompdf
 */
class Table_Row_Frame_Reflower extends Frame_Reflower {


  function __construct(Table_Row_Frame_Decorator $frame) {
    parent::__construct($frame);
  }

  //........................................................................

  function reflow() {
    $page = $this-&gt;_frame-&gt;get_root();

    if ( $page-&gt;is_full() )
      return;

    $this-&gt;_frame-&gt;position();
    $style = $this-&gt;_frame-&gt;get_style();
    $cb = $this-&gt;_frame-&gt;get_containing_block();

    foreach ($this-&gt;_frame-&gt;get_children() as $child) {

      if ( $page-&gt;is_full() )
        return;

      $child-&gt;set_containing_block($cb);
      $child-&gt;reflow();

    }

    if ( $page-&gt;is_full() )
      return;

    $table = Table_Frame_Decorator::find_parent_table($this-&gt;_frame);
    $cellmap = $table-&gt;get_cellmap();
    $style-&gt;width = $cellmap-&gt;get_frame_width($this-&gt;_frame);
    $style-&gt;height = $cellmap-&gt;get_frame_height($this-&gt;_frame);

    $this-&gt;_frame-&gt;set_position($cellmap-&gt;get_frame_position($this-&gt;_frame));

  }

  //........................................................................

  function get_min_max_width() {
    throw new DOMPDF_Exception("Min/max width is undefined for table rows");
  }
}
</pre></body></html>