Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #10279 - notriddle:issue_10258, r=mbrubeck
Fix #10258 Respect border-box when computing the relative sizes of children. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10279) <!-- Reviewable:end -->
- Loading branch information
Showing
4 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<!-- saved from url=(0042)http://testujem.eu/servo/circle-image.html --> | ||
<html> | ||
<head> | ||
<link rel='match' href='image_percentage_dimen_ref.html'> | ||
<style type="text/css"> | ||
.image { | ||
border:15px solid red; | ||
padding:28px; | ||
width:230px; | ||
height:230px; | ||
box-sizing:border-box; | ||
-moz-box-sizing:border-box; | ||
float:left; | ||
margin-right:8% | ||
} | ||
.image .img { | ||
background-size:cover; | ||
background-position:center center; | ||
width:100%; | ||
height:100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="image"> | ||
<div class="img" style="background-image: url(test.jpeg);"></div> | ||
</div> | ||
</body> | ||
</html> |
29 changes: 29 additions & 0 deletions
29
tests/wpt/mozilla/tests/css/image_percentage_dimen_ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<!-- saved from url=(0042)http://testujem.eu/servo/circle-image.html --> | ||
<html> | ||
<head> | ||
<style type="text/css"> | ||
.image { | ||
border:15px solid red; | ||
padding:28px; | ||
width:230px; | ||
height:230px; | ||
box-sizing:border-box; | ||
-moz-box-sizing:border-box; | ||
float:left; | ||
margin-right:8% | ||
} | ||
.image .img { | ||
background-size:cover; | ||
background-position:center center; | ||
width:144px; | ||
height:144px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="image"> | ||
<div class="img" style="background-image: url(test.jpeg);"></div> | ||
</div> | ||
</body> | ||
</html> |