1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 07:57:52 +03:00
Commit Graph

344 Commits

Author SHA1 Message Date
Guillaume Ayoub
9ab4623a58 Go through the variable resolution for special inheritance cases
Fix #1697.
2022-08-29 23:16:23 +02:00
Guillaume Ayoub
67cd41a9dd
Merge pull request #1695 from lutrasecurity/lang
Add language information to PDF
2022-08-18 15:58:29 +02:00
Guillaume Ayoub
9a4c5fc3c9 Fix the way column rules are drawn 2022-08-18 15:22:45 +02:00
Guillaume Ayoub
e9c45c7060 Clean and test "text-transform: capitalize"
Related to #1703.
2022-08-15 16:08:06 +02:00
Guillaume Ayoub
c64eec81cc Correctly detect reported footnotes for repagination
Fix #1700.
2022-08-15 12:26:06 +02:00
Konstantin Weddige
42db8bdb03 Update tests 2022-07-22 12:22:22 +02:00
Guillaume Ayoub
5c91673b9d Add failing test for broken nested counters
Related to #1685.
2022-07-18 11:07:15 +02:00
Guillaume Ayoub
0a21cf9ffe Merge branch '56.x' 2022-07-13 22:48:06 +02:00
Guillaume Ayoub
adec43adc4 Fix code and tests for max-height set on footnotes
The bug in the code was caused by the page_is_empty variable. It’s useless to
test this variable here because we know that we rendered at least the current
line. It’s not updated earlier, but if it were it would always be True.

This commit also fixes minor bugs in the tests.

Fix #1674.
2022-07-13 22:45:26 +02:00
Lucie Anglade
8f5bee1d51 Some tests for max-height on footnote area.
Related to #1674.
2022-07-13 22:10:12 +02:00
Guillaume Ayoub
91a2474400 Fix OTB test on Fedora
The metrics and floats roundings seems to be slightly different on different
platforms. Using a lower line-height value should fix the problem everywhere.

Fix #1677.
2022-07-13 10:23:57 +02:00
Guillaume Ayoub
11bc920910 Merge branch '56.x' 2022-07-10 20:38:07 +02:00
Guillaume Ayoub
f2cecc78ea Fix gradients with opacity set
Fix #1678.
2022-07-10 20:37:33 +02:00
Guillaume Ayoub
99b6d301da Merge branch '56.x' 2022-07-07 17:26:13 +02:00
Guillaume Ayoub
9ce65478b2 Fix default vertical position of out-of-flow split elements
Fix #1673.
2022-07-07 17:18:12 +02:00
Guillaume Ayoub
76d174f578 Fix split table headers’ top border when rows are split 2022-07-07 15:43:51 +02:00
Guillaume Ayoub
cb9540ba3b Correctly detect empty split lines at the end of tables
The previous detection was failing when some cells were empty (or fully
rendered) and when the current rendering position was not overflowing the page.
In this case, the line with empty cells was rendered and was visible for
example when cells had padding.
2022-07-07 10:45:24 +02:00
Guillaume Ayoub
c028c672d7 Merge branch '56.x' 2022-07-05 16:14:17 +02:00
Guillaume Ayoub
3bd9a8e014 Don’t limit the opacity groups to the original box size
It doesn’t work when elements are displayed outside or when the box is
transformed.
2022-07-05 16:06:46 +02:00
Guillaume Ayoub
2484ca2cc7 Rotate images with EXIF rotation
Fix #1667.
2022-07-02 15:01:16 +02:00
Guillaume Ayoub
bcf40367d7 Merge branch '56.x' 2022-07-01 09:43:09 +02:00
Guillaume Ayoub
1a4d2a70ef Fix and test nth selector for pages
Fix #1668.
2022-07-01 09:42:24 +02:00
Guillaume Ayoub
5feaf5e084 Fix and add failing test
We still have a lot of corner cases to fix for floats, judging from the number
of xfail tests in this file…
2022-06-30 16:12:02 +02:00
Guillaume Ayoub
902bde7d9c Take care of floats when removing placeholders
Removing placeholders is something we have to do when we must discard a part of
the layout that has already been done. It currently removes absolutely
positioned placeholders and footnotes.

The same has to be done with split floats, that’s what this commit is about.

We have to change the structure of the broken_out_of_flow attribute, as we have
to get a reliable way to reach the saved data using from the real element in
the tree. The new structure is thus a dictionary whose keys are the boxes in
the tree (placeholder for absolutes, partial elements for floats) and whose
values are the original_box+parent+resume_at.

Fix #1669.
2022-06-30 15:29:50 +02:00
Guillaume Ayoub
74f367c2a3 Merge branch '56.x' 2022-06-29 19:06:58 +02:00
Guillaume Ayoub
00d5b03587 Don’t break reproducible PDF creation when using images
Fix #1666.

Note that the added test doesn’t test this problem, because the "hash" function
is stable when we use the same process. If someone finds a nice way to solve
this…
2022-06-29 19:03:58 +02:00
Guillaume Ayoub
5d9e5f7040 Update and fix URLs in comments and documentation 2022-06-28 15:59:06 +02:00
Guillaume Ayoub
c031a40439
Merge pull request #1660 from Kozea/line-clamp
Support nested line-clamp
2022-06-17 10:09:38 +02:00
Guillaume Ayoub
d8533dad9c
Merge pull request #1644 from Kozea/bitmap-fonts
Bitmap fonts
2022-06-17 10:08:49 +02:00
Guillaume Ayoub
e38bff8b99 Don’t crash when inherited SVG attributes are not set on the parent 2022-06-17 10:07:28 +02:00
Guillaume Ayoub
eadd5c0c7b Remove xfail for passing tests about opacity 2022-06-16 17:23:09 +02:00
Guillaume Ayoub
d3883c4428 Test nested line-clamp 2022-06-13 16:36:05 +02:00
Guillaume Ayoub
191e015f89 Test bitmap fonts 2022-06-13 16:23:44 +02:00
Guillaume Ayoub
358b9469bf
Merge pull request #1651 from Kozea/pdfa
Support PDF/A
2022-06-13 14:52:12 +02:00
Guillaume Ayoub
04e1ff2f7a Fix chained variables in the same selector block
As a side effect, fix also the case when a variable is missing in the root
element.

Fix #1656.
2022-06-10 20:10:33 +02:00
Guillaume Ayoub
e4885f9cff Don’t crash when @font-face’s src ends with a comma
That was the only @comma_separated_list function to assume "tokens" is not
empty.

Fix #1653.
2022-06-01 16:59:30 +02:00
Guillaume Ayoub
3211163f8c Add and fix tests for custom metadata 2022-05-27 11:26:24 +02:00
Guillaume Ayoub
bff1dd5b22 Add option to set PDF version
Related to #1131.
2022-05-27 11:26:24 +02:00
Guillaume Ayoub
ed84e5a8ea Test PDF/A 2022-05-27 11:26:24 +02:00
Guillaume Ayoub
09364c254e Refactor PDF generation 2022-05-27 11:26:15 +02:00
Guillaume Ayoub
e212c83b50 Remove useless parameters from testing utils 2022-05-23 23:09:32 +02:00
Guillaume Ayoub
a001af7c33 Remove useless parameters from tests helpers 2022-05-23 12:01:11 +02:00
Guillaume Ayoub
56b79ba375 Fix test name 2022-05-23 09:55:13 +02:00
Guillaume Ayoub
6ade02b234 Use f-strings when possible 2022-05-17 16:40:30 +02:00
Guillaume Ayoub
1545a45092 Merge branch '55.x' 2022-05-10 14:34:25 +02:00
Guillaume Ayoub
50ad4d1ac0 Fix relative paths for SVG files stored as data URLs
Fix #1641.
2022-05-10 14:31:25 +02:00
Guillaume Ayoub
96f26504ce Use the original box when breaking waiting children
Before this commit, when we had to break previously rendered waiting children
in a line, we re-rendered the already-rendered children. That was bad, because
the tree of the children that were already rendered were different from the
original tree, that may include leading spaces for example. It also required a
complex mix of the original resume-at with the original skip-stack.

This new solution includes both the original child (to render it from a fresh
start) and the already-rendered child (to get the previous positions). The
skip-stack mix is now useless, removing a lot of complex code.

This change is scary and will probably break some corner cases. But tests pass,
and a new one has been added to avoid future regressions.

Fix #1638.
2022-05-09 22:39:31 +02:00
Guillaume Ayoub
c53528753b Merge branch '55.x' 2022-05-05 16:29:26 +02:00
Guillaume Ayoub
bc4053510a Fix absolute position for rtl
Fix #1637. Related to #1613.
2022-05-05 16:28:55 +02:00
Guillaume Ayoub
a4d52533ec Add and improve tests for the "html" module 2022-05-05 15:47:43 +02:00