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

4824 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
c2f4042818 Remove placeholders when re-rendering columns 2022-08-20 17:12:26 +02:00
Guillaume Ayoub
427967b54b Don’t shrink split box height when it reaches the bottom of the page
When a box is forced to be displayed (when the page is empty), don’t shrink to
math the bottom of the page. For normal cases the rendering may be better, and
it’s required when elements are forced to be rendered to get their height, for
example during the multicolumn layout.
2022-08-20 17:00:26 +02:00
Guillaume Ayoub
5ff90ba5fe Correctly handle footnotes in columns 2022-08-19 16:46:11 +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
22d6362d98 Remove placeholders when pre-rendering columns
Related to #1707.
2022-08-18 14:18:13 +02:00
Guillaume Ayoub
ac92cac7f2 Fix comment 2022-08-18 10:15:55 +02:00
Guillaume Ayoub
e9c45c7060 Clean and test "text-transform: capitalize"
Related to #1703.
2022-08-15 16:08:06 +02:00
Guillaume Ayoub
edb082a1bf
Merge pull request #1703 from VeteraNovis/master
Update the text-transform "capitalize" behaviour
2022-08-15 15:32:22 +02:00
Guillaume Ayoub
80f5722965 Try to pin Harfbuzz’s version 2022-08-15 15:17:14 +02:00
Guillaume Ayoub
e6988217e4 Pin flake8 version 2022-08-15 13:39:05 +02:00
Guillaume Ayoub
c64eec81cc Correctly detect reported footnotes for repagination
Fix #1700.
2022-08-15 12:26:06 +02:00
Guillaume Ayoub
e1093d36ea Clean comment 2022-08-15 11:26:00 +02:00
VeteraNovis
d59deb7f7b Rework the new capitalize function
- Remove external dependency on `regex` module
2022-08-10 21:55:45 +08:00
VeteraNovis
a9e7f9aac8 Update the text-transform "capitalize" behaviour
Transform the first typographic letter unit of each word to uppercase
without modifying other characters

See issue #1612
2022-08-07 21:11:52 +08:00
Guillaume Ayoub
f6a13ed636 Merge branch '56.x' 2022-07-24 14:43:18 +02:00
Guillaume Ayoub
b889ceb99d Version 56.1 2022-07-24 14:38:41 +02:00
Konstantin Weddige
42db8bdb03 Update tests 2022-07-22 12:22:22 +02:00
Konstantin Weddige
2656b4e4dc Add language to pdf 2022-07-22 10:06:54 +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
c4bf165d3e Follow max-height on footnote area
This solution is by far the cleanest I’ve found to follow max-height without
changing everything. Contrary to my previous tries, it keeps the original style
untouched, doesn’t add dirty properties on the box and only assumes that the
overflowing children are caused by the max-height set on the area. This last
condition is probably true in real-life cases, but we’ll sure find soon that
other users don’t have the real life we expect them to have.

It also has the side effect of following the height attribute too. There’s
nothing in the specification about which properties are allowed in @footnote
rules, only a classical "How would one describe this in the grammar of
CSS3-Page?", so … who cares? We’ll sure find soon that other users actually
care more than the W3C.

The existing tests pass, that’s good news, but we’ll need solid new tests.

Related to #1674.
2022-07-11 22:24:18 +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
c37886611e Merge branch '56.x' 2022-07-07 21:40:37 +02:00
Guillaume Ayoub
f051407168 Fix link in changelog 2022-07-07 21:40:26 +02:00
Guillaume Ayoub
10da5691d5 Version 56.0 2022-07-07 21:33:36 +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
f2fed78b05 Clean the stacking module 2022-07-02 09:57:37 +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
3ced38dd00 Don’t upgrade cffi for tests on Windows 2022-07-01 09:06:34 +02:00
Guillaume Ayoub
b91f873c07 Don’t upgrade cffi for tests on Windows 2022-06-30 22:43:15 +02:00
Guillaume Ayoub
bc2ce90d2e Add missing variable 2022-06-30 21:58:23 +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
95f4bda002 Remove useless u'…' from comments 2022-06-28 14:08:04 +02:00