зеркало из https://github.com/mozilla/pjs.git
The parent style context frame determination for an inner table should use theinner table's pseudo, not the outer table's. Bug 377603, r+sr=dbaron
This commit is contained in:
Родитель
8ec738ec02
Коммит
77503b26f8
|
@ -5463,10 +5463,15 @@ GetCorrectedParent(nsPresContext* aPresContext, nsIFrame* aFrame,
|
|||
if (!parent) {
|
||||
*aSpecialParent = nsnull;
|
||||
} else {
|
||||
*aSpecialParent =
|
||||
nsFrame::CorrectStyleParentFrame(parent,
|
||||
aFrame->GetStyleContext()->
|
||||
GetPseudoType());
|
||||
nsIAtom* pseudo = aFrame->GetStyleContext()->GetPseudoType();
|
||||
// Outer tables are always anon boxes; if we're in here for an outer
|
||||
// table, that actually means its the _inner_ table that wants to
|
||||
// know its parent. So get the pseudo of the inner in that case.
|
||||
if (pseudo == nsCSSAnonBoxes::tableOuter) {
|
||||
pseudo =
|
||||
aFrame->GetFirstChild(nsnull)->GetStyleContext()->GetPseudoType();
|
||||
}
|
||||
*aSpecialParent = nsFrame::CorrectStyleParentFrame(parent, pseudo);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<style>
|
||||
table table
|
||||
{ border-collapse: collapse; border-style: solid; border-width: 10px;
|
||||
border-color: green }
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<table><tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr></table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<style>
|
||||
table table
|
||||
{ border-collapse: collapse; border-style: solid; border-width: 10px }
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body>
|
||||
<table><tr>
|
||||
<td style="border: 0px solid green; color: red">
|
||||
<table style="border-color: inherit">
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
<table id="test">
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
<script>
|
||||
document.body.offsetWidth;
|
||||
document.getElementById("test").style.borderColor = "inherit";
|
||||
</script>
|
||||
</td>
|
||||
</tr></table>
|
||||
</body>
|
||||
</html>
|
|
@ -216,3 +216,4 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 372037-1.html 372037-1-ref.html # bug 3
|
|||
== 374038-2.xul 374038-2-ref.xul
|
||||
== 374193-1.xhtml about:blank
|
||||
fails == 376484-1.html 376484-1-ref.html
|
||||
== 377603-1.html 377603-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче