Bug 564993. Fix build error, and fix Bas' review comment.

This commit is contained in:
Robert O'Callahan 2010-05-24 14:25:58 +12:00
parent b045d986ea
commit fd35fd2894
2 changed files with 3 additions and 2 deletions

View File

@ -73,8 +73,8 @@ ContainerLayerOGL::InsertAfter(Layer* aChild, Layer* aAfter)
{
LayerOGL *newChild = static_cast<LayerOGL*>(aChild->ImplData());
aChild->SetParent(this);
NS_ADDREF(aChild);
if (!aAfter) {
NS_ADDREF(aChild);
LayerOGL *oldFirstChild = GetFirstChildOGL();
mFirstChild = newChild->GetLayer();
newChild->SetNextSibling(oldFirstChild);
@ -83,6 +83,7 @@ ContainerLayerOGL::InsertAfter(Layer* aChild, Layer* aAfter)
for (LayerOGL *child = GetFirstChildOGL();
child; child = child->GetNextSibling()) {
if (aAfter == child->GetLayer()) {
NS_ADDREF(aChild);
LayerOGL *oldNextSibling = child->GetNextSibling();
child->SetNextSibling(newChild);
child->GetNextSibling()->SetNextSibling(oldNextSibling);

View File

@ -379,7 +379,7 @@ static void BuildLayers(nsDisplayListBuilder* aBuilder,
"initial group is empty");
// This item is above the first Thebes layer.
areaAboveFirstThebesLayer.Or(areaAboveFirstThebesLayer, bounds);
layerItems = &aLayers->ElementAt(aLayers->Length() - 1);
layerItems = aLayers->ElementAt(aLayers->Length() - 1);
}
}
}