Bug 852489. Part 4: Don't call RepositionChild if the layer is already in the right position. r=mattwoodrow

--HG--
extra : rebase_source : 1a3be842c65ab00dc7a72361e522e5343e5de967
This commit is contained in:
Robert O'Callahan 2013-03-22 15:17:29 +13:00
parent 447d9965d6
commit 361f43cd8a

View File

@ -2663,7 +2663,9 @@ ContainerState::Finish(uint32_t* aTextContentFlags, LayerManagerData* aData)
NS_ASSERTION(layer->GetParent() == mContainerLayer,
"Layer shouldn't be the child of some other container");
mContainerLayer->RepositionChild(layer, prevChild);
if (layer->GetPrevSibling() != prevChild) {
mContainerLayer->RepositionChild(layer, prevChild);
}
}
// Remove old layers that have become unused.