parent
981045d661
commit
19342fb93f
|
@ -83,6 +83,7 @@ class Box(object):
|
|||
# Default, may be overriden on instances.
|
||||
is_table_wrapper = False
|
||||
is_for_root_element = False
|
||||
is_column = False
|
||||
transformation_matrix = None
|
||||
bookmark_label = None
|
||||
string_set = None
|
||||
|
|
|
@ -173,6 +173,7 @@ def columns_layout(context, box, max_position_y, skip_stack, containing_block,
|
|||
column_box = box.anonymous_from(box, children=[
|
||||
child.copy() for child in box.children])
|
||||
resolve_percentages(column_box, containing_block)
|
||||
column_box.is_column = True
|
||||
column_box.width = width
|
||||
column_box.position_x = box.content_box_x()
|
||||
column_box.position_y = box.content_box_y()
|
||||
|
@ -347,7 +348,7 @@ def block_level_width(box, containing_block):
|
|||
margin_r = box.margin_right = 0
|
||||
if width != 'auto' and margin_l != 'auto' and margin_r != 'auto':
|
||||
# The equation is over-constrained.
|
||||
if containing_block.style.direction == 'rtl':
|
||||
if containing_block.style['direction'] == 'rtl' and not box.is_column:
|
||||
box.position_x += (
|
||||
cb_width - paddings_plus_borders - width - margin_r - margin_l)
|
||||
# Do nothing in ltr.
|
||||
|
|
Loading…
Reference in New Issue