Bug 1176395 - When an element is both position:sticky and transformed, apply the position:sticky outside the transform. r=roc

Conceptually, the transformed content is position:sticky. position:fixed
behaves similarly.
This commit is contained in:
Botond Ballo 2015-12-09 15:24:39 -05:00
parent 9813077811
commit c428b2bdaf

View File

@ -2180,12 +2180,6 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
resultList.AppendNewToTop(
new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList, opacityItemForEventsOnly));
}
/* If we have sticky positioning, wrap it in a sticky position item.
*/
if (useStickyPosition) {
resultList.AppendNewToTop(
new (aBuilder) nsDisplayStickyPosition(aBuilder, this, &resultList));
}
/* If we're going to apply a transformation and don't have preserve-3d set, wrap
* everything in an nsDisplayTransform. If there's nothing in the list, don't add
@ -2257,6 +2251,13 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
}
/* If we have sticky positioning, wrap it in a sticky position item.
*/
if (useStickyPosition) {
resultList.AppendNewToTop(
new (aBuilder) nsDisplayStickyPosition(aBuilder, this, &resultList));
}
/* If we're doing VR rendering, then we need to wrap everything in a nsDisplayVR
*/
if (vrHMDInfo && !resultList.IsEmpty()) {