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

535 Commits

Author SHA1 Message Date
Simon Sapin
26b4f57292 Implement vertical-align: top/bottom. 2012-06-08 18:49:10 +02:00
Simon Sapin
09895757ca Now passing Acid 2! 2012-06-08 17:17:19 +02:00
Simon Sapin
fd6c5451e0 Merge branch 'master' into float 2012-06-08 17:16:31 +02:00
Guillaume Ayoub
85df2ebe47 Fix the struts and heights of line/inline boxes. (For real this time. Maybe.) 2012-06-08 17:13:45 +02:00
Guillaume Ayoub
9b3e66ccbe Ignore tests with dom or interact flag 2012-06-06 15:01:42 +02:00
Simon Sapin
d0a5a0b8f1 Fix borders on inline boxes split by a block inside. 2012-06-06 13:27:50 +02:00
Guillaume Ayoub
6cbdab0799 Fix various tests, remove monkeypatch validation 2012-06-06 12:52:02 +02:00
Simon Sapin
706113c24b Revert "Make the strut have an effect on line boxes"
This reverts commit d88ecbb6ba.
2012-06-06 12:05:59 +02:00
Guillaume Ayoub
043d71dc29 Pass the fixed_boxes argument instead of using current_page 2012-06-06 12:04:09 +02:00
Simon Sapin
61c335766a Next is 0.10 2012-06-06 11:21:06 +02:00
Guillaume Ayoub
568e0aeb70 Fix the drawing order of fixed boxes 2012-06-06 09:49:56 +02:00
Guillaume Ayoub
d88ecbb6ba Make the strut have an effect on line boxes 2012-06-05 17:56:58 +02:00
Guillaume Ayoub
39e503858d Fix margin collapsing with clearance 2012-06-05 17:14:33 +02:00
Simon Sapin
d4409e8f46 Add the Acid2 test (marked as expected failure). 2012-06-05 13:52:57 +02:00
Simon Sapin
182f1883c9 Disable anti-aliasing on background-color
Prefer crisp edges for the rectangle. I think this only
affects the PNG output, not PDF.
2012-06-05 11:27:51 +02:00
Simon Sapin
1624335b40 Remove useless "computed values" functions. 2012-06-05 10:33:19 +02:00
Guillaume Ayoub
9e30396036 Merge branch 'master' into float 2012-06-04 19:34:01 +02:00
Guillaume Ayoub
505ee8de26 Handle the mix/max-widths/heights for absolute and float 2012-06-04 19:22:18 +02:00
Simon Sapin
4ec6757077 Tag v0.9 2012-06-04 18:57:50 +02:00
Simon Sapin
cad7d5604c Fix tests for the "strut" change on containing blocks. 2012-06-04 18:51:50 +02:00
Simon Sapin
53a05b2aa7 Fix the fix on inline-block painting. 2012-06-04 18:49:13 +02:00
Guillaume Ayoub
5cab59c483 Merge branch 'master' into float 2012-06-04 17:51:26 +02:00
Guillaume Ayoub
c3b2f2f440 Draw the replaced elements into the content box (not padding box) 2012-06-04 17:42:58 +02:00
Guillaume Ayoub
309264a517 Merge branch 'master' into float 2012-06-04 16:37:20 +02:00
Guillaume Ayoub
71fc11ea97 Draw the borders of inline 2012-06-04 16:36:55 +02:00
Guillaume Ayoub
3684c8ed0d Merge branch 'master' into float 2012-06-04 16:09:10 +02:00
Guillaume Ayoub
9836f66d33 Account for the "strut" on block containers.
http://www.w3.org/TR/CSS21/visudet.html#line-height
2012-06-04 16:07:39 +02:00
Guillaume Ayoub
aac60c9aee Merge branch 'master' into float
Conflicts:
	weasyprint/stacking.py
2012-06-04 16:06:25 +02:00
Simon Sapin
cfda2f1e20 Fix the painting order of inline-blocks. 2012-06-04 15:09:59 +02:00
Simon Sapin
74cfe8625b Fix painting order of nested stacking contexts. 2012-06-04 12:49:10 +02:00
Simon Sapin
434f510d94 Stacking contexts: dispatch the box itself, not just its children. 2012-06-04 10:46:24 +02:00
Simon Sapin
a8efed1bf1 Do not crash on SVG images without an intrinsic size. 2012-06-04 09:02:47 +02:00
Guillaume Ayoub
10eabe5e18 Insert the absolute boxes before their own children 2012-06-04 01:54:51 +02:00
Guillaume Ayoub
95a74c2abb Merge branch 'master' into float 2012-06-02 13:57:18 +02:00
Guillaume Ayoub
b732ba09d4 Merge branch 'float' of github.com:Kozea/WeasyPrint into float
Conflicts:
	weasyprint/layout/pages.py
2012-06-02 13:56:49 +02:00
Simon Sapin
86bb8eede8 Fix margin boxes positionning. 2012-06-02 13:04:33 +02:00
Simon Sapin
5dde5d47e5 Handle degerate rowspan values.
Previously, such values crashed the layout.
2012-06-02 09:02:24 +02:00
Simon Sapin
b1361612c6 Fix floating tables. 2012-06-02 08:46:11 +02:00
Simon Sapin
4c5a1a1e2a Fix absolute tables. 2012-06-02 08:45:39 +02:00
Simon Sapin
592caf55e0 Fix calls to preferred after merging the hinting fix.
Conflicts:
	weasyprint/layout/pages.py
	weasyprint/layout/preferred.py
2012-06-02 08:36:56 +02:00
Simon Sapin
81a63a8ca7 Merge branch 'master' into float
Conflicts:
	weasyprint/layout/pages.py
	weasyprint/layout/preferred.py
2012-06-02 08:35:17 +02:00
Simon Sapin
3cd540eaa9 Fix shrink-to-fit in PNG: have the same hinting as in layout. 2012-06-02 08:28:41 +02:00
Simon Sapin
972045c63f Accept both unicode and bytes filenames. 2012-06-02 08:04:24 +02:00
Simon Sapin
1f6ba609ba Bind to sys.stdin/stdout later. 2012-06-02 06:28:44 +02:00
Simon Sapin
1bb70b09c8 Fix the test runner. 2012-06-01 20:05:18 +02:00
Simon Sapin
95e0ad2707 Warn instead of crash on missing on #foo without id="foo" 2012-06-01 18:32:43 +02:00
Simon Sapin
2179957e4a Fix lines vs. anonymous blocks in precence of floats. 2012-06-01 17:08:54 +02:00
Guillaume Ayoub
a84d4af491 Merge branch 'master' into float
Conflicts:
	weasyprint/layout/pages.py
2012-06-01 16:08:03 +02:00
Simon Sapin
41d3cd3287 Fix percentage max-height without a containing block height. 2012-06-01 10:47:29 +02:00
Simon Sapin
491299f668 Content-empty pages need layout and margin boxes too. 2012-06-01 10:30:06 +02:00
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
Guillaume Ayoub
c00881790c Increase the auto height of block formatting context roots 2012-05-31 22:33:28 +02:00
Guillaume Ayoub
2f697b47fd Merge branch 'master' into float 2012-05-31 21:11:08 +02:00
Guillaume Ayoub
d3ea76ffbf Keep float elements to get preferred widths 2012-05-31 21:05:10 +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
Guillaume Ayoub
afd1ce9c85 Create a new block formatting context for non-block block containers 2012-05-31 20:03:10 +02:00
Guillaume Ayoub
0ce3237518 Create a block formatting context for absolute elements 2012-05-31 19:55:43 +02:00
Guillaume Ayoub
8eead6332b Don't add the floats in the excluded shapes twice 2012-05-31 19:55:29 +02:00
Simon Sapin
71f94416da Handle preferred widths for inline tables. 2012-05-31 18:34:36 +02:00
Guillaume Ayoub
deb7bac3b2 Set the column_widths attribute for float tables 2012-05-31 18:08:58 +02:00
Simon Sapin
ffd03a578b Merge branch 'master' into float 2012-05-31 17:56:31 +02:00
Simon Sapin
40af5c156c Test and fix (a little) stacking contexts. 2012-05-31 17:54:43 +02:00
Guillaume Ayoub
4c55eba456 Don't layout the absolute boxes in the float layout 2012-05-31 16:46:53 +02:00
Simon Sapin
2c3e0e825d Fix Py3k compat: next(iterator) instead of iterator.next() 2012-05-31 14:59:34 +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
Guillaume Ayoub
8d42985c76 Remove useless variables for floats 2012-05-31 03:04:51 +02:00
Guillaume Ayoub
ec3e1943d5 Remove the useless float placeholder 2012-05-31 02:45:16 +02:00
Guillaume Ayoub
d747fafe7f Use named parameters when needed in inline_preferred_minimun_width 2012-05-31 02:08:33 +02:00
Guillaume Ayoub
69c43e6d6c Allow the preferred minimum width of inline elements to get only the first line 2012-05-31 02:05:35 +02:00
Guillaume Ayoub
bc27971ac6 Typo fixes 2012-05-31 01:14:15 +02:00
Guillaume Ayoub
3bb002e61f Correcly handle float elements in inline blocks 2012-05-31 00:22:14 +02:00
Guillaume Ayoub
ea7993e4eb Fix a lot of things for float boxes 2012-05-30 23:40:54 +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
Guillaume Ayoub
a225f194e8 Handle the clearance for non-float block-level boxes 2012-05-30 19:27:44 +02:00
Simon Sapin
037e4b955c Merge branch 'master' into float 2012-05-30 19:08:48 +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
a9512c12b6 Fix the available width for shrink-to-fit on floats. 2012-05-30 19:05:35 +02:00
Guillaume Ayoub
6a6757a52c That's much better 2012-05-30 04:19:24 +02:00
Guillaume Ayoub
d4ccf3db63 Remove monkey patches about float 2012-05-30 03:36:37 +02:00
Guillaume Ayoub
6449ee4cbf Absolute doesn't work yet, but much better than before 2012-05-30 03:27:08 +02:00
Guillaume Ayoub
6e56816727 Use utf-8 as encoding for w3 tests 2012-05-30 00:50:17 +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
51a809fa37 Add the missing file :p 2012-05-29 18:51:40 +02:00
Guillaume Ayoub
44adb875e3 Add basic management of float elements 2012-05-29 18:51:40 +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
Simon Sapin
280dcbd121 Test bookmark labels and positions. 2012-05-21 14:56:10 +02:00
Simon Sapin
866efdf62c Do not repeat bookmarks on a fragmented box
Also a better way not to repeat margin/padding/border and list markers.
2012-05-21 14:22:32 +02:00
Simon Sapin
6420d1aab6 Merge branch 'links' 2012-05-21 11:48:21 +02:00
Simon Sapin
33cd706f0d Refactor the metadata stuff into the pdf module. 2012-05-20 17:04:22 +02:00
Simon Sapin
1b3f7d478f Test the PDF parser (but not writer) 2012-05-20 16:11:50 +02:00
Simon Sapin
b1b5d85b41 Write bookmarks and links with the new PDF module. 2012-05-20 15:55:57 +02:00
Simon Sapin
8b994c2ec6 Use the new pdf module. 2012-05-20 13:56:04 +02:00
Simon Sapin
699af8a9f5 Remove the old pdf module. 2012-05-20 13:55:07 +02:00
Simon Sapin
c4706538e0 PDF: nicer bytes formatting 2012-05-20 13:44:38 +02:00
Simon Sapin
6b37dbd0f3 Python 2.6 compat. 2012-05-20 13:05:38 +02:00
Simon Sapin
6498c3fb00 Refactor PDF dictionaries. 2012-05-20 13:00:39 +02:00
Simon Sapin
6e7ef6b62a New PDF: add support for (over)writing objects. 2012-05-20 12:46:33 +02:00
Simon Sapin
5da826520b Start a more robust PDF parser. 2012-05-19 15:03:07 +02:00
Simon Sapin
d974d410b7 Fix URL quoting on Python 2.6 2012-05-18 17:54:10 +02:00
Simon Sapin
c828f3835d Avoid using OrderedDict (for Python 2.6). 2012-05-18 17:18:58 +02:00
Simon Sapin
383f7b642b PDF: use a line iterator instead of .pop(0) 2012-05-18 16:31:39 +02:00
Guillaume Ayoub
525f1030c5 Useless typo 2012-05-18 16:23:08 +02:00
Guillaume Ayoub
9211fa570d Remove borders around links 2012-05-18 16:08:18 +02:00
Guillaume Ayoub
bfeb102c98 Test bookmarks 2012-05-18 15:38:57 +02:00
Simon Sapin
8c3f16fc8c Fix URI encoding per RFC 3986 and 3987. 2012-05-18 09:13:09 +02:00
Guillaume Ayoub
64cb7b4104 Handle the bookmarks as a tree 2012-05-17 22:46:03 +02:00
Guillaume Ayoub
111932edf5 Add first-level bookmarks, use floats for XY positions, fix little things 2012-05-15 19:29:54 +02:00
Simon Sapin
1ea79c9e9e Fix importing urllib.quote on Py 2.x 2012-05-15 18:16:25 +02:00
Simon Sapin
1ff949b888 Have the PDF post-process run on Python3 (links are broken) 2012-05-15 13:40:36 +02:00
Guillaume Ayoub
76c15235e6 Replace the PDF class by a function 2012-05-15 03:29:57 +02:00
Guillaume Ayoub
488a6a99c9 Remove the "active" attribute 2012-05-15 01:56:19 +02:00
Guillaume Ayoub
ff8d50ce3e Remove a useless attribute 2012-05-15 01:28:09 +02:00
Guillaume Ayoub
65a286f12f Stupid typo 2012-05-15 01:16:39 +02:00
Guillaume Ayoub
bb2727417f Write the PDF without the second iteration on initial lines 2012-05-15 01:15:07 +02:00
Guillaume Ayoub
34c12fe3ef Remove a useless continue 2012-05-15 00:32:19 +02:00
Guillaume Ayoub
b38ce4f0a3 Clean again the pdf module 2012-05-15 00:30:20 +02:00
Guillaume Ayoub
6848846b8e Add a docstring 2012-05-14 23:59:24 +02:00
Guillaume Ayoub
802a7351d8 Clean and document the pdf module 2012-05-14 23:58:18 +02:00
Guillaume Ayoub
42f2cf4e0e Display correctly unknown links 2012-05-14 23:34:07 +02:00
Guillaume Ayoub
da08226ccd Use bytes in the whole pdf module 2012-05-14 23:24:27 +02:00
Guillaume Ayoub
ba75a84e95 Don't add another sharp for inner links 2012-05-14 23:18:20 +02:00
Guillaume Ayoub
22635c0c71 Initial support of internal links 2012-05-14 19:40:38 +02:00
Guillaume Ayoub
9ea53bf466 Add initial support of external hyperlinks 2012-05-14 18:31:51 +02:00
Simon Sapin
1bfdce6b8c Do not crash on letter-spacing: normal 2012-05-14 11:57:55 +02:00
Simon Sapin
0c80b77f31 Handle absolute tables 2012-05-14 08:15:52 +02:00
Simon Sapin
bf95751558 Fix outside list marker position on absolute list-items. 2012-05-11 20:50:28 +02:00
Simon Sapin
ea18e88fdc Crash fix: skip absolute boxes that are not laid out yet in various places. 2012-05-11 20:39:56 +02:00
Guillaume Ayoub
15790dc51e Handle inline absolute elements 2012-05-11 19:31:31 +02:00
Guillaume Ayoub
f795cccb58 Don't display the "option" elements 2012-05-11 16:20:14 +02:00
Guillaume Ayoub
b3a91e4e26 Fix the width repartition between columns when sum(preferred_widths) = 0 2012-05-11 16:17:23 +02:00
Guillaume Ayoub
f1da53a32a Fix the z-index 2012-05-11 16:07:14 +02:00
Guillaume Ayoub
475a924e89 Fix the stacking contexts 2012-05-11 14:10:11 +02:00
Simon Sapin
2b7bb4108e Special treatement for page boxes in StackingContext 2012-05-11 10:49:52 +02:00
Simon Sapin
10627f6f6d Sort stacking contexts by z-index. 2012-05-11 10:27:48 +02:00
Guillaume Ayoub
632f57dff5 Fix angles in transform 2012-05-10 22:10:29 +02:00
Guillaume Ayoub
e963367e98 Typos 2012-05-10 22:09:04 +02:00
Guillaume Ayoub
3f4113fa5f Add a StackingContext in preparation for z-index drawing. 2012-05-10 20:57:29 +02:00
Guillaume Ayoub
8d1b86c40f Layout in place absolute boxes 2012-05-10 20:12:47 +02:00
Guillaume Ayoub
7eb3ba187e Add tests for absolute boxes 2012-05-10 16:10:04 +02:00
Guillaume Ayoub
b20022ee11 Fix some little things about absolute blocks 2012-05-10 13:56:21 +02:00
Guillaume Ayoub
1fc2da2a5c Add initial support of position: absolute, missing z-index 2012-05-10 05:57:06 +02:00
Guillaume Ayoub
2ea63210bf Add a list of absolute elements 2012-05-09 19:01:32 +02:00
Guillaume Ayoub
994e6a933a Handle not-in-flow elements in inline boxes 2012-05-09 17:08:23 +02:00
Guillaume Ayoub
d9056d9a4f Remove a useless monkey patch in tests about inline blocks 2012-05-09 17:08:23 +02:00
Guillaume Ayoub
369faf4d7b Fix relative positioning for inline boxes 2012-05-09 17:07:01 +02:00
Guillaume Ayoub
fcf7d1ff2c Add untested support of relative 2012-05-09 13:15:13 +02:00
Guillaume Ayoub
449ca2db07 Remove useless space 2012-05-08 03:40:27 +02:00
Simon Sapin
e1040a8d66 Next is 0.9 2012-05-07 18:32:07 +02:00
Simon Sapin
2435e50a48 Tag v0.8 2012-05-07 18:31:33 +02:00
Guillaume Ayoub
f1ebf59486 Add some tests and fixes about auto layout tables 2012-05-07 18:16:32 +02:00
Simon Sapin
aef93f27dc Fix text-related tests (changed on a PyGobject upgrade???) 2012-05-04 17:05:47 +02:00
Simon Sapin
0671b499dd Repeat table headers and footers on every page. 2012-05-04 17:05:16 +02:00
Simon Sapin
0a164aa1fc Use the new cssselect. 2012-04-27 10:58:15 +02:00
Guillaume Ayoub
7b3c17f9db Add tests for static layout of tables 2012-04-16 13:50:19 +02:00
Guillaume Ayoub
efa01839e6 Avoid a division by 0 in static layout for tables 2012-04-16 13:48:46 +02:00
Simon Sapin
8bb2d566c2 Oooops 2012-04-12 17:20:58 +02:00
Simon Sapin
074e8884c8 Implement inline tables. 2012-04-12 17:20:57 +02:00
Simon Sapin
9d4e5b9d6f Simplify table wrapper layout. 2012-04-12 17:20:57 +02:00
Simon Sapin
78b86f400e Only use the fixed table layout with a non-auto width.
As specified, fall back to the automatic layout when the
computed width is 'auto'.

This will enable some code simplifications, and prepare
for inline tables.
2012-04-12 17:20:57 +02:00
Guillaume Ayoub
9af417088f Small fix for preferred width of tables 2012-04-12 13:20:41 +02:00
Guillaume Ayoub
ccb73421f8 Fix the `adjust` function for tables 2012-04-10 19:00:56 +02:00
Guillaume Ayoub
c2a6a70736 Fix the preferred width resolution of the tables 2012-04-10 18:29:00 +02:00
Guillaume Ayoub
643eb9a957 Handle the captions 2012-04-10 17:56:23 +02:00
Guillaume Ayoub
e349cf5b5b Typo 2012-04-10 16:08:53 +02:00
Guillaume Ayoub
130132b1a0 Merge branch 'master' of github.com:Kozea/WeasyPrint 2012-04-10 16:07:46 +02:00
Simon Sapin
caab31ccff The baseline for table cells and inline blocks is really not the same thing. 2012-04-10 16:07:32 +02:00
Guillaume Ayoub
8d9ce51fbd Merge branch 'master' of github.com:Kozea/WeasyPrint 2012-04-10 15:51:48 +02:00
Simon Sapin
fe52a7b0f6 Fix baseline for table rows. 2012-04-10 15:46:36 +02:00
Guillaume Ayoub
918828be3e Merge branch 'master' of github.com:Kozea/WeasyPrint 2012-04-10 15:07:43 +02:00
Simon Sapin
3c9512bd77 Bug fix for inline block baseline. 2012-04-10 15:07:10 +02:00
Guillaume Ayoub
3a86c1e679 Add the functions for preferred sizes of tables 2012-04-10 14:38:18 +02:00
Simon Sapin
4a146224c0 Proper vertical-align for inline blocks. 2012-04-10 12:50:22 +02:00
Guillaume Ayoub
1a08117491 Fix again the TODO 2012-04-10 12:31:43 +02:00
Guillaume Ayoub
110c4be520 Update a TODO about auto layout for tables 2012-04-10 12:30:25 +02:00
Simon Sapin
3ead78fe7d Account for {min,max}-width for preferred widths. 2012-04-10 12:00:31 +02:00
Simon Sapin
12b856c79e Add min-width/max-width for inline blocks. 2012-04-10 11:43:59 +02:00
Simon Sapin
0e66f6a72f Merge branch 'shrinktofit' 2012-04-10 11:11:57 +02:00
Guillaume Ayoub
0352572cc8 Remove prints and add a TODO about point #4 of tables auto layout 2012-04-07 15:12:17 +02:00
Guillaume Ayoub
b6e7998a73 Handle point #4 of table auto layout 2012-04-07 15:04:48 +02:00
Guillaume Ayoub
0d59b2600f Clean and fix a lot of things in tables auto layout 2012-04-07 14:25:30 +02:00
Simon Sapin
7ac982a01c Implement {min,max}-{width,height} on images. 2012-04-06 19:44:09 +02:00
Simon Sapin
27245aa915 Assume intrinsic dimensions for replaced elements. 2012-04-06 17:01:33 +02:00
Simon Sapin
79675f58b0 Implement min-height and max-height on blocks 2012-04-06 16:42:06 +02:00
Simon Sapin
cde28023d6 Implement min-width and max-width on blocks. 2012-04-06 16:19:16 +02:00
Simon Sapin
9ff7b99b30 Fix box-sizing 2012-04-06 15:56:36 +02:00
Simon Sapin
e420cb002b Allow percentage paddings 2012-04-06 15:43:05 +02:00
Guillaume Ayoub
4593b51c75 Merge branch 'master' into shrinktofit 2012-04-05 20:15:52 +02:00
Guillaume Ayoub
af7605cce8 Fix the test for tinycss warnings 2012-04-05 20:15:28 +02:00
Guillaume Ayoub
1f2895baaa Merge branch 'shrinktofit' of github.com:Kozea/WeasyPrint into shrinktofit 2012-04-05 20:08:02 +02:00
Guillaume Ayoub
7411e1b66d Check percentages in the inline-block test 2012-04-05 20:07:29 +02:00
Simon Sapin
fd162e2825 Merge branch 'master' into shrinktofit 2012-04-05 16:32:36 +02:00
Simon Sapin
f6b202fa5f tinycss changes + a few more tests 2012-04-05 16:31:32 +02:00
Simon Sapin
b113b29fd7 Update shrink-to-fit for tinycss. 2012-04-05 13:16:17 +02:00
Simon Sapin
61bf188290 Merge branch 'master' into shrinktofit
Conflicts:
	weasyprint/layout/blocks.py
	weasyprint/layout/inlines.py
2012-04-05 12:38:42 +02:00
Guillaume Ayoub
8e2603acaf Add two more asserts in the inline-block tests 2012-04-05 12:31:51 +02:00
Simon Sapin
34612cc4fb Simplify the handling of 'auto' lengths. 2012-04-05 11:21:26 +02:00
Simon Sapin
73b0bd6281 Disallow _ instead of - in property names. 2012-04-04 15:07:39 +02:00
Guillaume Ayoub
21277c18cc Add some tests, split inner/outer preferred widths 2012-04-04 14:25:13 +02:00
Simon Sapin
1ba5b32e7b Tests and fixes for drawing 2012-04-04 13:58:06 +02:00
Simon Sapin
1633fec47c Add some tests for validation. 2012-04-03 19:37:13 +02:00
Guillaume Ayoub
58fb02dcbb Don't collapse spaces across atomic inline blocks 2012-04-03 18:58:55 +02:00
Simon Sapin
8ac2b63827 Clean up shorthand properties tests. 2012-04-03 17:12:51 +02:00
Simon Sapin
88c027117c Do not keep tokens for percentages after validation.
Make (value, unit) namedtuples instead.
Pixel values that could be percentages are not plain numbers anymore.
2012-04-03 16:12:25 +02:00
Simon Sapin
d785f4e46d Rename value(s) to token(s) in validation. 2012-04-03 12:45:29 +02:00
Simon Sapin
46b1d225c7 Tests n’ fixes. Lots of them. 2012-04-03 11:34:29 +02:00
Simon Sapin
ad3cdf5dae tinycss again 2012-03-31 18:22:55 +02:00
Simon Sapin
fb37336f7a Catch up with tinycss changes. 2012-03-28 18:42:47 +02:00
Simon Sapin
1446fccb33 Also pre-proccess @import and @media 2012-03-25 01:41:02 +01:00
Simon Sapin
002284affb Simplify text tests 2012-03-25 00:45:52 +01:00