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:
Родитель
37987a4b25
Коммит
0d6e63fdc4
|
@ -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());
|
||||
|
|
Загрузка…
Ссылка в новой задаче