芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/dompdf/dompdf/src/Css/Stylesheet.php
* @author Helmut Tischer
* @author Fabien Ménager
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\Css; use DOMElement; use DOMXPath; use Dompdf\Dompdf; use Dompdf\Helpers; use Dompdf\Exception; use Dompdf\FontMetrics; use Dompdf\Frame\FrameTree; /** * The master stylesheet class * * The Stylesheet class is responsible for parsing stylesheets and style * tags/attributes. It also acts as a registry of the individual Style * objects generated by the current set of loaded CSS files and style * elements. * * @see Style * @package dompdf */ class Stylesheet { /** * The location of the default built-in CSS file. */ const DEFAULT_STYLESHEET = "/lib/res/html.css"; /** * User agent stylesheet origin * * @var int */ const ORIG_UA = 1; /** * User normal stylesheet origin * * @var int */ const ORIG_USER = 2; /** * Author normal stylesheet origin * * @var int */ const ORIG_AUTHOR = 3; /* * The highest possible specificity is 0x01000000 (and that is only for author * stylesheets, as it is for inline styles). Origin precedence can be achieved by * adding multiples of 0x10000000 to the actual specificity. Important * declarations are handled in Style; though technically they should be handled * here so that user important declarations can be made to take precedence over * user important declarations, this doesn't matter in practice as Dompdf does * not support user stylesheets, and user agent stylesheets can not include * important declarations. */ private static $_stylesheet_origins = [ self::ORIG_UA => 0x00000000, // user agent declarations self::ORIG_USER => 0x10000000, // user normal declarations self::ORIG_AUTHOR => 0x30000000, // author normal declarations ]; /* * Non-CSS presentational hints (i.e. HTML 4 attributes) are handled as if added * to the beginning of an author stylesheet, i.e. anything in author stylesheets * should override them. */ const SPEC_NON_CSS = 0x20000000; /** * Current dompdf instance * * @var Dompdf */ private $_dompdf; /** * Array of currently defined styles * * @var Style[] */ private $_styles; /** * Base protocol of the document being parsed * Used to handle relative urls. * * @var string */ private $_protocol; /** * Base hostname of the document being parsed * Used to handle relative urls. * * @var string */ private $_base_host; /** * Base path of the document being parsed * Used to handle relative urls. * * @var string */ private $_base_path; /** * The styles defined by @page rules * * @var array