Bug 478811. Use the right IsTableRelated check when finding absolute containing blocks. r=bernd, sr=roc

This commit is contained in:
Boris Zbarsky 2009-02-17 12:21:44 -05:00
Родитель 60ea788249
Коммит ac212c246b
10 изменённых файлов: 121 добавлений и 1 удалений

Просмотреть файл

@ -6994,7 +6994,7 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame)
// positioned child frames.
const nsStyleDisplay* disp = frame->GetStyleDisplay();
if (disp->IsPositioned() && !IsTableRelated(disp->mDisplay)) {
if (disp->IsPositioned() && !IsTableRelated(frame->GetType(), PR_TRUE)) {
// Find the outermost wrapped block under this frame
for (nsIFrame* wrappedFrame = aFrame; wrappedFrame != frame->GetParent();
wrappedFrame = wrappedFrame->GetParent()) {

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html style="height: 100%">
<body style="height: 100%">
<fieldset style="position: relative; display: table; width: 50%;
height: 50%; top: 25%; left: 25%">
<div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
background: green"></div>
</fieldset>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<script>
function doIt() {
var d = document.createElement("div");
d.setAttribute("style",
"position: absolute; left: 0; right: 0; top: 0; " +
"bottom: 0; background: green");
document.getElementById("x").appendChild(d);
}
</script>
</head>
<body style="height: 100%" onload="doIt()">
<fieldset id="x" style="position: relative; display: table; width: 50%;
height: 50%; top: 25%; left: 25%">
</fieldset>
</body>
</html>

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html style="height: 100%">
<body style="height: 100%">
<button style="position: relative; display: table; width: 50%;
height: 50%; top: 25%; left: 25%">
<div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
background: green"></div>
</button>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<script>
function doIt() {
var d = document.createElement("div");
d.setAttribute("style",
"position: absolute; left: 0; right: 0; top: 0; " +
"bottom: 0; background: green");
document.getElementById("x").appendChild(d);
}
</script>
</head>
<body style="height: 100%" onload="doIt()">
<button id="x" style="position: relative; display: table; width: 50%;
height: 50%; top: 25%; left: 25%">
</button>
</body>
</html>

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html style="height: 100%">
<body style="height: 100%">
<button style="position: relative; display: table-cell; width: 50%;
height: 50%; top: 25%; left: 25%">
<div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
background: green"></div>
</button>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<script>
function doIt() {
var d = document.createElement("div");
d.setAttribute("style",
"position: absolute; left: 0; right: 0; top: 0; " +
"bottom: 0; background: green");
document.getElementById("x").appendChild(d);
}
</script>
</head>
<body style="height: 100%" onload="doIt()">
<button id="x" style="position: relative; display: table-cell; width: 50%;
height: 50%; top: 25%; left: 25%">
</button>
</body>
</html>

Просмотреть файл

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html style="height: 100%">
<body style="height: 100%">
<button style="position: relative; display: table-row; width: 50%;
height: 50%; top: 25%; left: 25%">
<div style="position: absolute; left: 0; right: 0; top: 0; bottom: 0;
background: green"></div>
</button>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<script>
function doIt() {
var d = document.createElement("div");
d.setAttribute("style",
"position: absolute; left: 0; right: 0; top: 0; " +
"bottom: 0; background: green");
document.getElementById("x").appendChild(d);
}
</script>
</head>
<body style="height: 100%" onload="doIt()">
<button id="x" style="position: relative; display: table-row; width: 50%;
height: 50%; top: 25%; left: 25%">
</button>
</body>
</html>

Просмотреть файл

@ -1085,3 +1085,7 @@ fails == 461512-1.html 461512-1-ref.html # Bug 461512
== 476598-1b.html 476598-1-ref2.html
!= 476598-1-ref.html about:blank
== 478377-1.xul 478377-1-ref.xul
== 478811-1.html 478811-1-ref.html
== 478811-2.html 478811-2-ref.html
== 478811-3.html 478811-3-ref.html
== 478811-4.html 478811-4-ref.html