Bug 536061 - Broken rendering of box-shadow and outline when used with -moz-transform. r=roc a=blocking2.0:final

This commit is contained in:
Mats Palmgren 2010-11-17 03:20:25 +01:00
parent 97b3a92212
commit 7ad2707943
4 changed files with 110 additions and 2 deletions

View File

@ -1030,7 +1030,7 @@ nsDisplayBackground::GetBounds(nsDisplayListBuilder* aBuilder) {
nsRect
nsDisplayOutline::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetVisualOverflowRect() + ToReferenceFrame();
return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame();
}
void
@ -1172,7 +1172,7 @@ nsDisplayBoxShadowOuter::Paint(nsDisplayListBuilder* aBuilder,
nsRect
nsDisplayBoxShadowOuter::GetBounds(nsDisplayListBuilder* aBuilder) {
return mFrame->GetVisualOverflowRect() + ToReferenceFrame();
return mFrame->GetVisualOverflowRectRelativeToSelf() + ToReferenceFrame();
}
PRBool

View File

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Bugs with -moz-transform: rotate() and -moz-box-shadow</title>
<style>
body {
overflow: hidden;
}
.label {
position: absolute;
top: 200px;
left: 196px;
margin: 0;
height:16px;
width: 300px;
-moz-box-shadow: 0 0 .7em black;
border: 1px black solid;
}
.vlabel {
position: absolute;
top: 58px;
left: 42px;
margin: 0;
width: 16px;
height: 300px;
-moz-box-shadow: 0 0 .7em black;
border: 1px black solid;
}
</style>
</head>
<body>
<p class="label"></p>
<p class="label" style="top: 400px; -moz-box-shadow:none; outline: 3px dashed blue;"></p>
<p class="vlabel" style="-moz-box-shadow:none; outline: 3px dashed blue;"></p>
<p class="vlabel" style="left:102px; "></p>
<p class="vlabel" style="top:454px; -moz-box-shadow:none; outline: 3px dashed blue; "></p>
<p class="vlabel" style="top:454px; left:102px;"></p>
<!-- cover a few shadow corners which are a bit different -->
<div style="position:absolute; top:40px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
<div style="position:absolute; top:340px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
<div style="position:absolute; top:420px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
<div style="position:absolute; top:730px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
</body>
</html>

View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Bugs with -moz-transform: rotate() and -moz-box-shadow</title>
<style>
body {
overflow: hidden;
}
.label {
position: absolute;
top: 200px;
left: 100px;
margin: 0;
height: 16px;
width: 300px;
-moz-transform: translate(96px);
-moz-box-shadow: 0 0 .7em black;
border: 1px black solid;
}
.vlabel {
position: absolute;
top: 40px;
left: 40px;
margin: 0;
width: 16px;
height: 300px;
-moz-box-shadow: 0 0 .7em black;
border: 1px black solid;
}
</style>
</head>
<body>
<p class="label"></p>
<p class="label" style="top: 400px; -moz-box-shadow:none; outline: 3px dashed blue;"></p>
<p class="label" style="left:-100px; top: 200px; -moz-box-shadow:none; outline: 3px dashed blue; -moz-transform: rotate(90deg);"></p>
<p class="label" style="left:-40px; top: 200px; -moz-transform: rotate(90deg);"></p>
<p class="label" style="left:-100px; top: 200px; -moz-box-shadow:none; outline: 3px dashed blue; -moz-transform: translate(0,396px) rotate(90deg);"></p>
<p class="label" style="left:-40px; top: 200px; -moz-transform: translate(0,396px) rotate(90deg);"></p>
<!-- cover a few shadow corners which are a bit different -->
<div style="position:absolute; top:40px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
<div style="position:absolute; top:340px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
<div style="position:absolute; top:420px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
<div style="position:absolute; top:730px; left:85px; width:50px; height:50px; background:black; z-index:99;"></div>
</body>
</html>

View File

@ -1413,6 +1413,7 @@ asserts(5) == 528038-2.html 528038-2-ref.html # bug 512749
== 534808-1.html 534808-1-ref.html
== 534808-2.html 534808-2-ref.html
== 534919-1.html 534919-1-ref.html
== 536061.html 536061-ref.html
== 537507-1.xul 537507-1-ref.xul
== 537507-2.html 537507-2-ref.html
== 537471-1.html 537471-1-ref.html