Skip to content

Commit

Permalink
Merge pull request #68 from jonboland/min-max-height
Browse files Browse the repository at this point in the history
Fixed min_height_003 and 25 other tests.
  • Loading branch information
freakboy3742 authored Apr 20, 2020
2 parents 3afd0f4 + 4f0a04b commit abebfff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
10 changes: 9 additions & 1 deletion colosseum/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,17 @@ def calculate_block_non_replaced_normal_flow_height(node, context):
# elif node.children and node.children[-1] top margin non collapsing with bottom margin:
# content_height = bottom border edge of bottom margin
else:
content_height = 0
if node.style.min_height is not AUTO: # 10.4 Minimum height
content_height = node.style.min_height.px(**context)
else:
content_height = 0

else:
content_height = node.style.height.px(**context)
if node.style.max_height is not None: # 10.4 Maximum height
content_max_height = node.style.max_height.px(**context)
if content_height > content_max_height:
content_height = content_max_height

node.layout.content_height = content_height
node.layout.content_top += node.layout.border_top_width + node.layout.padding_top
Expand Down
26 changes: 0 additions & 26 deletions tests/web_platform/CSS2/normal_flow/not_implemented
Original file line number Diff line number Diff line change
Expand Up @@ -298,40 +298,20 @@ inlines_013
inlines_016
inlines_017
inlines_020
max_height_002
max_height_003
max_height_004
max_height_005
max_height_006
max_height_007
max_height_013
max_height_014
max_height_015
max_height_016
max_height_017
max_height_018
max_height_024
max_height_025
max_height_026
max_height_027
max_height_028
max_height_029
max_height_035
max_height_036
max_height_037
max_height_038
max_height_039
max_height_040
max_height_046
max_height_047
max_height_048
max_height_049
max_height_050
max_height_051
max_height_057
max_height_058
max_height_059
max_height_060
max_height_061
max_height_062
max_height_068
Expand All @@ -349,8 +329,6 @@ max_height_084
max_height_091
max_height_094
max_height_095
max_height_100
max_height_102
max_height_104
max_height_105
max_height_106
Expand All @@ -367,7 +345,6 @@ max_height_applies_to_005
max_height_applies_to_006
max_height_applies_to_007
max_height_applies_to_008
max_height_applies_to_009
max_height_applies_to_010
max_height_applies_to_012
max_height_applies_to_013
Expand Down Expand Up @@ -419,10 +396,8 @@ max_width_applies_to_015
max_width_applies_to_016
max_width_percentage_002
max_width_percentage_003
min_height_003
min_height_006
min_height_007
min_height_014
min_height_017
min_height_018
min_height_025
Expand Down Expand Up @@ -460,7 +435,6 @@ min_height_applies_to_005
min_height_applies_to_006
min_height_applies_to_007
min_height_applies_to_008
min_height_applies_to_009
min_height_applies_to_010
min_height_applies_to_012
min_height_applies_to_013
Expand Down

0 comments on commit abebfff

Please sign in to comment.