Bug 470250 - draw middle border image even if the border width is zero on all four sides r+sr=dbaron

This commit is contained in:
Zack Weinberg 2009-02-20 17:13:47 +13:00
parent 1aafbb746e
commit 6cd01999d3
6 changed files with 46 additions and 1 deletions

View File

@ -947,7 +947,10 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
PRBool
nsFrame::HasBorder() const
{
return GetUsedBorder() != nsMargin(0,0,0,0);
// Border images contribute to the background of the content area
// even if there's no border proper.
return (GetUsedBorder() != nsMargin(0,0,0,0) ||
GetStyleBorder()->IsBorderImageLoaded());
}
nsresult

View File

@ -0,0 +1,6 @@
<!doctype html>
<html><head>
<title>border-image, only middle part, reference</title>
</head><body>
<img src="3x3green-1DD813.png" width="48" height="48">
</body></html>

View File

@ -0,0 +1,13 @@
<!doctype html>
<html><head>
<title>border-image, only middle part, testcase</title>
<style>
div {
width: 48px;
height: 48px;
-moz-border-image: url(3x3green-1DD813.png) 0 / 0;
}
</style>
</head><body>
<div></div>
</body></html>

View File

@ -0,0 +1,6 @@
<!doctype html>
<html><head>
<title>border-image, only middle part, table cell, reference</title>
</head><body>
<img src="3x3green-1DD813.png" width="48" height="48">
</body></html>

View File

@ -0,0 +1,15 @@
<!doctype html>
<html><head>
<title>border-image, only middle part, table cell, testcase</title>
<style>
table {
width: 48px;
height: 48px;
border-collapse: separate;
-moz-border-image: url(3x3green-1DD813.png) 0 / 0;
}
</style>
</head><body>
<table>
</table>
</body></html>

View File

@ -8,6 +8,8 @@
== multicolor-image-5.html multicolor-image-5-ref.html
== transparent-image-1.html transparent-image-1-ref.html
!= repeat-image-1.html repeat-image-1-ref.html
== 470250-1.html 470250-1-ref.html
== 470250-2.html 470250-2-ref.html
!= different-h-v-1.html different-h-v-ref.html
!= different-h-v-2.html different-h-v-ref.html
!= different-h-v-1.html different-h-v-2.html