Bug 1076783. Move scroll info layers to the bottom of the background layer so they are behind most things. r=roc

Bug 1041510 moved them to the top so merging and flattening with scroll layer items worked correctly, but we don't need scroll layer items anymore.
This commit is contained in:
Timothy Nikkel 2014-10-20 20:20:16 -05:00
Родитель d103771dfd
Коммит 48cd9f6fc0
1 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -2996,12 +2996,18 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// metadata about this scroll box to the compositor process.
nsDisplayScrollInfoLayer* layerItem = new (aBuilder) nsDisplayScrollInfoLayer(
aBuilder, mScrolledFrame, mOuter);
nsDisplayList* positionedDescendants = scrolledContent.PositionedDescendants();
if (!positionedDescendants->IsEmpty()) {
layerItem->SetOverrideZIndex(MaxZIndexInList(positionedDescendants, aBuilder));
positionedDescendants->AppendNewToTop(layerItem);
if (BuildScrollContainerLayers()) {
// We process display items from bottom to top, so if we need to flatten after
// the scroll layer items have been processed we need to be on the top.
nsDisplayList* positionedDescendants = scrolledContent.PositionedDescendants();
if (!positionedDescendants->IsEmpty()) {
layerItem->SetOverrideZIndex(MaxZIndexInList(positionedDescendants, aBuilder));
positionedDescendants->AppendNewToTop(layerItem);
} else {
aLists.Outlines()->AppendNewToTop(layerItem);
}
} else {
aLists.Outlines()->AppendNewToTop(layerItem);
scrolledContent.BorderBackground()->AppendNewToBottom(layerItem);
}
}
// Now display overlay scrollbars and the resizer, if we have one.