mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #5552 - pcwalton:block-formatting-context-cleared-floats, r=glennw
The speculated inline-size of the preceding floats was forced to zero at the wrong time if the float was itself cleared, causing it to overwrite the speculated value. Shuffling the code around a bit fixes the problem. r? @glennw
This commit is contained in:
commit
07520de970
4 changed files with 67 additions and 10 deletions
|
@ -50,6 +50,7 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
== background_style_attr.html background_ref.html
|
||||
== basic_width_px.html basic_width_em.html
|
||||
== block_formatting_context_a.html block_formatting_context_ref.html
|
||||
== block_formatting_context_cleared_float_a.html block_formatting_context_cleared_float_ref.html
|
||||
== block_formatting_context_complex_a.html block_formatting_context_complex_ref.html
|
||||
== block_formatting_context_containing_floats_a.html block_formatting_context_containing_floats_ref.html
|
||||
== block_formatting_context_relative_a.html block_formatting_context_ref.html
|
||||
|
|
28
tests/ref/block_formatting_context_cleared_float_a.html
Normal file
28
tests/ref/block_formatting_context_cleared_float_a.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
Tests that block formatting context inline-size speculation works when the floats that impact
|
||||
the block formatting context are cleared.
|
||||
-->
|
||||
<style>
|
||||
#a {
|
||||
background: silver;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
#b {
|
||||
background: goldenrod;
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id=a></div>
|
||||
<div id=b></div>
|
||||
</body>
|
||||
</html>
|
||||
|
27
tests/ref/block_formatting_context_cleared_float_ref.html
Normal file
27
tests/ref/block_formatting_context_cleared_float_ref.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
Tests that block formatting context inline-size speculation works when the floats that impact
|
||||
the block formatting context are cleared.
|
||||
-->
|
||||
<style>
|
||||
#a {
|
||||
background: silver;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
float: right;
|
||||
}
|
||||
#b {
|
||||
background: goldenrod;
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id=a></div>
|
||||
<div id=b></div>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue