mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 480053 - Fix z-ordering of scrollbars to match Webkit/IE8. r+sr=dbaron
This commit is contained in:
parent
3c011596d4
commit
12706db074
@ -1323,6 +1323,19 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
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
|
||||
// is no need to worry about whether we are a moving frame that might clip
|
||||
// non-moving frames.
|
||||
@ -1347,18 +1360,6 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
rv = mOuter->OverflowClip(aBuilder, set, aLists, clip, PR_TRUE, mIsRoot);
|
||||
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;
|
||||
}
|
||||
|
||||
|
7
layout/reftests/z-index/480053-1-ref.html
Normal file
7
layout/reftests/z-index/480053-1-ref.html
Normal file
@ -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>
|
7
layout/reftests/z-index/480053-1.html
Normal file
7
layout/reftests/z-index/480053-1.html
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user