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

Fix Acid2 test

This commit is contained in:
Guillaume Ayoub 2016-06-25 01:35:23 +02:00
parent 570034a7db
commit 52d5c9a225
2 changed files with 6 additions and 2 deletions

View File

@ -34,13 +34,14 @@ def float_layout(context, box, containing_block, device_size, absolute_boxes,
from .inlines import inline_replaced_box_width_height
cb_width, cb_height = (containing_block.width, containing_block.height)
resolve_percentages(box, (cb_width, cb_height))
# TODO: This is only handled later in blocks.block_container_layout
# http://www.w3.org/TR/CSS21/visudet.html#normal-block
if cb_height == 'auto':
cb_height = (
containing_block.position_y - containing_block.content_box_y())
resolve_percentages(box, (cb_width, cb_height))
resolve_position_percentages(box, (cb_width, cb_height))
if box.margin_left == 'auto':

View File

@ -4927,7 +4927,10 @@ def test_floats():
div, anon_block = body.children
line, = anon_block.children
img_2, = line.children
assert outer_area(img_2) == (0, 0, 50, 50)
# Regression test
# https://github.com/Kozea/WeasyPrint/issues/263
page, = parse('''<div style="top:100%; float:left">''')
@assert_no_logs