Bug 732052 - Internal touch event listeners should not enable slow path. r=smaug

This commit is contained in:
Wes Johnston 2012-07-09 09:55:37 -07:00
Родитель b8fc760a2e
Коммит 033955b0a9
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -282,7 +282,9 @@ nsEventListenerManager::AddEventListener(nsIDOMEventListener *aListener,
aTypeAtom == nsGkAtoms::ontouchcancel)) {
mMayHaveTouchEventListener = true;
nsPIDOMWindow* window = GetInnerWindowForTarget();
if (window)
// we don't want touchevent listeners added by scrollbars to flip this flag
// so we ignore listeners created with system event flag
if (window && !(aFlags & NS_EVENT_FLAG_SYSTEM_EVENT))
window->SetHasTouchEventListeners();
} else if (aTypeAtom == nsGkAtoms::onmouseenter ||
aTypeAtom == nsGkAtoms::onmouseleave) {