Bug 1020801 - Notify the ScrollViewChange DOM event when APZ starts/stops to change the transform. r=ehsan

This commit is contained in:
peter chang
2014-09-23 06:37:00 -04:00
parent 1fc3ef784b
commit 6171341241
6 changed files with 77 additions and 22 deletions

View File

@@ -3056,14 +3056,14 @@ nsDocShell::RemoveWeakScrollObserver(nsIScrollObserver* aObserver)
}
void
nsDocShell::NotifyAsyncPanZoomStarted()
nsDocShell::NotifyAsyncPanZoomStarted(const mozilla::CSSIntPoint aScrollPos)
{
nsTObserverArray<nsWeakPtr>::ForwardIterator iter(mScrollObservers);
while (iter.HasMore()) {
nsWeakPtr ref = iter.GetNext();
nsCOMPtr<nsIScrollObserver> obs = do_QueryReferent(ref);
if (obs) {
obs->AsyncPanZoomStarted();
obs->AsyncPanZoomStarted(aScrollPos);
} else {
mScrollObservers.RemoveElement(ref);
}
@@ -3071,14 +3071,14 @@ nsDocShell::NotifyAsyncPanZoomStarted()
}
void
nsDocShell::NotifyAsyncPanZoomStopped()
nsDocShell::NotifyAsyncPanZoomStopped(const mozilla::CSSIntPoint aScrollPos)
{
nsTObserverArray<nsWeakPtr>::ForwardIterator iter(mScrollObservers);
while (iter.HasMore()) {
nsWeakPtr ref = iter.GetNext();
nsCOMPtr<nsIScrollObserver> obs = do_QueryReferent(ref);
if (obs) {
obs->AsyncPanZoomStopped();
obs->AsyncPanZoomStopped(aScrollPos);
} else {
mScrollObservers.RemoveElement(ref);
}