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

79 Commits

Author SHA1 Message Date
Guillaume Ayoub
b40ad461be Remove repeated copyright assignments in files
Everything is replaced by a more explicit message in the COPYRIGHT file.

Inspired by rust-lang/rust#43498 and rust-lang/rust#57108.
2020-01-02 14:10:09 +01:00
Guillaume Ayoub
5f7a104c62 Ignore margins on flex containers
Fix #831.
2019-09-13 14:25:03 +02:00
Guillaume Ayoub
51558a873a Fix skip stack with reversed children
Fix #896.
2019-09-13 14:05:05 +02:00
Guillaume Ayoub
359536e6e3 Merge branch 'master' into perf 2019-08-14 18:34:51 +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
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
5e0f6d494f Actually use the content box to resolve flex items percentages
Fix #885.
2019-06-22 21:37:27 +02:00
Guillaume Ayoub
a23d4658fc Set marker layout only when needed 2019-05-31 06:36:41 +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
e487a985b1 Don't crash when flex items are replaced boxes 2019-03-22 16:15:50 +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
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
0cc5478252 Fix imports for isort 2019-03-01 11:38:03 +01:00
Guillaume Ayoub
43800519e7 Take care of original skip_stack in flex layout's resume_at 2018-10-16 11:23:49 +02:00
Guillaume Ayoub
8561930368 Use real children indexes in flex layout's resume_at 2018-10-16 11:13:59 +02:00
Guillaume Ayoub
f19e030760 Ignore non-flex children when setting height in flex column layout 2018-10-10 13:09:57 +02:00
Guillaume Ayoub
56904baa79 Use the same copyright line everywhere 2018-09-20 18:46:27 +02:00
Guillaume Ayoub
01b09c6136 Fix crashes in flex layout 2018-08-30 18:57:04 +02:00
Guillaume Ayoub
0297600c47 Always resolve auto width for flex boxes 2018-08-24 08:47:48 +02:00
Guillaume Ayoub
6f4bb9aa2a Handle stretch + space-evenly for justify-content and align-content
Fix #673.
2018-08-22 14:10:54 +02:00
Guillaume Ayoub
64a6bf72c8 Use layout switch instead of block box to layout flex items 2018-08-22 13:42:03 +02:00
Guillaume Ayoub
674126f7d1 Keep the flex box size set by parent if possible 2018-08-22 13:41:40 +02:00
Guillaume Ayoub
7ab39313f5 Don't change flex box size when finding its children height 2018-08-22 13:17:52 +02:00
Guillaume Ayoub
4667a6b159 Handle adjoining margins in flex layout
Top border is handled by collapsing_with_children set to False when the box is
a flex item. Bottom border is handled at the end of the flex item layout, by
adding the collapsed adjoining margins to the child's bottom border.

Fix #673.
2018-08-21 21:45:56 +02:00
Guillaume Ayoub
0db7334472 Don't set a max y size when finding the flex child height 2018-08-17 18:37:32 +02:00
Guillaume Ayoub
a83ba5a0a0 Fix flex line height
Fix #667.
2018-08-17 15:56:50 +02:00
Guillaume Ayoub
eec5167bc5 Add comment for flex layout 2018-08-17 15:56:41 +02:00
Guillaume Ayoub
5e2678d826 Use skip_stack[1] only for the first child 2018-07-19 13:56:43 +02:00
Guillaume Ayoub
5350fd5414 Take care of box-sizing when calculating flex item margins 2018-07-19 11:22:30 +02:00
Guillaume Ayoub
07bd39e85a Fix a crash with flex items breaks
Related to #583.
2018-03-22 01:13:44 +01:00
Guillaume Ayoub
5cb850d7f8 Break inside flex items with column direction
Related to #583.
2018-03-22 01:10:37 +01:00
Guillaume Ayoub
99f2c05f82 Handle mix-width and min-height: auto 2018-03-06 01:00:45 +01:00
Guillaume Ayoub
f98e0ec7ce Remove useless condition 2018-03-03 23:31:40 +01:00
Guillaume Ayoub
b3864e53bb Fix flex step 6 comments 2018-03-03 22:52:07 +01:00
Guillaume Ayoub
7a64deb7e4 Handle min/max height for single-line containers 2018-03-03 19:06:50 +01:00
Guillaume Ayoub
2540f27c21 Allow growing flex items when scaled_flex_shrink_factors_sum is 0 2018-03-03 17:46:40 +01:00
Guillaume Ayoub
687e2d2074 Fix the flex grow factor 2018-03-03 17:42:39 +01:00
Guillaume Ayoub
f3cf583b23 Use box.width and box.height instead of style for flex boxes 2018-03-02 01:30:09 +01:00
Guillaume Ayoub
323b174755 Create formatting contexts for flex layout 2018-03-02 00:27:53 +01:00
Guillaume Ayoub
7e7a0690ed Fix extra available size used for cross margins 2018-03-01 02:54:44 +01:00
Guillaume Ayoub
19546c8778 Handle inline-flex and its baseline 2018-02-25 18:05:04 +01:00
Guillaume Ayoub
b71bfca8f3 Handle column layout in block_box_layout
This change gives flex_layout a chance to use block_box_layout, that can handle
more cases (including columns) than block_container_layout witout resetting
size set by flex layout.
2018-02-25 16:14:13 +01:00
Guillaume Ayoub
df1fa7b0c7 Clean skip_stack when it's been used 2018-02-25 02:31:16 +01:00
Guillaume Ayoub
595001bd10 Fix some comments 2018-02-25 01:58:15 +01:00
Guillaume Ayoub
a464a82e61 Use outer size for flex_basis 2018-02-25 01:29:23 +01:00
Guillaume Ayoub
e888f0c56a Remove borders, margins and padding from target main size 2018-02-24 23:48:51 +01:00
Guillaume Ayoub
9d38065db7 Use block_container_layout for final flex items layout
block_level_layout is not needed as width and height have already been fixed
during flex layout.
2018-02-24 22:40:26 +01:00
Guillaume Ayoub
19365e824e Fix all crashes with W3C test suite 2018-02-24 04:41:11 +01:00