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

208 Commits

Author SHA1 Message Date
Guillaume Ayoub
b33a8d11d4 Fix the footer repetition on split tables
Fix #1027.

Footers of split tables have a wrong position: they keep their position before
splitting the table. This commit is an improvement (it doesn’t crash anymore,
data are OK on each page) but it’s far from perfect.

We also have to take care of absolute and fixed elements in footers. It’s
probably already broken (see related #138), so…

TODOs have been added where things have to be improved.
2020-04-03 21:44:27 +02:00
Guillaume Ayoub
da146c639a Don’t try to break tables after the header or before the footer
Related to #1027.
2020-04-02 16:49:48 +02:00
Guillaume Ayoub
fe7fd1c179 Don’t crash on absolute SVG files with no intrinsic size
Fix #1050.
2020-03-14 15:00:25 +01:00
Guillaume Ayoub
b40ad461be Remove repeated copyright assignments in files
Everything is replaced by a more explicit message in the COPYRIGHT file.

Inspired by rust-lang/rust#43498 and rust-lang/rust#57108.
2020-01-02 14:10:09 +01:00
Guillaume Ayoub
c02e5c2f78 Remove underscore from _remove_decoration 2019-12-23 23:13:05 +01:00
Guillaume Ayoub
5a8c81eea2 Merge branch 'master' into fix_943 2019-12-23 22:01:58 +01:00
Guillaume Ayoub
916e34f637 Handle the second argument of element() 2019-12-22 15:52:48 +01:00
Guillaume Ayoub
7eacb711a7 Merge branch 'master' into fix_943 2019-12-15 15:26:00 +01:00
Guillaume Ayoub
0a403d9d16 Remove RunningPlaceholder 2019-09-27 11:53:30 +02:00
Guillaume Ayoub
d9432a72f5 Remove the Running class 2019-09-27 11:34:36 +02:00
Guillaume Ayoub
fd70058c93
Merge pull request #882 from hbrunn/master-running
[ADD] position: running(); content: element();
2019-09-27 11:01:16 +02:00
Guillaume Ayoub
5cb24e2cbc Explicitely remove box decorations when needed 2019-09-24 18:42:25 +02:00
Guillaume Ayoub
20f1dc3fe9 Remove useless TODO
This has been fixed by 8e267c90.
2019-09-24 16:16:32 +02:00
Holger Brunn
b30ffb1694
[ADD] position: running(); content: element(); 2019-09-22 23:21:31 +02:00
Guillaume Ayoub
3af0d73be2 Merge branch 'master' of github.com:Kozea/WeasyPrint 2019-09-18 15:08:44 +02:00
Guillaume Ayoub
8abc39d209 Don't display absolutes when their parents have no other children
If a parent box can only display absolute boxes at the bottom of the page, but
has other children that have to be drawn on the next page, keep the absolute
boxes for the next page too. It's at least very useful for markers.

Fix #945.
2019-09-18 15:03:43 +02:00
grewn0uille
8e267c90df Make blocks with 'overflow' different from 'visible' grow to include floating children.
Fix #661.
2019-09-16 16:33:13 +02:00
grewn0uille
23e2ba1ec6 Break pages avoid between groups 2019-08-23 18:00:52 +02:00
grewn0uille
26a0ee5963 Merge perf 2019-08-23 15:10:47 +02:00
grewn0uille
dd779d1598 Support break-before in table. Related to #209 2019-08-20 18:20:15 +02:00
grewn0uille
4b396d5f58 Support break-after in table. Related to #209 2019-08-20 17:33:35 +02:00
Guillaume Ayoub
2ee4516786 Handle the ::marker pseudo-element
Fix #700.
2019-08-07 23:01:41 +02:00
Guillaume Ayoub
7efd1e135f Fix width of replaced boxes with no intrinsic width
Fix #901.
2019-07-24 15:18:38 +02:00
grewn0uille
a86627943f Fix margin collapsing between caption and table wrapper. 2019-07-19 18:31:17 +02:00
Guillaume Ayoub
abcd386e2f Remove useless TODO
This TODO has been fixed with #771.
2019-07-18 16:40:42 +02:00
Guillaume Ayoub
7071e36ce4 Remove device_size parameter everywhere
The device_size parameter was passed to many layout features, but it was only
used to set default size of replaced boxes with no implicit or explicit size
set. As this case is really rare for printed documents, and as it's also rare
to have printed supports that small, we can remove this "feature".

Moreover, in CSS3-images, another definition called "default object size" is
used to set replaced box size when no size is defined. This size doesn't seem
to be defined for images.
2019-07-11 17:17:28 +02:00
Guillaume Ayoub
4e80f4cccf Remove enumerate_skip
It used to be really slow, at least on large inline containers.
2019-07-09 17:58:20 +02:00
Guillaume Ayoub
ec4504d23f Set a minimum height for empty list elements with outside marker
The spec says that we can do what we want to improve the rendering in such
cases. Adding a line would probably give exactly the same rendering as if there
were text, but the difference is so small that there's no need to hack the
formatting structure and keep the fix in 3 small lines during the layout.

Fix #873.
2019-05-31 16:56:52 +02:00
Guillaume Ayoub
a23d4658fc Set marker layout only when needed 2019-05-31 06:36:41 +02:00
Guillaume Ayoub
36630ab532 Don't change position of block children to avoid rounded float error
To fix #860 and #851, we decided to move block children a little bit to keep
them in the page. It's a bad idea, because children position is altered (and it
breaks many tests, by the way).

Increasing the allowed max_position_y is a better workaround as it doesn't
move blocks.
2019-05-15 13:39:05 +02:00
Guillaume Ayoub
75cf2b61eb Don't cut pages when content overflows a very little bit
Here's another floating point rounding error we have to deal with. The original
issue comes from flex layout, but there are probably plenty of rounding
problems in other flows, so it's safe to put the workaround here.

Fix #851.
2019-05-15 12:02:04 +02:00
Guillaume Ayoub
ee69b32dfb Fix margin-break: auto
Fix #835.
2019-03-27 11:30:52 +01:00
Guillaume Ayoub
7b53d0e146 Respect bottom margin/border/padding with box-decoration-break:clone
Related to #771.
2019-03-20 13:30:13 +01:00
Guillaume Ayoub
5dd6e4c2cd Merge branch 'master' into box-decoration-break 2019-03-19 17:50:16 +01:00
Guillaume Ayoub
02f9248567 Typo number 2 2019-03-18 21:10:15 +01:00
Guillaume Ayoub
3f730481f3 Typo 2019-03-18 18:17:41 +01:00
Guillaume Ayoub
75d8d983ae Handle margin-break
Some corner-cases are not handled yet, but that's much better than the current
situation.

Fix #115.
2019-03-18 18:13:43 +01:00
Guillaume Ayoub
bceeab2052 Make broken boxes fill the empty space at the end of the page
Related to #771.

Fixes http://test.weasyprint.org/suite-css21/chapter13/section2/test7/
2019-03-15 17:26:12 +01:00
Guillaume Ayoub
2a4521099c Merge branch 'master' into box-decoration-break 2019-03-15 15:10:13 +01:00
Guillaume Ayoub
167ebce065 Please isort again 2019-03-10 19:34:16 +01:00
Guillaume Ayoub
b7a9fe7dcc Update copyright 2019-03-04 11:04:06 +01:00
Guillaume Ayoub
f79110c7da Copy replaced boxes during layout
Fix #808, fix #387.
2019-03-01 15:17:53 +01:00
Guillaume Ayoub
0cc5478252 Fix imports for isort 2019-03-01 11:38:03 +01:00
Guillaume Ayoub
d2cec9d2a6 Include bottom border and padding when splitting boxes 2019-02-28 15:51:16 +01:00
Guillaume Ayoub
e2b492fb35 Only remove box decorations when box-decoration-break: slice 2019-02-28 15:50:47 +01:00
Guillaume Ayoub
ad3be35620 Ignore absolute blocks when defining page_is_empty 2018-10-10 16:45:49 +02:00
Guillaume Ayoub
56904baa79 Use the same copyright line everywhere 2018-09-20 18:46:27 +02:00
Guillaume Ayoub
52fdf0acf8 Split columns layout 2018-09-17 18:48:24 +02:00
Guillaume Ayoub
4667a6b159 Handle adjoining margins in flex layout
Top border is handled by collapsing_with_children set to False when the box is
a flex item. Bottom border is handled at the end of the flex item layout, by
adding the collapsed adjoining margins to the child's bottom border.

Fix #673.
2018-08-21 21:45:56 +02:00
Guillaume Ayoub
a83ba5a0a0 Fix flex line height
Fix #667.
2018-08-17 15:56:50 +02:00