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

4400 Commits

Author SHA1 Message Date
Guillaume Ayoub
8ef8c39a03 Initial support of PNG emojis
Related to #1406.
2021-08-29 19:34:28 +02:00
Guillaume Ayoub
64d04c47b6 Merge branch '53.x' 2021-08-27 22:01:02 +02:00
Guillaume Ayoub
228520d8e6 Handle cx and cy in SVG rotations
Fix #1430.
2021-08-27 21:59:34 +02:00
Guillaume Ayoub
4423036ea6 Merge branch '53.x' 2021-08-27 16:46:34 +02:00
Guillaume Ayoub
40537a64d9 Use references in images too
Fix #1431.
2021-08-27 16:44:48 +02:00
Guillaume Ayoub
6930a7d358 Fix some resume_at and skip_stack variables in flex
Related to #1429.
2021-08-27 15:18:23 +02:00
Guillaume Ayoub
d3e39055cf Merge branch '53.x' 2021-08-27 14:48:59 +02:00
Guillaume Ayoub
229fba67a1 Revert "Remove the bookmark example from documentation"
This reverts commit 98c38c904d.
2021-08-27 14:47:19 +02:00
Guillaume Ayoub
d30faf3738 Version 53.2 2021-08-27 14:44:53 +02:00
Guillaume Ayoub
c51bc60764 Re-add make_bookmark_tree method
Fix #1428.
2021-08-27 14:43:17 +02:00
Guillaume Ayoub
bb29eca337 Transform text-align into shorthand
text-align is now a shorthand, setting text-align-all and text-align-last.

Related to #1389.
2021-08-24 13:27:59 +02:00
Guillaume Ayoub
412b589df9 Fix lint 2021-08-24 13:00:03 +02:00
Guillaume Ayoub
7192030d46
Merge pull request #1389 from ColinKinloch/text_align_last
Add text-align-last
2021-08-24 12:53:51 +02:00
Guillaume Ayoub
61ff7f0e1c Handle full "display" property
In CSS Display Module Level 3, the "display" property gets a long
representation allowing:

- a clear separation between inner and outer display type,
- new supported types (contents, run-in, flow-root…),
- inline list items.

This commit allows the (retrocompatible) new long syntax for "display". It also
supports the "flow-root" value. It doesn’t support values related to ruby, and
it doesn’t support the new "contents" and "run-in" display types.

This work gives the possibility to simplify the code in the block_*_layout
functions, and to improve the overall layout.

Related to #36.
2021-08-23 21:54:28 +02:00
Guillaume Ayoub
c3aebeef08 Fix link to Attachment in documentation 2021-08-23 21:54:16 +02:00
Guillaume Ayoub
f7377610c8 Add the finisher option to HTML.write_pdf 2021-08-23 09:47:49 +02:00
Guillaume Ayoub
0da6b043a7 Merge branch '53.x' 2021-08-22 15:41:55 +02:00
Guillaume Ayoub
a5b97e3a2f Version 53.1 2021-08-22 15:41:11 +02:00
Guillaume Ayoub
3aca9f1f84 Change the resume_at and skip_stack structure
Many operations, including page breaks, require a pointer to a specific
position of the box tree. For example, we used to have this structure to point
to the beginning of the first child of the second child:

(1, (2, None))

We now use:

{1: {2: None}}

This change is the first step to handle parallel flows (see #36). It doesn’t
change anything to the layout for now, but it allows us to store multiple
pointers in the same structure.

The next step is to handle multiple pointers in skip_stack during boxes layout.
It means that most of the *_layout() function need an extra for-loop to manage
multiple skip stacks.

We’ll then need to split new types of boxes: table cells, floats, absolutes…
2021-08-22 12:10:48 +02:00
Guillaume Ayoub
89b6fe39fc Fix page break value comparison 2021-08-21 19:56:21 +02:00
Guillaume Ayoub
98c38c904d Remove the bookmark example from documentation
Related to #1420.
2021-08-17 17:28:30 +02:00
Guillaume Ayoub
403dc3c2cf Merge branch '53.x' 2021-08-13 16:00:27 +02:00
Guillaume Ayoub
145546b670 Include the weasyprint.tools removal in the documentation
Related to #1422.
2021-08-13 16:00:07 +02:00
Guillaume Ayoub
c191372e07 Test empty links and relative links with base 2021-08-06 20:04:57 +02:00
Guillaume Ayoub
35d20308e0 Test absolute tables and remove dead code
Table translation’s (dx, dy) can’t be (0, 0), because the table is in a table wrapper
that already takes care of (0, 0) values.
2021-08-06 19:32:49 +02:00
Guillaume Ayoub
f162d1b762 Fix and test line-clamp 2021-08-06 19:05:03 +02:00
Guillaume Ayoub
f16b4c32d5 Test media queries 2021-08-06 18:38:06 +02:00
Guillaume Ayoub
ebd1064984 Test deprecated -o option 2021-08-06 18:14:13 +02:00
Guillaume Ayoub
143565e08d Test object-fit and object-position 2021-08-06 11:19:47 +02:00
Guillaume Ayoub
ccbe420d35 Fix optimization test 2021-08-04 17:14:52 +02:00
Guillaume Ayoub
c5590dd86d Test CLI optimizations 2021-08-04 16:54:09 +02:00
Guillaume Ayoub
0a1b2e9c64 Remove useless helper 2021-08-04 10:48:50 +02:00
Guillaume Ayoub
2e96bdee35 Simplify API to get intrinsic size of images
The previous API wasn’t stateless, as it sometimes required to call
get_intrinsic_size before accessing intrinsic_ratio. The new API offers a
single method to get width, height and ratio.
2021-08-03 18:39:14 +02:00
Guillaume Ayoub
694eddbc71 Embed images once
Images were already embedded once when included in the same stream.
Unfortunately, patterns have their own streams, meaning that a pattern used
multiple times includes the image each time. That’s especially bad for
different boxes using the same background, as backgrounds are drawn as
patterns.

Fix #1414.
2021-08-03 18:39:02 +02:00
Guillaume Ayoub
f327a9e353 Don’t crash when leaders are in floats
Fix #1409.
2021-08-01 19:06:13 +02:00
Guillaume Ayoub
cf267ee43a Version 53.0 2021-07-31 22:30:16 +02:00
Lucie Anglade
a0300ac0a9 Changelog for v53 2021-07-31 15:31:55 +02:00
Guillaume Ayoub
783378d14a Fix reference for percentages 2021-07-31 08:29:23 +02:00
Guillaume Ayoub
3e11acafb2 Include origin translation into matrix for patterns 2021-07-31 01:06:50 +02:00
Guillaume Ayoub
fd973a195a Fix origin translation for SVG gradients 2021-07-31 00:57:47 +02:00
Guillaume Ayoub
f240bae0b8 Handle SVG image tags for images with no intrinsic size 2021-07-31 00:30:00 +02:00
Lucie Anglade
8c23e982e8 Preserve ration when drawing image in svg 2021-07-30 17:15:15 +02:00
Lucie Anglade
cd42c6cabf Clip embedded svg 2021-07-30 16:42:00 +02:00
Lucie Anglade
11a175efc7 Handle x and y in use tags 2021-07-30 16:32:25 +02:00
Lucie Anglade
7f6e99bc58 Handle errors in points 2021-07-30 16:08:19 +02:00
Lucie Anglade
13a966b021 Check stream emptyness when drawing text 2021-07-30 15:51:55 +02:00
Lucie Anglade
d80e99dd6c Fix use tags referencing svg and symbols, new episode 2021-07-30 15:49:10 +02:00
Lucie Anglade
e58ae27b99 Handle image mode I 2021-07-30 15:47:33 +02:00
Lucie Anglade
6de791a3a1 Fix use tags referencing svg and symbols 2021-07-30 15:42:51 +02:00
Lucie Anglade
603736407c Do not crash when bounding box is unknown 2021-07-30 15:23:04 +02:00