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,14 +1220,16 @@ APZCTreeManager::UpdateZoomConstraints(const ScrollableLayerGuid& aGuid,
}
if (node && aConstraints) {
ForEachNode(node.get(),
[&aConstraints, this](HitTestingTreeNode* aNode)
[&aConstraints, &node, this](HitTestingTreeNode* aNode)
{
if (AsyncPanZoomController* childApzc = aNode->GetApzc()) {
// We can have subtrees with their own zoom constraints or separate layers
// id - leave these alone.
if (childApzc->HasNoParentWithSameLayersId() ||
this->mZoomConstraints.find(childApzc->GetGuid()) != this->mZoomConstraints.end()) {
return TraversalFlag::Skip;
if (aNode != node) {
if (AsyncPanZoomController* childApzc = aNode->GetApzc()) {
// We can have subtrees with their own zoom constraints or separate layers
// id - leave these alone.
if (childApzc->HasNoParentWithSameLayersId() ||
this->mZoomConstraints.find(childApzc->GetGuid()) != this->mZoomConstraints.end()) {
return TraversalFlag::Skip;
}
}
}
if (aNode->IsPrimaryHolder()) {