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

230 Commits

Author SHA1 Message Date
Guillaume Ayoub
6e114af5af Fix horizontal negative margins for floats 2013-02-25 14:57:50 +01:00
Simon Sapin
829c758788 Keep currentColor as a computed value, resolve in used value
According to the css3-color errata:
http://www.w3.org/Style/2011/REC-css3-color-20110607-errata.html
2013-01-23 16:52:47 +01:00
Guillaume Ayoub
94c719b4ea Fix some trailing spaces 2012-12-28 17:45:23 +01:00
Guillaume Ayoub
1eb22ed63b Remove spaces at the end of the text lines 2012-11-22 23:52:50 +01:00
Guillaume Ayoub
d2dea8ed56 Fix the size of the first line 2012-11-22 21:23:42 +01:00
Guillaume Ayoub
8c6f6a8189 Remove the width of space-character containers when line breaks are not preserved 2012-11-22 21:23:04 +01:00
Simon Sapin
a7131bd10f Remove unused imports 2012-10-05 22:12:19 +02:00
Simon Sapin
d17ee64fa1 Do not repeat a block’s margin-top after a break. 2012-10-02 15:59:58 +02:00
Simon Sapin
b17e807af1 Bug fix: inline-block with vertical-align 2012-10-01 19:30:25 +02:00
Simon Sapin
a564473882 Avoid re-using Pattern objects for images. 2012-09-26 16:59:40 +02:00
Simon Sapin
c7422f721d Typo fix, thanks @jdahlin 2012-09-16 11:25:02 +03:00
Simon Sapin
0ff73c49bc Cache intermediate results for intrinsic widths on tables.
This fixes huges performance problems when a large table is split
across many pages.
2012-09-13 11:46:13 +02:00
Simon Sapin
9834ccb7e6 Handle all of backgrounds at the end of layout. 2012-09-13 11:19:40 +02:00
Simon Sapin
ae26c87bfd Handle background images at the end of layout 2012-09-13 10:41:22 +02:00
Simon Sapin
463a33c1af Fetch background images early
This removes the need to have a reference to the image cache
in draw.py
2012-09-12 18:36:00 +02:00
Guillaume Ayoub
50210b266f Add support for @page:blank pseudo-class 2012-08-24 00:05:28 +02:00
Simon Sapin
d1971b6e63 Remove unused imports. 2012-08-03 13:32:42 +02:00
Simon Sapin
4abf401f9e Simplify Document and remove magic properties. 2012-08-03 13:00:14 +02:00
Simon Sapin
d401e7241b Kill Document in layout/*.py 2012-07-12 17:13:21 +02:00
Simon Sapin
cca18bdfe9 Kill Document in pdf.py and text.py 2012-07-12 16:14:35 +02:00
Simon Sapin
30a5708373 Kill Document in formatting_structure/build.py and html.py 2012-07-12 15:54:22 +02:00
Simon Sapin
0d3d1f1fd5 Collapsed borders intersections should be rectangles, not squares. 2012-07-12 11:10:18 +02:00
Simon Sapin
e955781b91 Fix border-collapse on multiple pages 2012-07-11 19:23:41 +02:00
Simon Sapin
34fc003c57 Paint collapsed table borders 2012-07-11 18:21:20 +02:00
Simon Sapin
002ed3a99e Ignore border-spacing when border-collapse is 'collapse'
Also remove TODOs in preferred.py:
'when border-collapse: collapse; set outer=False'

build.py sets transparent borders half as wide as the
collapsed border on each cell, so the layout should
just work unchanged.
2012-07-11 15:43:18 +02:00
Simon Sapin
925669d37c Fix floats across pages. 2012-07-06 18:35:23 +02:00
Simon Sapin
22cb02c01a Update page sizing to the current ED
Namely:

* The size sets the page’s containing block
* 'auto' margins are now supported
* The width, min-width, max-width, height, min-height
  and max-height properties are now supported.
2012-07-03 14:54:15 +02:00
Simon Sapin
fb3777b317 Get rid of page.outer_width and outer_height
.margin_width() and .margin_height() can be used instead.
2012-07-03 14:07:39 +02:00
Simon Sapin
b89926284a Fix the Variable Dimension rules, add tests.
This implements the updated algorithm described in
https://github.com/SimonSapin/css/blob/81b5d93d0d/margin-boxes-variable-dimension
2012-07-02 18:15:57 +02:00
Simon Sapin
e28fdb557b Implement a simpler version of Variable Dimension for margin boxes.
https://github.com/SimonSapin/css/blob/8c17fbe/margin-boxes-variable-dimension
2012-07-02 11:07:44 +02:00
Simon Sapin
13184721be Non-auto width is not enough anymore for a page-margin box
The latest ED makes no mention of non-auto widths for
generating page-margin boxes. Only 'content: none' matters:

http://dev.w3.org/csswg/css3-page/#populating-margin-boxes
2012-07-02 11:07:44 +02:00
Simon Sapin
694863ed62 Fix crashes.
* Some fixed boxes did not have any layout
* Validator for the 'float' property masked the builtin,
  float('inf') returned None.
2012-06-29 17:13:10 +02:00
Simon Sapin
6d5e473993 Fix inline floated images. 2012-06-28 19:07:26 +02:00
Simon Sapin
c36d6b6b29 Intrinsic widths: account for floats in inline contexts 2012-06-28 18:46:54 +02:00
Simon Sapin
f808cacd09 Fix waiting_floats with spans 2012-06-28 14:00:27 +02:00
Simon Sapin
c6a9c9a151 Fix a shrink_to_fit call: CB width instead of the CB box 2012-06-28 12:00:15 +02:00
Guillaume Ayoub
01c451b542 Don't collapse margins in table wrappers, remove a double translation
With this version, a lot of tests are OK. The main missing feature is the
unsupported margin collapsing through nested boxes. Once this is fixed, the
branch can be considered as stable.
2012-06-28 04:14:06 +02:00
Guillaume Ayoub
5e270133c8 Use the border height instead of the margin height to find floats with no height
Fixes Acid2
2012-06-28 01:42:28 +02:00
Guillaume Ayoub
228f1e3d77 Fix most of the tests (but not Acid2) 2012-06-28 00:51:24 +02:00
Guillaume Ayoub
9afa96e987 Put floats in the next line when they don't fit on current line 2012-06-25 23:48:21 +02:00
Guillaume Ayoub
762a8db2be Don't detect collisions with 0-height boxes only for float boxes 2012-06-25 23:47:07 +02:00
Guillaume Ayoub
2f68f0f519 Again! 2012-06-25 21:37:15 +02:00
Guillaume Ayoub
b26d35cd96 Don't resolve percentages on tables 2012-06-25 21:35:45 +02:00
Guillaume Ayoub
4c824f7374 Don't create new lines for floats with height = 0 2012-06-25 21:10:00 +02:00
Guillaume Ayoub
6bccfe7514 Fix a lot of things about floats 2012-06-25 19:48:22 +02:00
Guillaume Ayoub
8c4cf4118d Remove print 2012-06-25 12:51:13 +02:00
Guillaume Ayoub
683afe9f3a Fix tests 2012-06-25 12:47:15 +02:00
Guillaume Ayoub
3b740f32a6 Fix stupid bug 2012-06-25 10:21:42 +02:00
Guillaume Ayoub
b61f57b97c Avoid collision of replaced blocks and tables with floats 2012-06-25 10:17:39 +02:00
Guillaume Ayoub
b67bebfb92 Fix the position of line children next to float boxes 2012-06-24 00:03:45 +02:00