Make incremental frame construction set mFixedPosIsAbsPos just like from-the-top frame construction. (Bug 467460) r+sr=roc

This commit is contained in:
L. David Baron 2008-12-04 08:09:53 -08:00
parent 399b58f316
commit 5ef811c47a
4 changed files with 43 additions and 2 deletions

View File

@ -1242,7 +1242,10 @@ nsFrameConstructorState::nsFrameConstructorState(nsIPresShell* aPresShe
mFloatedItems(aFloatContainingBlock),
mFirstLetterStyle(PR_FALSE),
mFirstLineStyle(PR_FALSE),
mFixedPosIsAbsPos(PR_FALSE),
// See PushAbsoluteContaningBlock below
mFixedPosIsAbsPos(aAbsoluteContainingBlock &&
aAbsoluteContainingBlock->GetStyleDisplay()->
HasTransform()),
mFrameState(aHistoryState),
mPseudoFrames(),
mAdditionalStateBits(0)
@ -1266,7 +1269,10 @@ nsFrameConstructorState::nsFrameConstructorState(nsIPresShell* aPresShell,
mFloatedItems(aFloatContainingBlock),
mFirstLetterStyle(PR_FALSE),
mFirstLineStyle(PR_FALSE),
mFixedPosIsAbsPos(PR_FALSE),
// See PushAbsoluteContaningBlock below
mFixedPosIsAbsPos(aAbsoluteContainingBlock &&
aAbsoluteContainingBlock->GetStyleDisplay()->
HasTransform()),
mPseudoFrames(),
mAdditionalStateBits(0)
{

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="-moz-transform: translate(50px, 50px); border: 1px solid red; width: 7ch;">
A
<div id="f" style="left: 50px; top: 100px; border: 1px solid blue; width: 7ch; position: fixed;">
0
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function m()
{
document.getElementById("f").style.position = "fixed";
}
</script>
</head>
<body onload="m();">
<div style="-moz-transform: translate(50px, 50px); border: 1px solid red; width: 7ch;">
A
<div id="f" style="left: 50px; top: 100px; border: 1px solid blue; width: 7ch;">
0
</div>
</div>
</body>
</html>

View File

@ -984,3 +984,4 @@ fails == 461512-1.html 461512-1-ref.html # Bug 461512
== 466395-2.html 466395-2-ref.html
== 467084-1.html 467084-1-ref.html
== 467084-2.html 467084-2-ref.html
== 467460-1.html 467460-1-ref.html