зеркало из https://github.com/mozilla/pjs.git
Bug 480053 - Fix z-ordering of scrollbars to match Webkit/IE8. r+sr=dbaron
This commit is contained in:
Родитель
92288243f1
Коммит
73bc869572
|
@ -1323,6 +1323,19 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
return mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, newDirty, aLists);
|
return mOuter->BuildDisplayListForChild(aBuilder, mScrolledFrame, newDirty, aLists);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now display the scrollbars and scrollcorner. These parts are drawn
|
||||||
|
// in the border-background layer, on top of our own background and
|
||||||
|
// borders and underneath borders and backgrounds of later elements
|
||||||
|
// in the tree.
|
||||||
|
nsIFrame* kid = mOuter->GetFirstChild(nsnull);
|
||||||
|
while (kid) {
|
||||||
|
if (kid != mScrolledFrame) {
|
||||||
|
rv = mOuter->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
}
|
||||||
|
kid = kid->GetNextSibling();
|
||||||
|
}
|
||||||
|
|
||||||
// Overflow clipping can never clip frames outside our subtree, so there
|
// Overflow clipping can never clip frames outside our subtree, so there
|
||||||
// is no need to worry about whether we are a moving frame that might clip
|
// is no need to worry about whether we are a moving frame that might clip
|
||||||
// non-moving frames.
|
// non-moving frames.
|
||||||
|
@ -1347,18 +1360,6 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
rv = mOuter->OverflowClip(aBuilder, set, aLists, clip, PR_TRUE, mIsRoot);
|
rv = mOuter->OverflowClip(aBuilder, set, aLists, clip, PR_TRUE, mIsRoot);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
// Now display the scrollbars and scrollcorner
|
|
||||||
nsIFrame* kid = mOuter->GetFirstChild(nsnull);
|
|
||||||
// Put each child's background directly onto the content list
|
|
||||||
nsDisplayListSet scrollbarSet(aLists, aLists.Content());
|
|
||||||
while (kid) {
|
|
||||||
if (kid != mScrolledFrame) {
|
|
||||||
rv = mOuter->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, scrollbarSet,
|
|
||||||
nsIFrame::DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
}
|
|
||||||
kid = kid->GetNextSibling();
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<div style="overflow:scroll; width:300px; height:100px; background-color:lime;"></div>
|
||||||
|
<div style="background-color:yellow; width:300px; height:100px; margin-top:-50px; position:relative; z-index:1;"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,7 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<div style="overflow:scroll; width:300px; height:100px; background-color:lime;"></div>
|
||||||
|
<div style="background-color:yellow; width:300px; height:100px; margin-top:-50px"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1 +1,2 @@
|
||||||
|
== 480053-1.html 480053-1-ref.html
|
||||||
== z-index-1.html z-index-1-ref.html
|
== z-index-1.html z-index-1-ref.html
|
||||||
|
|
Загрузка…
Ссылка в новой задаче