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

2125 Commits

Author SHA1 Message Date
Guillaume Ayoub
4cb6045784 Fix typo introduced in previous commit 2019-09-06 17:12:18 +02:00
Guillaume Ayoub
615e298ade Don't include floating elements each time we try to render a column 2019-09-06 16:40:17 +02:00
Guillaume Ayoub
789b80e684 Only use in flow children to set columns height 2019-09-06 11:31:03 +02:00
Guillaume Ayoub
87d9e84f28 Avoid infinite loops when rendering columns 2019-09-05 15:45:17 +02:00
Guillaume Ayoub
cf7bff7af1 Fix test indentation 2019-09-05 15:28:23 +02:00
Guillaume Ayoub
d0c9a75e53 Fix table rendering with empty lines and rowspans
Fix #937.
2019-09-05 15:27:40 +02:00
Guillaume Ayoub
b06a3a9a6f Always set tabulation width
Not setting it makes Pango use a slightly different value of tabulation width,
breaking a test.
2019-09-05 13:46:01 +02:00
Guillaume Ayoub
29fcb45f0e Merge branch 'master' of github.com:Kozea/WeasyPrint 2019-09-04 16:21:39 +02:00
Guillaume Ayoub
4dc0b119f6 Don't crash when small columns are wrapped in absolute blocks
Fix #897.
2019-09-04 16:20:07 +02:00
Guillaume Ayoub
074d147611
Merge pull request #922 from Kozea/perf
Improve performance
2019-09-03 12:29:48 +02:00
Guillaume Ayoub
fb62571f86 Fix gradient test
Use colors with even hexadecimal components for gradients to have a
deterministic result when colors are mixed.

Fix #913.
2019-09-03 12:24:39 +02:00
grewn0uille
9b6bd0f192 Merge branch 'master' into page_break_table 2019-08-30 11:46:41 +02:00
grewn0uille
d01f941ca6 Add tests for page breaks between tbodys 2019-08-30 11:45:47 +02:00
Tontyna
8277462bee Dont use deprecated Logger.warn 2019-08-26 10:16:31 +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
6dc59b8dd8 break pages avoid between tr 2019-08-21 19:00:55 +02:00
grewn0uille
fcda627731 Break before footer 2019-08-20 18:38:37 +02:00
grewn0uille
af6673d2f7 Fix tests 2019-08-20 18:35:05 +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
8ac7afe4ca Remove add_declaration
We can now get style in the parent loop, avoiding a large number of calls to
setdefault.
2019-08-19 18:23:17 +02:00
Guillaume Ayoub
feae58052c Merge branch 'master' into perf 2019-08-17 11:06:29 +02:00
Guillaume Ayoub
b8c19a2878 Heal my psychotic desorders 2019-08-17 11:04:57 +02:00
Tontyna
b5a4cb739c fix erroneous document title 2019-08-16 22:01:46 +02:00
Guillaume Ayoub
359536e6e3 Merge branch 'master' into perf 2019-08-14 18:34:51 +02:00
Guillaume Ayoub
cd925bc76c Revert "Fix tests for Pango 1.44"
This reverts commit d6da699f91.
2019-08-14 18:34:42 +02:00
Guillaume Ayoub
aab0fa5b9d Fix line height with Pango > 1.44
Pango > 1.44 returns a wrong baseline when no text is set on the layout. We
now have to set text when calculating metrics for strut layouts.

Fix #917.
2019-08-14 18:32:44 +02:00
Guillaume Ayoub
440070b8da Fix padding and margin management for column flex boxes
Nothing more than a stupid typo. Fix #919.
2019-08-14 16:29:45 +02:00
Guillaume Ayoub
554225b4f7 Fix typo in comment 2019-08-14 14:50:06 +02:00
Guillaume Ayoub
91d8c0fbec Don't remove repeated headers when line groups avoid breaks
When no table content is small enough to fit in one page, we remove repeated
headers and footers to give table content more space. This is a good idea for
complicated situations, but not adapted when line groups avoid page breaks
inside.

This commit keeps headers and footers when the next line group avoids page
breaks, by forcing to render at least one line of the table, like if the page
was empty.
2019-08-14 14:37:49 +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
fb90a736d1 Add test about inline images with no size
Related to #901.
2019-07-25 10:51:25 +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
ba2b4542e8 Merge branch 'master' into perf 2019-07-24 10:54:20 +02:00
Guillaume Ayoub
8d10c011d9 Don't respect table cell width when content doesn't fit
Fix #906.
2019-07-24 10:47:55 +02:00
Guillaume Ayoub
620e0754f4 Fix lint 2019-07-23 18:07:14 +02:00
Guillaume Ayoub
328de5e67e
Merge pull request #907 from makeleaps/nowrap
Refactor LayoutContext building
2019-07-23 18:01:56 +02:00
Raphael Gaschignard
afc7dabc1b Refactor LayoutContext building
this will provide a simpler API for testing context-using functions inside tests
2019-07-23 14:12:08 +09: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
0142689fd9 Merge branch 'master' into perf 2019-07-18 16:33:22 +02:00
grewn0uille
135dc06c9a Handle recto/verso on page break. 2019-07-18 14:34:45 +02:00
Guillaume Ayoub
b328b5766c Remove useless TODO
FakeHTML actually reads data from a file.
2019-07-18 11:54:03 +02:00
Guillaume Ayoub
97a5aaea07 Remove work done twice when splitting lines between characters
There used to be a problem with WRAP_CHAR method of Pango, but it's fixed. As
nothing is said in Pango's Changelog, the probem may have been in our heads,
and that wouldn't be surprising at all.
2019-07-18 11:39:35 +02:00
Guillaume Ayoub
997882514e Fix the way display is set when no box is generated from tree
Add related tests too.
2019-07-18 11:22:07 +02:00
Guillaume Ayoub
d24211d82a Refuse too many "normal" values in font expander 2019-07-17 15:00:20 +02:00
Guillaume Ayoub
8b2b25f702 Fix tests relying on a modified CSS parsing rule
In the 2014 version of CSS Syntax Module Level 3 [1], meeting an EOF character
before the end of a string would just return the string token. In the 2019
candidate recommendation [2], this behavior must raise a parse error.

This commit fixes a test that was relying on the older behavior.

TinyCSS2 will follow the new specification from version 1.1.0.

[1] https://www.w3.org/TR/2014/CR-css-syntax-3-20140220/#consume-a-string-token
[2] https://www.w3.org/TR/2019/CR-css-syntax-3-20190716/#consume-string-token
2019-07-17 11:22:38 +02:00
Stani
67f031b8e7
Add state to bookmark tree documentation.
There is a breaking change in make_bookmark_tree, which was not documented.
2019-07-15 15:15:34 +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
8a64fd40db Remove TODO 2019-07-11 17:01:53 +02:00
Guillaume Ayoub
9831a1ba40 Remove and fix some TODOs 2019-07-11 16:48:53 +02:00
Guillaume Ayoub
ad8ab62280 Same optimization as previous commit for inline level boxes 2019-07-11 15:03:40 +02:00
Guillaume Ayoub
005d9a3c9f Don't copy style when removing decorations if there's no need to
It saves a lot of memory for very long paragraphs with no decoration style.
2019-07-11 14:48:58 +02:00
Guillaume Ayoub
76c3a47607 Fix comment and remove useless attribute setting when copying boxes 2019-07-10 18:32:00 +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
a5671524ef Fix text set on layout
This partially reverts a27146c.
2019-07-09 17:25:43 +02:00
Guillaume Ayoub
2497d605ee Remove useless line break 2019-07-09 17:16:09 +02:00
Guillaume Ayoub
a27146c9a7 Don't reset layout text when there's no soft hyphens in text
Setting text is slow and should be avoided when possible. We should probably
avoid get_first_line too and keep the original one here.
2019-07-09 16:57:40 +02:00
Guillaume Ayoub
7d5347f081 Merge branch 'master' into perf 2019-07-09 16:13:28 +02:00
Guillaume Ayoub
66958573e5 Use only one del statement when possible 2019-07-09 16:09:23 +02:00
Szmen
008a5b3742 Docs: Fixed wrong nested list comprehension example 2019-07-09 00:06:19 +02:00
Guillaume Ayoub
32be33d37d Avoid loop and text formatting in anonymous styles loop
As this loop is called for each anonymous box, avoiding a text formatting makes
a significant difference.
2019-07-08 18:20:41 +02:00
Guillaume Ayoub
3b38911222 Set both computed and specified values when setting CSS variables
Going through the whole specified properties dict can be long, and calling
"startswith" on each name is even longer. Setting both computed and specified
values at the same times avoids an extra loop in compute.
2019-07-08 18:02:44 +02:00
Guillaume Ayoub
b57b2c13c1 Use a dict instead of a dummy function to store computers
As attributes of this object is accessed many times per element, it improves
the overall speed in a significant way. We save between 1 and 2 percents with
html5 sample for example.
2019-07-08 17:51:20 +02:00
Guillaume Ayoub
7bda29b95b Clean Layout code 2019-07-08 16:34:58 +02:00
Guillaume Ayoub
2ab52a7c8c Deactivate layout created for justified text 2019-07-08 16:34:44 +02:00
Guillaume Ayoub
8db46ff25d Merge branch 'master' into perf 2019-07-08 14:42:14 +02:00
Guillaume Ayoub
80c5a82871 Version 48 2019-07-08 13:51:38 +02:00
Guillaume Ayoub
f5d4ee2824
Merge pull request #891 from Kozea/text-overflow
Support text-overflow
2019-07-08 13:27:13 +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
6dcc17f151 Take care of text-overflow to set ellipsis
Fix #874.
2019-07-04 12:00:03 +02:00
Guillaume Ayoub
e88190fc14 Use Pango's set_ellipsize 2019-07-03 16:20:58 +02:00
Guillaume Ayoub
c813d45d61 First naive version of text-overflow support 2019-07-03 15:37:29 +02:00
Guillaume Ayoub
adb521643c Support column-span
Fix #719.

We also used the real rendering stack to find the columns heights, fix #696.
2019-06-28 17:33:35 +02:00
Guillaume Ayoub
a2ec8567a1 Merge branch 'master' into column-span 2019-06-28 15:04:28 +02:00
Guillaume Ayoub
57f216cb91 Clean some code in draw module 2019-06-25 16:13:11 +02:00
Gabriel Corona
ef5c99a360 Implement text-decoration: wavy 2019-06-24 21:02:25 +02:00
Guillaume Ayoub
668ca840c7 Minor style fixes 2019-06-22 21:49:28 +02:00
Guillaume Ayoub
ae43048a49
Merge pull request #869 from randomstuff/text-decoration
Fix broken dash/dotted pattern in text-decoration with inline elements
2019-06-22 21:46:41 +02:00
Guillaume Ayoub
923e45b717 Add test for #885. 2019-06-22 21:43:08 +02:00
Guillaume Ayoub
5e0f6d494f Actually use the content box to resolve flex items percentages
Fix #885.
2019-06-22 21:37:27 +02:00
grewn0uille
d5b702ef32 WIP test column-span 2019-06-06 13:54:35 +02:00
grewn0uille
497a0b54dd Add partial support for column-span property.
Related to #719.
2019-06-04 18:03:32 +02:00
Guillaume Ayoub
8499379dd1 Don't repeat background images when it's not needed
For now, we only avoid the repetition when we have no-repeat for x and y
axes. We could do this when the painting area is smaller than the image and
when the position doesn't require a repetition. But… Who cares?

Fix #238.

There was also a bug in the size of the surface needed to draw images that are
not repeated. Before this commit, the repeat size was the painting size * 2 to
avoid glitches at the boundaries. But we have to be sure to draw at least the
whole image, as the image may be translated before being drawn. The
multiplication is not needed as we don't repeat the image anymore.

Related to #669.
2019-06-02 23:03:19 +02:00
Guillaume Ayoub
9f442be640 Move percentage function into percentages module 2019-06-02 18:06:25 +02:00
Guillaume Ayoub
846515b109 Merge branch 'master' of github.com:Kozea/WeasyPrint 2019-06-02 17:55:51 +02:00
Guillaume Ayoub
ef74806c8d
Merge pull request #875 from mbarkhau/feature_object_fit_and_pos
Feature object-fit and object-position
2019-06-02 17:55:05 +02:00
Guillaume Ayoub
dd6572b999 Simplify parse_pixels 2019-06-02 17:50:38 +02:00
Manuel Barkhau
f48fbf0923 lint fix 2019-06-02 16:18:56 +02:00
Manuel Barkhau
ce8ab0f4f0 use object-position for layout of images 2019-06-02 16:16:51 +02:00
Manuel Barkhau
d687c12ff7 refactor: add and use parse_pixels in tests 2019-06-02 12:40:45 +02:00
Manuel Barkhau
601b20864c add css parsing for object-position 2019-06-01 01:44:30 +02:00
Manuel Barkhau
20afa51175 refactor: factor out "precentage" function 2019-06-01 01:39:40 +02:00
Manuel Barkhau
9f61cd688b Add object-fit parsing and layout 2019-06-01 01:39:40 +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
9b2cbb8943 Remove testing code 2019-05-31 07:19:43 +02:00
Guillaume Ayoub
d753b301a1 Always set outside_list_marker property on boxes 2019-05-31 07:18:25 +02:00
Guillaume Ayoub
a23d4658fc Set marker layout only when needed 2019-05-31 06:36:41 +02:00
Guillaume Ayoub
2ce03092f1 Small code and style improvements around bookmark-state
Related to #870.
2019-05-23 23:55:56 +02:00
Guillaume Ayoub
e881b66859
Merge pull request #870 from randomstuff/bookmark-state
Implement bookmark-state support
2019-05-23 23:15:37 +02:00
Guillaume Ayoub
37e788e8c3 Force SVG size
Related to #867.
2019-05-20 12:31:30 +02:00
Gabriel Corona
34127350b6 Implement bookmark-state support 2019-05-19 19:31:32 +02:00
Gabriel Corona
e704b8f8e2 Fix broken dashed/dotted pattern in text-decoration with inline elements
Example:

~~~html
<style>
p {
  text-decoration: underline green dotted;
}
span {
  color: red;
  text-decoration: underline red dotted;
}
</style>

<p> Lorem <span>ipsum</span> dolor sit amet, <span>consectetur</span>
  adipiscing elit, sed do eiusmod tempor <span>incididunt</span> ut
  labore et dolore <span>magna aliqua</span>. Ut enim ad minim veniam,
  quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
  commodo consequat. Duis aute irure dolor in reprehenderit in
  voluptate velit esse cillum dolore eu fugiat nulla
  pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
  culpa qui officia deserunt mollit anim id est laborum.</p>
~~~
2019-05-18 00:17:38 +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
58770563be Set row baseline when no cells are baseline-aligned
"If a row has no cell box aligned to its baseline, the baseline of that row is
the bottom content edge of the lowest cell in the row."

Related to #867.
2019-05-17 13:03:02 +02:00
Guillaume Ayoub
99f85beac6 Don't use translations to align flex items
As the children's layout has not been done yet, their own children are not yet
positioned and thus can't be translated. We have to change the child position
instead and let the child layout move its own children.

Fix #811.
2019-05-16 11:06:28 +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
b88cf3654b Add documentation for text decoration 2019-05-14 23:45:53 +02:00
Guillaume Ayoub
b5cdddfb3f Minor code style changes 2019-05-14 23:35:26 +02:00
Guillaume Ayoub
9fcfdfc24c Ignore wavy value for text-decoration-style
Ignoring values can help to use stylesheets with fallbacks, and it's better to
log these values than to silently ignore them.
2019-05-14 23:33:50 +02:00
Guillaume Ayoub
ed2f4f384a Allow blink as a text-decoration value
It will only be ignored while drawing, but it doesn't harm to keep the value
and makes code and tests more readable.

Also use a set instead of a frozenset to store text-decoration-line, bringing
more readability even if it may be a little, little, little bit slower.
2019-05-14 23:31:27 +02:00
Guillaume Ayoub
f5373db74e
Merge pull request #855 from randomstuff/text-decoration
Add support for full CSS3 text-decoration [RFC]
2019-05-14 18:11:43 +02:00
Guillaume Ayoub
840c4a6d92 Don't crash when using UTC timezones
Fix #862.
2019-05-14 15:32:17 +02:00
Gabriel Corona
9a73fff1cf Add support for full CSS3 text-decoration
* parse text-decoration as shorthand
* draw different colors
* basic text-decoration-style
* no 'wavy' support for now
2019-04-29 21:13:01 +02:00
Guillaume Ayoub
2fa7c2fc18 Version 47 2019-04-12 16:45:24 +02:00
Guillaume Ayoub
5ffdc8270a Update default_url_fetcher's documentation 2019-04-12 16:34:19 +02:00
Guillaume Ayoub
cc512b3ec0 Fix line breaking tests 2019-04-12 16:27:33 +02:00
Guillaume Ayoub
039b0a680d Don't rely on iter_get_index to get current line break index
pango_layout_iter_get_index gives the visual order, not the logical order, so
we can't rely on this to fix the line break index.

Fix #828.
2019-04-12 16:04:25 +02:00
Guillaume Ayoub
5ceddcb2ca
Merge pull request #843 from Kozea/variables
Add CSS variables
2019-04-10 13:46:28 +02:00
Guillaume Ayoub
5a2553e893
Merge pull request #846 from Kozea/nth-page
Support the `:nth()` page selector.
2019-04-10 13:46:18 +02:00
mohdnajdy
87d586f431
remove ssl import 2019-04-04 15:12:05 +03:00
mohdnajdy
afc244123f
set parameter name to ssl_context and pass directly to urlopen 2019-04-04 15:04:05 +03:00
mohdnajdy
35389682a9
fixed issue of line to long 2019-04-04 14:49:30 +03:00
mohdnajdy
81f0002233
fixed import order 2019-04-04 14:41:04 +03:00
mohdnajdy
4b8b56f8bb
allow ability to ignore ssl verification within default_url_fetcher 2019-04-04 14:21:41 +03:00
Guillaume Ayoub
d637212e8d Handle :nth(An+B) notation 2019-04-02 16:57:45 +02:00
Guillaume Ayoub
672407610e Add tests 2019-04-02 16:36:56 +02:00
Guillaume Ayoub
cff70ee18a Clean the nth() parsing function 2019-04-02 16:26:57 +02:00
Guillaume Ayoub
fc7db276e5 Add page declarations on demand
With the previous system, we were listing all page types as the cartesian
product of page names and pseudo selectors. Declarations were added for all
these possible page types.

The nth() page selector makes this system impossible, as we can't make the
cartesian product with a number of pages we don't know at the beginning of the
rendering. We now add declarations before rendering each page, based on the
properties of the page.

This new way is faster when the total number of pages is lower than the
cartesian product of possible pages. For long documents, we could improve speed
by detecting CSS rules based on page index or page name, and use cached results
for all pages that don't rely on such rules.
2019-04-02 12:39:00 +02:00
Guillaume Ayoub
3e953b457e Simplify page style declaration 2019-04-02 12:00:47 +02:00
Guillaume Ayoub
36fa280bdb Allow repeted page pseudo-classes, 2nd edition 2019-04-02 11:59:12 +02:00
Guillaume Ayoub
1d0c3e435f Use explicit variable names 2019-04-02 11:37:16 +02:00
Guillaume Ayoub
48775182e6 Set nth() selector specificity 2019-04-02 11:36:07 +02:00
Guillaume Ayoub
ce7e9dd049 Allow multiple specifications of page pseudo-classes 2019-04-02 11:35:41 +02:00
Guillaume Ayoub
be6c46ce86 Minor fixes 2019-04-02 11:35:23 +02:00
Guillaume Ayoub
ed4f00848f Use empty string as default value of named page
That's the value given in the spec, using None doesn't add anything and even
introduces bugs.
2019-04-02 11:19:48 +02:00
Guillaume Ayoub
b49719820b Fix tests 2019-04-01 21:00:27 +02:00
Guillaume Ayoub
f2e9784ee7 Add a stupid and broken support of nth page selector 2019-04-01 18:45:59 +02:00
Guillaume Ayoub
f1a6da72ac Set set_computed_styles as a StyleFor method 2019-04-01 15:24:18 +02:00
Guillaume Ayoub
84e1813c6c Merge branch 'master' into media-queries 2019-04-01 14:41:51 +02:00
Guillaume Ayoub
80f9a34383 Fix justified and underlined text
Fix #797.
2019-04-01 14:25:13 +02:00
Guillaume Ayoub
bd77dce4d5 Fix justified and underlined text
Fix #797.
2019-04-01 14:23:24 +02:00
Guillaume Ayoub
5f2530fcac Add tests 2019-04-01 13:56:58 +02:00
Guillaume Ayoub
70697bc6fe Ignore initial value in CSS variables 2019-04-01 13:48:44 +02:00
Guillaume Ayoub
6660fa4b1c Merge branch 'master' into variables 2019-04-01 12:57:25 +02:00
Guillaume Ayoub
9b8f3297c1 Fix test fixed by previous fix (true story) 2019-03-27 11:47:10 +01:00
Guillaume Ayoub
ee69b32dfb Fix margin-break: auto
Fix #835.
2019-03-27 11:30:52 +01:00
Guillaume Ayoub
29820d63c5 Break unbreakable table groups if we really need to
Fix #273.
2019-03-22 16:41:10 +01:00
Guillaume Ayoub
e487a985b1 Don't crash when flex items are replaced boxes 2019-03-22 16:15:50 +01:00
Guillaume Ayoub
13fb5aba84 Merge branch 'master' into variables 2019-03-21 11:28:58 +01:00
Guillaume Ayoub
fb75098c66 Version 46 2019-03-20 17:40:07 +01:00
Guillaume Ayoub
27e70fcb48 Clean stable/unstable properties 2019-03-20 17:37:24 +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
d134ea743a Add test about flexbox baseline
Related to #765.
2019-03-19 13:08:18 +01:00
Guillaume Ayoub
a5e9127859 Don't crash when no baseline can be found in flexbox children
Fix #765.
2019-03-19 13:05:58 +01:00
Guillaume Ayoub
fd90af6061 Avoid auto margins in flex layout
Fix #800.

The way auto margins are resolved for the parent is currently really stupid. We
have to find exactly when these margins must be set.
2019-03-19 11:49:27 +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
5fc905baa1 Clean status and URL of CSS specifications 2019-03-18 15:08:50 +01:00
Guillaume Ayoub
498fb6cd0d Clean string-set validation, add tests
Related to #827.
2019-03-18 14:05:55 +01:00
Guillaume Ayoub
856262802e Clean string-set tests 2019-03-18 13:48:59 +01:00
Guillaume Ayoub
e7fd37bc26 Add broken test
Related to #783.
2019-03-18 13:29:54 +01:00
Guillaume Ayoub
0cb72e9136 Fix indentation 2019-03-18 13:27:13 +01:00
Guillaume Ayoub
8724bc3d37 Fix the "same broken child" detection
Fix #783.
2019-03-18 13:03:21 +01:00
Guillaume Ayoub
b6b8257e95
Merge pull request #827 from Tontyna/string-set-case
Named strings and counter names are case sensitive
2019-03-18 10:41:11 +01:00
Tontyna
876ec3ec5e Target-counter names are case sensitive 2019-03-16 21:22:19 +01:00
Tontyna
c7bf9548e5 Counter names are case sensitive 2019-03-16 21:07:08 +01:00
Tontyna
6af4874a33 Named strings are case sensitive 2019-03-16 20:03:36 +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
468e6fed89 Add test for box-decoration-break
Related to #771.
2019-03-15 17:43:46 +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
fc089f5700 Clean and add tests 2019-03-14 17:01:38 +01:00
Tontyna
9c9f1deb06 Shrink min-max-height and -width according to box-sizing 2019-03-13 20:59:11 +01:00
Guillaume Ayoub
05f4dae136 Use DejaVu as default Windows font for tests 2019-03-12 16:24:42 +01:00
Guillaume Ayoub
167ebce065 Please isort again 2019-03-10 19:34:16 +01:00
Guillaume Ayoub
1eea5a4def Don't crash when fixed boxes are nested
Fix #728.
2019-03-07 18:49:31 +01:00
Guillaume Ayoub
bc1f59c288 Small change in docstring 2019-03-07 15:12:29 +01:00
Guillaume Ayoub
b1746cd345 Fix crash 2019-03-07 12:03:57 +01:00
Guillaume Ayoub
c3f4762555 Fix default value used in variable cycles 2019-03-07 11:56:01 +01:00
Guillaume Ayoub
63d2024670 Avoid deep cycles for variables 2019-03-07 11:49:59 +01:00
Guillaume Ayoub
b074803070 Avoid endless loops on direct cycles 2019-03-07 11:40:07 +01:00
Guillaume Ayoub
4dd67f9a73 Don't validate functions whose last argument is a comma 2019-03-07 11:19:22 +01:00
Guillaume Ayoub
008a87ac9e Fix key of properties validators 2019-03-07 11:19:01 +01:00
Guillaume Ayoub
01804e9798 Add a TODO about validation for variable declaration 2019-03-07 11:18:36 +01:00
Guillaume Ayoub
aa77f8a398 Handle simple variable cycles 2019-03-07 11:01:56 +01:00
Guillaume Ayoub
409e7c4e74 Don't crash on empty tuples 2019-03-07 10:31:39 +01:00
Guillaume Ayoub
7e47b93f4c Handle more use cases for var() function 2019-03-06 18:11:11 +01:00
Guillaume Ayoub
480e2d6306 Don't lowercase variable properties 2019-03-06 17:19:27 +01:00
Guillaume Ayoub
7e01a22898 Remove useless check about property name 2019-03-06 17:09:57 +01:00
Guillaume Ayoub
c447add874 First simple version supporting CSS variables
Related to #546.
2019-03-06 13:51:30 +01:00
Guillaume Ayoub
b7a9fe7dcc Update copyright 2019-03-04 11:04:06 +01:00
Guillaume Ayoub
51dcbe36a5 Don't crash when removing trailing whitespaces on pre-line blocks
Fix #610.
2019-03-01 16:03:04 +01:00