mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
layout: Only take nonnegative margins into account when estimating
inline placement of floats. Otherwise, the heuristics can pass even when there are no floats, causing block formatting contexts to be speculated to be flowing around floats that don't exist! Closes #10237.
This commit is contained in:
parent
db95de6e58
commit
6eb58e2c54
4 changed files with 101 additions and 14 deletions
|
@ -1484,6 +1484,18 @@
|
|||
"url": "/_mozilla/css/float_right_intrinsic_width_a.html"
|
||||
}
|
||||
],
|
||||
"css/float_speculation_negative_inline_margins_a.html": [
|
||||
{
|
||||
"path": "css/float_speculation_negative_inline_margins_a.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/float_speculation_negative_inline_margins_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/float_speculation_negative_inline_margins_a.html"
|
||||
}
|
||||
],
|
||||
"css/float_table_a.html": [
|
||||
{
|
||||
"path": "css/float_table_a.html",
|
||||
|
@ -7822,6 +7834,18 @@
|
|||
"url": "/_mozilla/css/float_right_intrinsic_width_a.html"
|
||||
}
|
||||
],
|
||||
"css/float_speculation_negative_inline_margins_a.html": [
|
||||
{
|
||||
"path": "css/float_speculation_negative_inline_margins_a.html",
|
||||
"references": [
|
||||
[
|
||||
"/_mozilla/css/float_speculation_negative_inline_margins_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/_mozilla/css/float_speculation_negative_inline_margins_a.html"
|
||||
}
|
||||
],
|
||||
"css/float_table_a.html": [
|
||||
{
|
||||
"path": "css/float_table_a.html",
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<link rel="match" href="float_speculation_negative_inline_margins_ref.html">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 0;
|
||||
}
|
||||
.red {
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
width: 480px;
|
||||
margin-left: -240px;
|
||||
background: red;
|
||||
}
|
||||
.green {
|
||||
display: block;
|
||||
width: 410px;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
background: green;
|
||||
border: none
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="red"><input class="green"></div>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 0;
|
||||
}
|
||||
.red {
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
width: 480px;
|
||||
margin-left: -240px;
|
||||
background: red;
|
||||
}
|
||||
.green {
|
||||
display: block;
|
||||
width: 410px;
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
background: green;
|
||||
border: none
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="red"><div class="green"></div>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue