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
parent b01e9e1147
commit ba9b7984e1

View File

@ -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) {