1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 16:37:47 +03:00
Commit Graph

204 Commits

Author SHA1 Message Date
Guillaume Ayoub
cd925bc76c Revert "Fix tests for Pango 1.44"
This reverts commit d6da699f91.
2019-08-14 18:34:42 +02:00
Guillaume Ayoub
d6da699f91 Fix tests for Pango 1.44
Fix #917.

One test fails with current 1.44.3 version, because of bug 397 [1] fixed
in 1.44.4 (not released yet).

[1] https://gitlab.gnome.org/GNOME/pango/issues/397
2019-08-08 16:47:05 +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
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
9831a1ba40 Remove and fix some TODOs 2019-07-11 16:48:53 +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
2497d605ee Remove useless line break 2019-07-09 17:16:09 +02:00
Guillaume Ayoub
2ab52a7c8c Deactivate layout created for justified text 2019-07-08 16:34:44 +02:00
Guillaume Ayoub
31c29cdb1f Just create a layout when justification is needed
Spliting the line again is useless here.
2019-07-05 17:57:23 +02:00
Guillaume Ayoub
1be85621a5 Don't calculate linebox width and height when not needed
Float clearance requires to calculate the line minimum width and height before
setting the linebox position. When there are no floating boxes in the context,
there's no need to calculate these sizes.

We thus avoid a call to inline_min_content_width per text line. This call
required a lot of time as it needed to go through the whole line breaking
algorithm to render the first word.

We save 15% of the rendering time when generating our Odyssey sample.
2019-07-05 17:33:30 +02:00
Guillaume Ayoub
76479de01f Don't align lines larger than their parents
Related to #867.
2019-05-17 16:19:42 +02:00
Guillaume Ayoub
9012888df2 Set inline table baseline
"The baseline of an 'inline-table' is the baseline of the first row of the
table."

Related to #867.
2019-05-17 15:49:13 +02:00
Guillaume Ayoub
80f9a34383 Fix justified and underlined text
Fix #797.
2019-04-01 14:25:13 +02:00
Guillaume Ayoub
5dd6e4c2cd Merge branch 'master' into box-decoration-break 2019-03-19 17:50:16 +01:00
Guillaume Ayoub
8724bc3d37 Fix the "same broken child" detection
Fix #783.
2019-03-18 13:03:21 +01:00
Guillaume Ayoub
3943e672b8 Fix box-decoration-text for inline boxes
And add related tests of course!

Related to #771.
2019-03-15 22:32:36 +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
f67b7a6083 Update line width when splitting lines with glued inline children
Fix #637.
2019-01-22 00:28:37 +01:00
Guillaume Ayoub
824b5c9b4a Small division cleanup 2018-12-27 16:42:27 +01:00
Guillaume Ayoub
4e6d449c5c Don't store Pango layout between page layout and drawing steps
Creating Pango layouts during page layout and recreating them when drawing
pages is a little bit slower but frees A LOT of memory.
2018-11-21 22:16:52 +01:00
Guillaume Ayoub
b0944e718a Fix text-indent at the beginning of the page
Fix #706.
2018-10-26 18:49:40 +02:00
Guillaume Ayoub
56904baa79 Use the same copyright line everywhere 2018-09-20 18:46:27 +02:00
Guillaume Ayoub
f3d097cd9b Discard floats in children that don't fit at all on a line 2018-08-29 15:20:18 +02:00
Guillaume Ayoub
ecba06aad1 Don't resolve linebox percentages for each line
Related to #679.
2018-08-29 14:26:23 +02:00
Guillaume Ayoub
85ac65514a Fix comment 2018-08-29 14:00:02 +02:00
Guillaume Ayoub
1b9b51a99e Correctly handle floats in inlines 2018-08-29 13:26:08 +02:00
Guillaume Ayoub
affbe00afd Fix position_x of rtl inlines
Related to #106.
2018-08-24 15:30:48 +02:00
Guillaume Ayoub
6a3b3fc1d9 Copy replaced boxes in layout_fixed_boxes 2018-08-03 11:27:28 +02:00
Guillaume Ayoub
d7e02cca28 Merge branch 'layout_fixed_boxes' of https://github.com/Tontyna/WeasyPrint into Tontyna-layout_fixed_boxes 2018-08-03 10:50:31 +02:00
Guillaume Ayoub
81b3ee64d7 Fix a linebox breaking corner case
Fix #660.

As said in the (very helpful) comment at the beginning of the modified block,
we have to add "child_resume_at" and "initial_skip_stack[1]" skip stacks, but
the old algorithm was obviously wrong when the stacks had more than one level
of depth.

The fix is shorter, easier to read and right (until next bug). A regression
test has been added too.
2018-07-31 17:07:06 +02:00
Tontyna
d46dd01bfb Make images behave as expected in fixed boxes 2018-06-15 15:40:31 +02:00
Guillaume Ayoub
c9d1a59adc Simple workaround for a dirty Pango bug
Solution given by 🍰 @Tontyna 🍰

Fix #614, fix #585.
2018-04-30 23:52:52 +02:00
Guillaume Ayoub
08df76c807 Fix floating-point number error to fix floating box layout
Fix #583.
2018-03-22 02:00:17 +01:00
Guillaume Ayoub
216fe2b6c6 Merge branch 'master' into flexbox 2018-03-05 01:49:11 +01:00
Guillaume Ayoub
d695044a84 Fix inline box breaking function
Fix #580.
2018-02-27 01:16:27 +01:00
Guillaume Ayoub
19546c8778 Handle inline-flex and its baseline 2018-02-25 18:05:04 +01:00
Guillaume Ayoub
19365e824e Fix all crashes with W3C test suite 2018-02-24 04:41:11 +01:00
Guillaume Ayoub
79e2b426a4 Fix another crash due to the new line breaking algorithm
Related to #560.
2018-02-04 15:40:32 +01:00
Guillaume Ayoub
28d2e886fc Use the current child skip stack when breaking lines with children
Fix #560.
2018-02-04 00:54:49 +01:00
Guillaume Ayoub
13bba98d91 Fix text justification for indented text
Related to #507.
2018-01-21 16:08:29 +01:00
Guillaume Ayoub
16e8186568 Drop Python 2 support 2018-01-14 01:48:17 +01:00
Guillaume Ayoub
ad11edfff2 Remove StyleDict objects 2018-01-13 17:41:08 +01:00
Guillaume Ayoub
724565f27a Don't allow attribute access to StyleDict objects 2018-01-13 17:05:23 +01:00
Guillaume Ayoub
c593d2d41e Keep track of removed collapsible spaces only at the end of boxes 2017-12-26 13:21:24 +01:00
Guillaume Ayoub
d62bfec60b Keep track of removed collapsing spaces for wrap opportunities 2017-12-26 12:39:20 +01:00
Guillaume Ayoub
cacdc83a13 Take care of right spacing for inlines 2017-12-23 01:15:31 +01:00