Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
0øªjH2 ã @ sÜ d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
dd
lmZ ddlmZ ddlmZ eƒ Zed
dƒZed
dƒZedkr´ejdƒ edd� ZZn"eejdƒed�Zeejdƒd�ZdZejde› d�ƒZdd„ Zdd„ Zi Z dd„ Z!dd„ Z"d d!„ Z#e"d"ƒd#d$„ ƒZ$e"d%ƒd&d'„ ƒZ%e"d(ƒd)d*„ ƒZ&dFd+d,„Z'e"d-ƒd.d/„ ƒZ(e"d0ƒd1d2„ ƒZ)e"d3ƒe"d4ƒd5d6„ ƒƒZ*e"d7ƒd8d9„ ƒZ+e"d:ƒd;d<„ ƒZ,d=d>„ Z-d?d@„ Z.dAdB„ Z/ejdCej0ƒZ1dDdE„ Z2dS )Ga”
weasyprint.html
---------------
Specific handling for some HTML elements, especially replaced elements.
Replaced elements (eg.
elements) are rendered externally and
behave as an atomic opaque box in CSS. In general, they may or may not
have intrinsic dimensions. But the only replaced elements currently
supported in WeasyPrint are images with intrinsic dimensions.
é N)Úget_data)Úurljoiné )ÚCSS)Úget_child_text)ÚCounterStyle)Úboxes)ÚSVGImage)ÚLOGGER)Úget_url_attributeZ
weasyprintzcss/html5_ua.csszcss/html5_ph.cssz)User agent stylesheet could not be loadedÚ )Ústringzutf-8)r
Z
counter_stylez
z[^z]+c C s | j dƒjƒ jdƒS )a� Transform (only) ASCII letters to lower case: A-Z is mapped to a-z.
:param string: An Unicode string.
:returns: A new Unicode string.
This is used for `ASCII case-insensitive
`_ matching.
This is different from the :meth:`str.lower` method of Unicode strings
which also affect non-ASCII characters,
sometimes mapping them into the ASCII range:
>>> keyword = u'Bac\N{KELVIN SIGN}ground'
>>> assert keyword.lower() == u'background'
>>> assert ascii_lower(keyword) != keyword.lower()
>>> assert ascii_lower(keyword) == u'bac\N{KELVIN SIGN}ground'
Úutf8)ÚencodeÚlowerÚdecode)r
© r ú5/tmp/pip-build-_d5lkt3n/weasyprint/weasyprint/html.pyÚascii_lower* s r c s$ t ‡ fdd„tj| jddƒƒD ƒƒS )z•
Return whether the given element has a ``rel`` attribute with the
given link type.
:param link_type: Must be a lower-case string.
c 3 s | ]}t |ƒˆ kV qd S )N)r )Ú.0Útoken)Ú link_typer r ú I s z(element_has_link_type..Úrelr )ÚanyÚHTML_SPACE_SEPARATED_TOKENS_REÚfindallÚget)Úelementr r )r r Úelement_has_link_typeA s r c C s( |j tkrt| j | |||ƒS |gS dS )zbHandle HTML elements that need special care.
:returns: a (possibly empty) list of boxes.
N)Zelement_tagÚ
HTML_HANDLERSÚtag)r ÚboxÚget_image_from_uriÚbase_urlr r r Úhandle_elementQ s
r% c s ‡ fdd„}|S )zDReturn a decorator registering a function handling ``tag`` elements.c s | t ˆ <