Bug 1013412 - End wheel transactions as soon as possible if content is doing a prevent-default. r=dvander

This commit is contained in:
Kartikaya Gupta 2015-05-01 13:29:44 -04:00
Родитель cf369566e9
Коммит bdf3a1b564
2 изменённых файлов: 11 добавлений и 1 удалений

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

@ -181,6 +181,15 @@ WheelBlockState::WheelBlockState(const nsRefPtr<AsyncPanZoomController>& aTarget
}
}
bool
WheelBlockState::SetContentResponse(bool aPreventDefault)
{
if (aPreventDefault) {
EndTransaction();
}
return CancelableBlockState::SetContentResponse(aPreventDefault);
}
bool
WheelBlockState::SetConfirmedTargetApzc(const nsRefPtr<AsyncPanZoomController>& aTargetApzc)
{

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

@ -92,7 +92,7 @@ public:
* @return false if this block has already received a response from
* web content, true if not.
*/
bool SetContentResponse(bool aPreventDefault);
virtual bool SetContentResponse(bool aPreventDefault);
/**
* Record that content didn't respond in time.
@ -161,6 +161,7 @@ public:
bool aTargetConfirmed,
const ScrollWheelInput& aEvent);
bool SetContentResponse(bool aPreventDefault) override;
bool IsReadyForHandling() const override;
bool HasEvents() const override;
void DropEvents() override;