One Hat Cyber Team
Your IP:
216.73.216.102
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
public_html
/
assets
/
images
/
Edit File:
Positioner.tar
TableCell.php 0000644 00000001241 15107470143 0007104 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; use Dompdf\FrameDecorator\Table; /** * Positions table cells * * @package dompdf */ class TableCell extends AbstractPositioner { /** * @param AbstractFrameDecorator $frame */ function position(AbstractFrameDecorator $frame): void { $table = Table::find_parent_table($frame); $cellmap = $table->get_cellmap(); $frame->set_position($cellmap->get_frame_position($frame)); } } Block.php 0000644 00000001535 15107470144 0006316 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; /** * Positions block frames * * @package dompdf */ class Block extends AbstractPositioner { function position(AbstractFrameDecorator $frame): void { $style = $frame->get_style(); $cb = $frame->get_containing_block(); $p = $frame->find_block_parent(); if ($p) { $float = $style->float; if (!$float || $float === "none") { $p->add_line(true); } $y = $p->get_current_line_box()->y; } else { $y = $cb["y"]; } $x = $cb["x"]; $frame->set_position($x, $y); } } ListBullet.php 0000644 00000002464 15107470144 0007351 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; use Dompdf\FrameDecorator\ListBullet as ListBulletFrameDecorator; /** * Positions list bullets * * @package dompdf */ class ListBullet extends AbstractPositioner { /** * @param ListBulletFrameDecorator $frame */ function position(AbstractFrameDecorator $frame): void { // List markers are positioned to the left of the border edge of their // parent element (FIXME: right for RTL) $parent = $frame->get_parent(); $style = $parent->get_style(); $cbw = $parent->get_containing_block("w"); $margin_left = (float) $style->length_in_pt($style->margin_left, $cbw); $border_edge = $parent->get_position("x") + $margin_left; // This includes the marker indentation $x = $border_edge - $frame->get_margin_width(); // The marker is later vertically aligned with the corresponding line // box and its vertical position is fine-tuned in the renderer $p = $frame->find_block_parent(); $y = $p->get_current_line_box()->y; $frame->set_position($x, $y); } } Fixed.php 0000644 00000007054 15107470144 0006325 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; use Dompdf\FrameReflower\Block; /** * Positions fixely positioned frames */ class Fixed extends Absolute { /** * @param AbstractFrameDecorator $frame */ function position(AbstractFrameDecorator $frame): void { if ($frame->get_reflower() instanceof Block) { parent::position($frame); } else { // Legacy positioning logic for image and table frames // TODO: Resolve dimensions, margins, and offsets similar to the // block case in the reflowers and use the simplified logic above $style = $frame->get_style(); $root = $frame->get_root(); $initialcb = $root->get_containing_block(); $initialcb_style = $root->get_style(); $p = $frame->find_block_parent(); if ($p) { $p->add_line(); } // Compute the margins of the @page style $margin_top = (float)$initialcb_style->length_in_pt($initialcb_style->margin_top, $initialcb["h"]); $margin_right = (float)$initialcb_style->length_in_pt($initialcb_style->margin_right, $initialcb["w"]); $margin_bottom = (float)$initialcb_style->length_in_pt($initialcb_style->margin_bottom, $initialcb["h"]); $margin_left = (float)$initialcb_style->length_in_pt($initialcb_style->margin_left, $initialcb["w"]); // The needed computed style of the element $height = (float)$style->length_in_pt($style->get_specified("height"), $initialcb["h"]); $width = (float)$style->length_in_pt($style->get_specified("width"), $initialcb["w"]); $top = $style->length_in_pt($style->get_specified("top"), $initialcb["h"]); $right = $style->length_in_pt($style->get_specified("right"), $initialcb["w"]); $bottom = $style->length_in_pt($style->get_specified("bottom"), $initialcb["h"]); $left = $style->length_in_pt($style->get_specified("left"), $initialcb["w"]); $y = $margin_top; if (isset($top)) { $y = (float)$top + $margin_top; if ($top === "auto") { $y = $margin_top; if (isset($bottom) && $bottom !== "auto") { $y = $initialcb["h"] - $bottom - $margin_bottom; if ($frame->is_auto_height()) { $y -= $height; } else { $y -= $frame->get_margin_height(); } } } } $x = $margin_left; if (isset($left)) { $x = (float)$left + $margin_left; if ($left === "auto") { $x = $margin_left; if (isset($right) && $right !== "auto") { $x = $initialcb["w"] - $right - $margin_right; if ($frame->is_auto_width()) { $x -= $width; } else { $x -= $frame->get_margin_width(); } } } } $frame->set_position($x, $y); foreach ($frame->get_children() as $child) { $child->set_position($x, $y); } } } } TableRow.php 0000644 00000001353 15107470144 0007001 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; /** * Positions table rows * * @package dompdf */ class TableRow extends AbstractPositioner { /** * @param AbstractFrameDecorator $frame */ function position(AbstractFrameDecorator $frame): void { $cb = $frame->get_containing_block(); $p = $frame->get_prev_sibling(); if ($p) { $y = $p->get_position("y") + $p->get_margin_height(); } else { $y = $cb["y"]; } $frame->set_position($cb["x"], $y); } } Inline.php 0000644 00000002747 15107470144 0006510 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; use Dompdf\FrameDecorator\Inline as InlineFrameDecorator; use Dompdf\Exception; use Dompdf\Helpers; /** * Positions inline frames * * @package dompdf */ class Inline extends AbstractPositioner { /** * @param AbstractFrameDecorator $frame * @throws Exception */ function position(AbstractFrameDecorator $frame): void { // Find our nearest block level parent and access its lines property $block = $frame->find_block_parent(); if (!$block) { throw new Exception("No block-level parent found. Not good."); } $cb = $frame->get_containing_block(); $line = $block->get_current_line_box(); if (!$frame->is_text_node() && !($frame instanceof InlineFrameDecorator)) { // Atomic inline boxes and replaced inline elements // (inline-block, inline-table, img etc.) $width = $frame->get_margin_width(); $available_width = $cb["w"] - $line->left - $line->w - $line->right; if (Helpers::lengthGreater($width, $available_width)) { $block->add_line(); $line = $block->get_current_line_box(); } } $frame->set_position($cb["x"] + $line->w, $line->y); } } AbstractPositioner.php 0000644 00000002163 15107470144 0011101 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; /** * Base AbstractPositioner class * * Defines positioner interface * * @package dompdf */ abstract class AbstractPositioner { /** * @param AbstractFrameDecorator $frame */ abstract function position(AbstractFrameDecorator $frame): void; /** * @param AbstractFrameDecorator $frame * @param float $offset_x * @param float $offset_y * @param bool $ignore_self */ function move( AbstractFrameDecorator $frame, float $offset_x, float $offset_y, bool $ignore_self = false ): void { [$x, $y] = $frame->get_position(); if (!$ignore_self) { $frame->set_position($x + $offset_x, $y + $offset_y); } foreach ($frame->get_children() as $child) { $child->move($offset_x, $offset_y); } } } NullPositioner.php 0000644 00000000757 15107470145 0010260 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; /** * Dummy positioner * * @package dompdf */ class NullPositioner extends AbstractPositioner { /** * @param AbstractFrameDecorator $frame */ function position(AbstractFrameDecorator $frame): void { return; } } Absolute.php 0000644 00000011074 15107470145 0007042 0 ustar 00 <?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Positioner; use Dompdf\FrameDecorator\AbstractFrameDecorator; use Dompdf\FrameReflower\Block; /** * Positions absolutely positioned frames */ class Absolute extends AbstractPositioner { /** * @param AbstractFrameDecorator $frame */ function position(AbstractFrameDecorator $frame): void { if ($frame->get_reflower() instanceof Block) { $style = $frame->get_style(); [$cbx, $cby, $cbw, $cbh] = $frame->get_containing_block(); // If the `top` value is `auto`, the frame will be repositioned // after its height has been resolved $left = (float) $style->length_in_pt($style->left, $cbw); $top = (float) $style->length_in_pt($style->top, $cbh); $frame->set_position($cbx + $left, $cby + $top); } else { // Legacy positioning logic for image and table frames // TODO: Resolve dimensions, margins, and offsets similar to the // block case in the reflowers and use the simplified logic above $style = $frame->get_style(); $block_parent = $frame->find_block_parent(); $current_line = $block_parent->get_current_line_box(); list($x, $y, $w, $h) = $frame->get_containing_block(); $inflow_x = $block_parent->get_content_box()["x"] + $current_line->left + $current_line->w; $inflow_y = $current_line->y; $top = $style->length_in_pt($style->top, $h); $right = $style->length_in_pt($style->right, $w); $bottom = $style->length_in_pt($style->bottom, $h); $left = $style->length_in_pt($style->left, $w); list($width, $height) = [$frame->get_margin_width(), $frame->get_margin_height()]; $orig_width = $style->get_specified("width"); $orig_height = $style->get_specified("height"); /**************************** * * Width auto: * ____________| left=auto | left=fixed | * right=auto | A | B | * right=fixed | C | D | * * Width fixed: * ____________| left=auto | left=fixed | * right=auto | E | F | * right=fixed | G | H | *****************************/ if ($left === "auto") { if ($right === "auto") { // A or E - Keep the frame at the same position $x = $inflow_x; } else { if ($orig_width === "auto") { // C $x += $w - $width - $right; } else { // G $x += $w - $width - $right; } } } else { if ($right === "auto") { // B or F $x += (float)$left; } else { if ($orig_width === "auto") { // D - TODO change width $x += (float)$left; } else { // H - Everything is fixed: left + width win $x += (float)$left; } } } // The same vertically if ($top === "auto") { if ($bottom === "auto") { // A or E - Keep the frame at the same position $y = $inflow_y; } else { if ($orig_height === "auto") { // C $y += (float)$h - $height - (float)$bottom; } else { // G $y += (float)$h - $height - (float)$bottom; } } } else { if ($bottom === "auto") { // B or F $y += (float)$top; } else { if ($orig_height === "auto") { // D - TODO change height $y += (float)$top; } else { // H - Everything is fixed: top + height win $y += (float)$top; } } } $frame->set_position($x, $y); } } }
Simpan