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

191 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
6449ee4cbf Absolute doesn't work yet, but much better than before 2012-05-30 03:27:08 +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
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
b69ce3b6f3 Fix containing block on absolute tables. 2012-05-25 17:13:38 +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
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
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
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
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
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
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
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
Guillaume Ayoub
f1ebf59486 Add some tests and fixes about auto layout tables 2012-05-07 18:16:32 +02:00
Simon Sapin
0671b499dd Repeat table headers and footers on every page. 2012-05-04 17:05:16 +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
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