Bug 1256339 - Collapse the different Handle*Tap functions in GeckoContentController into a single API. r=botond

This is just a refactoring, no functional changes intended.

MozReview-Commit-ID: GRJxVpNAlHC
This commit is contained in:
Kartikaya Gupta
2016-07-05 13:24:54 -04:00
parent 6cddb57599
commit b1ccfa8ef7
19 changed files with 193 additions and 263 deletions

View File

@@ -44,16 +44,17 @@ AndroidContentController::NotifyDefaultPrevented(APZCTreeManager* aManager,
}
void
AndroidContentController::HandleSingleTap(const CSSPoint& aPoint,
Modifiers aModifiers,
const ScrollableLayerGuid& aGuid)
AndroidContentController::HandleTap(TapType aType, const CSSPoint& aPoint,
Modifiers aModifiers,
const ScrollableLayerGuid& aGuid,
uint64_t aInputBlockId)
{
// This function will get invoked first on the Java UI thread, and then
// again on the main thread (because of the code in ChromeProcessController::
// HandleSingleTap). We want to post the SingleTap message once; it can be
// HandleTap). We want to post the SingleTap message once; it can be
// done from either thread but we need access to the callback transform
// so we do it from the main thread.
if (NS_IsMainThread()) {
if (NS_IsMainThread() && aType == TapType::eSingleTap) {
CSSPoint point = mozilla::layers::APZCCallbackHelper::ApplyCallbackTransform(aPoint, aGuid);
nsIContent* content = nsLayoutUtils::FindContentFor(aGuid.mScrollId);
@@ -83,7 +84,7 @@ AndroidContentController::HandleSingleTap(const CSSPoint& aPoint,
});
}
ChromeProcessController::HandleSingleTap(aPoint, aModifiers, aGuid);
ChromeProcessController::HandleTap(aType, aPoint, aModifiers, aGuid, aInputBlockId);
}
void