<rdar://problem/11442485> off-screen or inactive pages can change the mouse pointer
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2012 04:36:01 +0000 (04:36 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Aug 2012 04:36:01 +0000 (04:36 +0000)
Reviewed by Adele Peterson.

* page/EventHandler.cpp:
(WebCore::EventHandler::fakeMouseMoveEventTimerFired): Added a check that the page is
on-screen and active before dispatching the fake mouse event.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125389 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp

index 390bd7b..086212e 100644 (file)
@@ -1,3 +1,13 @@
+2012-08-12  Dan Bernstein  <mitz@apple.com>
+
+        <rdar://problem/11442485> off-screen or inactive pages can change the mouse pointer
+
+        Reviewed by Adele Peterson.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::fakeMouseMoveEventTimerFired): Added a check that the page is
+        on-screen and active before dispatching the fake mouse event.
+
 2012-08-12  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
 
         [BlackBerry] use MediaPlayer::userAgent() in MediaPlayerPrivateBlackBerry to avoid layering violation
index 7a078e8..486d4bf 100644 (file)
@@ -2742,6 +2742,9 @@ void EventHandler::fakeMouseMoveEventTimerFired(Timer<EventHandler>* timer)
     if (!view)
         return;
 
+    if (!m_frame->page() || !m_frame->page()->isOnscreen() || !m_frame->page()->focusController()->isActive())
+        return;
+
     bool shiftKey;
     bool ctrlKey;
     bool altKey;