1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00
Commit Graph

259 Commits

Author SHA1 Message Date
Simon Sapin
f890c3ecb0 Fix zero-width / zero-height images. 2012-06-01 10:02:48 +02:00
Simon Sapin
a30996c30a Fix counter-increment interference with display: list-item 2012-06-01 09:56:19 +02:00
Simon Sapin
a1ebd260e7 Pango also breaks on U+2029. 2012-06-01 09:45:13 +02:00
Simon Sapin
6b3837f2f9 Fix corner cases in table auto layout. 2012-06-01 09:29:28 +02:00
Simon Sapin
60625282f1 Add a script to run all W3C tests and check for exceptions. 2012-05-31 20:10:04 +02:00
Simon Sapin
71f94416da Handle preferred widths for inline tables. 2012-05-31 18:34:36 +02:00
Simon Sapin
40af5c156c Test and fix (a little) stacking contexts. 2012-05-31 17:54:43 +02:00
Simon Sapin
4f4c99e35c Remove unused imports. 2012-05-31 14:41:01 +02:00
Simon Sapin
b7cf69dc66 Download HTML URLs with the same mechanism as everything else.
Previously we passed the URLs to lxml.
lxml does not support as many protocols, and did not send
any User-Agent HTTP header.
2012-05-31 14:38:34 +02:00
Simon Sapin
ba2481b075 Fix internal and relative URIs without a base URI in CSS. 2012-05-30 20:21:36 +02:00
Simon Sapin
740160df00 Allow internal links without a base URI
... only for links in HTML attributes: <a href="#foo">

TODO: same for links in CSS: -weasy-link: url(#foo)
2012-05-30 20:06:44 +02:00
Simon Sapin
728e0aadbb Fix character encoding on W3C tests source. 2012-05-30 19:08:35 +02:00
Simon Sapin
f743567544 Draw page borders. 2012-05-30 19:06:30 +02:00
Simon Sapin
c8d6066ace Fix the available width for shrink-to-fit on absolutes. 2012-05-30 19:06:09 +02:00
Simon Sapin
773700dd73 Fix abspos test: do not account for vertical-align 2012-05-29 19:50:01 +02:00
Simon Sapin
cb76c822f2 Use the testing UA stylesheet for PDF tests. 2012-05-29 19:40:38 +02:00
Simon Sapin
17b55f309d An empty anchor is not an anchor, fragments can be %-encoded. 2012-05-29 19:11:10 +02:00
Simon Sapin
68cc901687 Attr name is only an anchor on <a> 2012-05-29 19:11:10 +02:00
Simon Sapin
a394ab5762 Work around cairo to make sure SVG image stay vectors. 2012-05-29 19:11:10 +02:00
Guillaume Ayoub
e648919f81 Fix absolute in inline relative 2012-05-29 18:50:36 +02:00
Guillaume Ayoub
35363cefee Add a test about counter scopes 2012-05-29 17:56:46 +02:00
Guillaume Ayoub
377ae0b801 Handle inline-blocks with position: relative (fixes #806)
Establishes a new containing block for absolute descendants
2012-05-29 17:36:50 +02:00
Simon Sapin
2baa8a617b Add a TODO on margins at page breaks. 2012-05-28 11:20:01 +02:00
Guillaume Ayoub
6d07a9fe21 Remove the top margin of the boxes too big to be drawn on one page 2012-05-28 00:05:09 +02:00
Simon Sapin
34f9ae32db Fix the initial containing block 2012-05-25 18:16:26 +02:00
Simon Sapin
0142ffe08e Fix static pos for block-level/inline-level abspos. 2012-05-25 17:33:43 +02:00
Simon Sapin
7cc5992fc9 Remove obsolete code. 2012-05-25 17:21:38 +02:00
Simon Sapin
b69ce3b6f3 Fix containing block on absolute tables. 2012-05-25 17:13:38 +02:00
Simon Sapin
edc72bc572 More navigation links in the test runner. 2012-05-25 16:45:58 +02:00
Simon Sapin
6e8f96ea9c Add prev/next button in the the test suit runner. 2012-05-25 16:29:46 +02:00
Simon Sapin
9a3ec6fc81 Many fixes for the W3C test suite. 2012-05-25 15:57:13 +02:00
Simon Sapin
60f8285ee2 Handle absolute replaced boxes. 2012-05-25 14:08:35 +02:00
Simon Sapin
3592cf0063 Oops. Forgot to paint absolute placeholders. 2012-05-25 12:17:37 +02:00
Simon Sapin
26937a315b Fix all the bugs for absolute positioning (maybe)
When an absolutly-positioned box is taken out of the flow,
leave a "placeholder" instead.

This should fix the bugs related to .translate() with absolutes.
2012-05-25 12:04:08 +02:00
Simon Sapin
16c015a974 Only configure logging if it is not configured already. 2012-05-24 17:44:38 +02:00
Simon Sapin
76430b5269 Also accept a parsed lxml tree for the HTML class. 2012-05-24 17:41:05 +02:00
Simon Sapin
647b2c965b Warn for relative URI references without a base URI. 2012-05-24 16:06:58 +02:00
Simon Sapin
e88401f333 Get bookmark labels after white-space processing. 2012-05-24 15:29:42 +02:00
Simon Sapin
1154f47a53 Fix -weasy-link: attr(...) with a non-existing attribute. 2012-05-23 15:13:57 +02:00
Simon Sapin
14dc5e7aff Make urlopen() extensible
There is a global dict mapping URI schemes to opener functions,
and a decorator to add such a function.

Expected usage:

from weasyprint.urls import register_opener
@register_opener('foo')
def git_urlopen(url):
    url = urlparse.urlsplit(url)
    assert url.scheme == 'foo'
    # ...
    return fileobj, mimetype, charset
2012-05-23 15:13:57 +02:00
Simon Sapin
d694a98350 Rename the utils module to 'urls' 2012-05-23 15:13:57 +02:00
Simon Sapin
982f9dbf91 Simplify capture_logs()
Now that we don’t use cssutils we only care about one logger.
2012-05-23 15:13:57 +02:00
Guillaume Ayoub
f978dd6963 Add untested support for position: fixed 2012-05-23 11:30:52 +02:00
Simon Sapin
64786ed5e9 Fix % or auto margins on tables. 2012-05-22 17:32:00 +02:00
Simon Sapin
b6ea3821b8 Remove unused imports 2012-05-22 16:34:41 +02:00
Simon Sapin
61dc177573 Refactor the PNG/PDF differences into a new 'backends' module. 2012-05-22 16:19:09 +02:00
Simon Sapin
ec91ed5ae4 Remove cached_property
Use normal properties with an explicit cache instead.
2012-05-22 15:04:20 +02:00
Simon Sapin
848bf33f87 Have PDF readers display the bookmarks by default.
... although evince seems to just ignore it.
2012-05-22 14:47:50 +02:00
Simon Sapin
267010a930 Rename destinations to anchors for internal hyperlinks. 2012-05-22 12:37:48 +02:00
Simon Sapin
d7676f8081 Test hyperlinks, fix internal hyperlink parsing. 2012-05-21 18:43:08 +02:00