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:
parent
570034a7db
commit
52d5c9a225
@ -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':
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user