mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Floor to 0 when computing intrinsic sizes for box-sizing:border-box
This commit is contained in:
parent
3011f76139
commit
754d29c899
4 changed files with 62 additions and 1 deletions
|
@ -937,7 +937,7 @@ impl Fragment {
|
|||
}
|
||||
|
||||
if self.style.get_position().box_sizing == box_sizing::T::border_box {
|
||||
specified -= border_padding
|
||||
specified = max(Au(0), specified - border_padding);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3131,6 +3131,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/intrinsic_border_box.html": [
|
||||
[
|
||||
"/_mozilla/css/intrinsic_border_box.html",
|
||||
[
|
||||
[
|
||||
"/_mozilla/css/intrinsic_border_box_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/issue-1324.html": [
|
||||
[
|
||||
"/_mozilla/css/issue-1324.html",
|
||||
|
@ -8073,6 +8085,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/intrinsic_border_box_ref.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/issue-1324-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -22115,6 +22132,14 @@
|
|||
"c78c6c992e47adb47ba00b621210ae8564d46389",
|
||||
"support"
|
||||
],
|
||||
"css/intrinsic_border_box.html": [
|
||||
"261487f82f350ab020f49f362993b26711a89b5b",
|
||||
"reftest"
|
||||
],
|
||||
"css/intrinsic_border_box_ref.html": [
|
||||
"9a8f19331c748658b71c85b823b5b3db68e4b7a4",
|
||||
"support"
|
||||
],
|
||||
"css/issue-1324-ref.html": [
|
||||
"ef2253d5045622f54634dbfa6b6abdef6b6e00a7",
|
||||
"support"
|
||||
|
|
19
tests/wpt/mozilla/tests/css/intrinsic_border_box.html
Normal file
19
tests/wpt/mozilla/tests/css/intrinsic_border_box.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<link rel="match" href="intrinsic_border_box_ref.html">
|
||||
<style>
|
||||
.outer {
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
padding: 0 50px;
|
||||
}
|
||||
.inner {
|
||||
float: left;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
background: orange;
|
||||
}
|
||||
</style>
|
||||
<div class="outer"><div class="inner"></div></div>
|
||||
<div class="outer"><div class="inner"></div></div>
|
17
tests/wpt/mozilla/tests/css/intrinsic_border_box_ref.html
Normal file
17
tests/wpt/mozilla/tests/css/intrinsic_border_box_ref.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<style>
|
||||
.outer {
|
||||
float: left;
|
||||
padding: 0 50px;
|
||||
}
|
||||
.inner {
|
||||
float: left;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
background: orange;
|
||||
}
|
||||
</style>
|
||||
<div class="outer"><div class="inner"></div></div>
|
||||
<div class="outer"><div class="inner"></div></div>
|
Loading…
Add table
Add a link
Reference in a new issue