Bug 969483 - Fix the RepositionChild function and add a test for it. r=BenWa

This commit is contained in:
Kartikaya Gupta
2014-02-18 16:38:30 -05:00
parent aa176d12a2
commit eb53e44708
2 changed files with 89 additions and 4 deletions

View File

@@ -813,9 +813,13 @@ ContainerLayer::RepositionChild(Layer* aChild, Layer* aAfter)
}
if (prev) {
prev->SetNextSibling(next);
} else {
mFirstChild = next;
}
if (next) {
next->SetPrevSibling(prev);
} else {
mLastChild = prev;
}
if (!aAfter) {
aChild->SetPrevSibling(nullptr);