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

192 Commits

Author SHA1 Message Date
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
Guillaume Ayoub
26109b25a3 Fix condition for column descendants
Related to #659.
2018-08-02 15:58:27 +02:00
Guillaume Ayoub
c6e961e342 Add comment about column relayout 2018-08-02 14:52:09 +02:00
Guillaume Ayoub
efd139bb4b Discard blocks and tables that don't fit in remaining space
This condition had probably been added a long time ago when layout was done
differently. I don't see why it's there, removing it doesn't break tests and
makes page break before unbreakable blocks that go lower than the end of the
page instead of after.

I may have missed something. If this commit pops out of a git bisect, please
open an issue.

Related to #659 (even if the commit is not related to columns only).
2018-08-02 14:30:27 +02:00
Guillaume Ayoub
c4802ffda8 Clean, document and fix columns_layout
Related to #659.
2018-08-01 18:19:30 +02:00
Guillaume Ayoub
035b9e479b Make columns create formatting contexts
Related to #659.
2018-08-01 18:18:12 +02:00
Guillaume Ayoub
553531d049 Ignore skip stack and next page info when column's child doesn't fit 2018-07-31 19:08:52 +02:00
Guillaume Ayoub
9e809263c5 Don't skip columns when no child fits in the page
Related to #659.
2018-07-31 19:07:06 +02:00
Guillaume Ayoub
b71bfca8f3 Handle column layout in block_box_layout
This change gives flex_layout a chance to use block_box_layout, that can handle
more cases (including columns) than block_container_layout witout resetting
size set by flex layout.
2018-02-25 16:14:13 +01:00
Guillaume Ayoub
092b03bac6 Don't translate rtl columns twice
Fix #574.
2018-02-20 02:11:45 +01:00
Guillaume Ayoub
5341031162 Merge branch 'master' into flexbox 2018-02-19 14:32:19 +01:00
Guillaume Ayoub
897d440396 Respect text direction for multicolumn layout
Related to #574.
2018-02-13 17:32:16 +01:00
Guillaume Ayoub
4ceb8c9562 Fix named pages when broken between two top-level children
Fix #507.
2018-01-23 00:12:16 +01:00
Guillaume Ayoub
70af4e219e Allow flex boxes in block_container_layout 2018-01-21 14:51:17 +01:00
Guillaume Ayoub
16e8186568 Drop Python 2 support 2018-01-14 01:48:17 +01:00
Guillaume Ayoub
724565f27a Don't allow attribute access to StyleDict objects 2018-01-13 17:05:23 +01:00
Guillaume Ayoub
590ffd411a Merge branch 'master' into flexbox 2018-01-07 00:42:38 +01:00