Don't treat mouse exit and enter events as user events for purposes of content sink frequency tuning, since they're often caused by widget creation/destruction, and if the user moves the mouse we'll get real mousemove events. I'm hoping this will smooth pageload times. b=248226 r+sr=bryner

This commit is contained in:
dbaron%dbaron.org 2004-06-23 17:31:29 +00:00
Родитель 37987a4b25
Коммит 0d6e63fdc4
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -1876,8 +1876,14 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
default:
{
if ((NS_IS_MOUSE_EVENT(aEvent) &&
// Ignore moves that we synthesize.
NS_STATIC_CAST(nsMouseEvent*,aEvent)->reason ==
nsMouseEvent::eReal) ||
nsMouseEvent::eReal &&
// Ignore mouse exit and enter (we'll get moves if the user
// is really moving the mouse) since we get them when we
// create and destroy widgets.
aEvent->message != NS_MOUSE_EXIT &&
aEvent->message != NS_MOUSE_ENTER) ||
NS_IS_KEY_EVENT(aEvent) ||
NS_IS_IME_EVENT(aEvent)) {
gLastUserEventTime = PR_IntervalToMicroseconds(PR_IntervalNow());