зеркало из https://github.com/mozilla/pjs.git
Bug 572612. Make scrollbars appear in the background/border layer of the scrollable element. r=mats
This commit is contained in:
Родитель
dc7b1e4620
Коммит
0318ce4702
|
@ -1844,16 +1844,21 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// borders and underneath borders and backgrounds of later elements
|
||||
// in the tree.
|
||||
PRBool hasResizer = HasResizer();
|
||||
nsDisplayListCollection scrollParts;
|
||||
for (nsIFrame* kid = mOuter->GetFirstChild(nsnull); kid; kid = kid->GetNextSibling()) {
|
||||
if (kid != mScrolledFrame) {
|
||||
if (kid == mScrollCornerBox && hasResizer) {
|
||||
// skip the resizer as this will be drawn later on top of the scrolled content
|
||||
continue;
|
||||
}
|
||||
rv = mOuter->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
|
||||
rv = mOuter->BuildDisplayListForChild(aBuilder, kid, aDirtyRect, scrollParts,
|
||||
nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
}
|
||||
// DISPLAY_CHILD_FORCE_STACKING_CONTEXT puts everything into the
|
||||
// PositionedDescendants list.
|
||||
aLists.BorderBackground()->AppendToTop(scrollParts.PositionedDescendants());
|
||||
|
||||
// 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
|
||||
|
@ -1878,13 +1883,17 @@ nsGfxScrollFrameInner::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
rv = mOuter->OverflowClip(aBuilder, set, aLists, clip, PR_TRUE, mIsRoot);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Place the resizer in the display list above the overflow clip. This
|
||||
// ensures that the resizer appears above the content and the mouse can
|
||||
// Place the resizer in the display list in our Content() list above
|
||||
// scrolled content in the Content() list.
|
||||
// This ensures that the resizer appears above the content and the mouse can
|
||||
// still target the resizer even when scrollbars are hidden.
|
||||
if (hasResizer && mScrollCornerBox) {
|
||||
rv = mOuter->BuildDisplayListForChild(aBuilder, mScrollCornerBox, aDirtyRect, aLists,
|
||||
nsIFrame::DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT);
|
||||
rv = mOuter->BuildDisplayListForChild(aBuilder, mScrollCornerBox, aDirtyRect, scrollParts,
|
||||
nsIFrame::DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// DISPLAY_CHILD_FORCE_STACKING_CONTEXT puts everything into the
|
||||
// PositionedDescendants list.
|
||||
aLists.Content()->AppendToTop(scrollParts.PositionedDescendants());
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче