Bug 1223296 - Turn HandlePanStart into a more generic function that can be called from other places. r=botond

--HG--
extra : commitid : Hc4gKPuqS4Z
This commit is contained in:
Kartikaya Gupta 2015-11-13 15:10:52 -05:00
Родитель 820bc62753
Коммит 0924e27ab0
3 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -407,7 +407,8 @@ APZEventState::ProcessAPZStateChange(const nsCOMPtr<nsIDocument>& aDocument,
}
case APZStateChange::StartPanning:
{
mActiveElementManager->HandlePanStart();
// The user started to pan, so we don't want anything to be :active.
mActiveElementManager->ClearActivation();
break;
}
case APZStateChange::EndTouch:

Просмотреть файл

@ -101,12 +101,9 @@ ActiveElementManager::TriggerElementActivation()
}
void
ActiveElementManager::HandlePanStart()
ActiveElementManager::ClearActivation()
{
AEM_LOG("Handle pan start\n");
// The user started to pan, so we don't want mTarget to be :active.
// Make it not :active, and clear any pending task to make it :active.
AEM_LOG("Clearing element activation\n");
CancelTask();
ResetActive();
}

Просмотреть файл

@ -45,9 +45,9 @@ public:
*/
void HandleTouchStart(bool aCanBePan);
/**
* Handle the start of panning.
* Clear the active element.
*/
void HandlePanStart();
void ClearActivation();
/**
* Handle a touch-end or touch-cancel event.
* @param aWasClick whether the touch was a click