Bug 1088559 - Also dispatch NotifyAsyncPanZoomStarted/NotifyAsyncPanZoomStopped to nsDocShell's child. r=roc

This commit is contained in:
Morris Tseng
2014-10-29 02:03:00 -04:00
parent 99a6cd1aff
commit 4942d31de9
2 changed files with 20 additions and 2 deletions

View File

@@ -3114,6 +3114,15 @@ nsDocShell::NotifyAsyncPanZoomStarted(const mozilla::CSSIntPoint aScrollPos)
mScrollObservers.RemoveElement(ref);
}
}
// Also notify child docshell
for (uint32_t i = 0; i < mChildList.Length(); ++i) {
nsCOMPtr<nsIDocShell> kid = do_QueryInterface(ChildAt(i));
if (kid) {
nsDocShell* docShell = static_cast<nsDocShell*>(kid.get());
docShell->NotifyAsyncPanZoomStarted(aScrollPos);
}
}
}
void
@@ -3129,6 +3138,15 @@ nsDocShell::NotifyAsyncPanZoomStopped(const mozilla::CSSIntPoint aScrollPos)
mScrollObservers.RemoveElement(ref);
}
}
// Also notify child docshell
for (uint32_t i = 0; i < mChildList.Length(); ++i) {
nsCOMPtr<nsIDocShell> kid = do_QueryInterface(ChildAt(i));
if (kid) {
nsDocShell* docShell = static_cast<nsDocShell*>(kid.get());
docShell->NotifyAsyncPanZoomStopped(aScrollPos);
}
}
}
NS_IMETHODIMP