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

131 Commits

Author SHA1 Message Date
Guillaume Ayoub
4f4b4ed598 Use isort in tests 2017-03-25 00:33:36 +01:00
Guillaume Ayoub
ae040e1c71 Respect flake8 everywhere 2017-03-25 00:24:27 +01:00
Guillaume Ayoub
1031371c7b Ignore boxes with no first-letter style 2017-01-02 13:44:03 +01:00
Guillaume Ayoub
5c9a07bf1a Create first-letter box after white space handling
As ::first-letter depends on white space handling, we must create the
box after collapsing spaces, not during the build of the box tree.

This commit makes WeasyPrint pass most of the W3C tests related to
first-letter (and never crash). Known problems left include:

- list markers are considered as the first letter,
- lines may break between the first letter and the rest of the text
  (see #163 and #301),
- the CSS attributes are all kept, some should probably be removed (the
  spec doesn't give a whole list).

Even if W3C tests makes me quite confident (some of them are crazy),
tests must be added in WeasyPrint too.
2017-01-02 13:23:42 +01:00
Guillaume Ayoub
18b1931374 Clean and test columns
Fix #403.
2016-12-17 00:43:55 +01:00
Guillaume Ayoub
5a07ec0891 Fix the multi-page columns algorithm
Related to #403.
2016-12-16 17:37:39 +01:00
Guillaume Ayoub
cf0efe64cc Cast the number of columns into int
Should fix #403.
2016-12-15 09:02:14 +01:00
Guillaume Ayoub
05d5e7d726 Don't always copy boxes 2016-11-01 04:31:15 +01:00
Guillaume Ayoub
45c815870b Don't always copy style when copying boxes 2016-11-01 03:35:36 +01:00
Guillaume Ayoub
b252260522 Small fixes for column layouts 2016-08-30 17:54:15 +02:00
Guillaume Ayoub
698ce20f1f Support break-* properties 2016-08-30 13:35:23 +02:00
Guillaume Ayoub
e7723fde4a Handle relative column-layout boxes 2016-08-30 00:57:44 +02:00
Guillaume Ayoub
55b63c9d60 1 generator = 1 debugging hour lost 2016-08-15 20:11:01 +02:00
Guillaume Ayoub
0c0d4bb96d Small fixes for columns 2016-08-15 19:22:40 +02:00
Guillaume Ayoub
1bdbae99dc Remove a useless enumerate 2016-08-15 17:20:26 +02:00
Guillaume Ayoub
2a9bd30d13 Use a better column balancing algorithm 2016-08-15 17:15:57 +02:00
Guillaume Ayoub
2de6429e53 Fix widths and gaps 2016-08-15 02:38:14 +02:00
Guillaume Ayoub
b37594e469 Flake8 2016-08-15 01:03:06 +02:00
Guillaume Ayoub
73564d6265 Set the height of the columns 2016-08-15 00:59:41 +02:00
Guillaume Ayoub
33aa5c6f6b Initial support of multi-column layouts
Related to #60.

This commit adds a really simple support of multi-column layouts.
2016-08-14 23:12:30 +02:00
Guillaume Ayoub
50ebc20b97 Don't crash with floats with percents in positions
Fix #263
2016-05-16 14:56:34 +02:00
Guillaume Ayoub
92640de074 Don't crash when displaying floating ratio-only SVGs 2016-04-25 16:55:25 +09:00
Guillaume Ayoub
da96902bda Fix many PEP8 errors and warnings
- Put line breaks after operators (that's OK)
- Don't assign lambdas, use functions (well, that's really explicit in
  PEP8, it's really verbose but why not)
- Put imports at the beginning of the file (only special cases for us)
2016-01-15 12:48:25 +01:00
Alex Eftimie
93f497bf11 Replace utf8 with utf-8 for gettext compatibility 2015-11-25 09:38:01 +02:00
Johannes Duschl
5f11c23415 Eventually fixed code convention violations 2014-06-04 10:15:54 +02:00
Johannes Duschl
be2b94ce30 Use block_level_page_break to check for dedicated page breaks 2014-05-28 11:19:41 +02:00
Johannes Duschl
324255ba59 Removed blank line 2014-05-27 17:24:42 +02:00
Johannes Duschl
35f0050624 Respect page-break-after: avoid of previous elements when pushing floats to the next page 2014-05-27 17:22:31 +02:00
Simon Sapin
43d1e73e65 Fix code formatting. (Clean flake8!) 2014-04-27 12:29:55 +01:00
elpaso
0efde08b49 Added test case for floated images taller than the page. Added myself to AUTHORS. 2014-04-27 09:48:46 +02:00
elpaso
52a6433377 Added test & patch for floating images page break 2014-04-17 14:02:04 +02:00
Simon Sapin
c34221d215 2014. 2014-01-10 14:27:02 +00:00
Guillaume Ayoub
e943741d02 Don't crash when relative boxes have absolute children (fix #118) 2013-12-30 14:43:41 +01:00
Simon Sapin
1533b9c2d4 Fix margin collapsing with tables.
The position of page breaks between table rows did not consider margin
collapsing.
2013-04-26 15:02:27 +02:00
Simon Sapin
18aefe8a06 Remove unnecessary page breaks before tables. 2013-04-23 16:54:40 +02:00
Guillaume Ayoub
c84469daa1 Fix position of rtl blocks with left margins 2013-04-15 01:30:05 +02:00
Simon Sapin
1d1bf9cdc9 Flake8. 2013-04-11 12:08:53 +02:00
Guillaume Ayoub
bbe1b250c0 Don't set margins with over-constraint block-level boxes (useful for floats) 2013-04-09 18:30:25 +02:00
Simon Sapin
171438f48e 2013 2013-04-03 16:23:48 +02:00
Simon Sapin
fd276f1c9c Fix #54: min/max-width/height on block-level images. 2013-04-02 12:41:52 +02:00
Simon Sapin
a11ac81bdd Fix #53: crash when backtracking for break-before/after: avoid 2013-03-28 18:25:16 +01:00
Simon Sapin
60526fecd5 Allow page breaks between empty blocks. 2013-03-28 18:22:00 +01:00
Simon Sapin
216e13136e Fix #44: bad interaction of page-break-before/after: avoid and floats. 2013-03-18 15:26:11 +01:00
Simon Sapin
d17ee64fa1 Do not repeat a block’s margin-top after a break. 2012-10-02 15:59:58 +02:00
Simon Sapin
d401e7241b Kill Document in layout/*.py 2012-07-12 17:13:21 +02:00
Guillaume Ayoub
01c451b542 Don't collapse margins in table wrappers, remove a double translation
With this version, a lot of tests are OK. The main missing feature is the
unsupported margin collapsing through nested boxes. Once this is fixed, the
branch can be considered as stable.
2012-06-28 04:14:06 +02:00
Guillaume Ayoub
228f1e3d77 Fix most of the tests (but not Acid2) 2012-06-28 00:51:24 +02:00
Guillaume Ayoub
9afa96e987 Put floats in the next line when they don't fit on current line 2012-06-25 23:48:21 +02:00
Guillaume Ayoub
2f68f0f519 Again! 2012-06-25 21:37:15 +02:00
Guillaume Ayoub
b26d35cd96 Don't resolve percentages on tables 2012-06-25 21:35:45 +02:00