Bug 1226320 - Fix a refactoring in APZCTreeManager that didn't preserve semantics correctly. r=kats

This commit is contained in:
Botond Ballo 2015-11-19 15:34:50 -05:00
parent 0ad09a4d56
commit 001a2d5664

View File

@ -1220,8 +1220,9 @@ APZCTreeManager::UpdateZoomConstraints(const ScrollableLayerGuid& aGuid,
}
if (node && aConstraints) {
ForEachNode(node.get(),
[&aConstraints, this](HitTestingTreeNode* aNode)
[&aConstraints, &node, this](HitTestingTreeNode* aNode)
{
if (aNode != node) {
if (AsyncPanZoomController* childApzc = aNode->GetApzc()) {
// We can have subtrees with their own zoom constraints or separate layers
// id - leave these alone.
@ -1230,6 +1231,7 @@ APZCTreeManager::UpdateZoomConstraints(const ScrollableLayerGuid& aGuid,
return TraversalFlag::Skip;
}
}
}
if (aNode->IsPrimaryHolder()) {
MOZ_ASSERT(aNode->GetApzc());
aNode->GetApzc()->UpdateZoomConstraints(aConstraints.ref());