Title: [125979] trunk/Source/WebKit2
Revision
125979
Author
[email protected]
Date
2012-08-19 12:12:28 -0700 (Sun, 19 Aug 2012)

Log Message

WebPageProxy::setCursor does not check that the view is still in an active window
https://bugs.webkit.org/show_bug.cgi?id=94427

Reviewed by Alexey Proskuryakov.

The Web process may ask to change the cursor when the view is in an active window, but
if by the time the UI process receives the message, the view is no longer in a window or the
window is not active , then the cursor should not change.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setCursor): Added a check that the view is in an active window before
allowing the page to change the cursor.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (125978 => 125979)


--- trunk/Source/WebKit2/ChangeLog	2012-08-19 18:34:24 UTC (rev 125978)
+++ trunk/Source/WebKit2/ChangeLog	2012-08-19 19:12:28 UTC (rev 125979)
@@ -1,3 +1,18 @@
+2012-08-19  Dan Bernstein  <[email protected]>
+
+        WebPageProxy::setCursor does not check that the view is still in an active window
+        https://bugs.webkit.org/show_bug.cgi?id=94427
+
+        Reviewed by Alexey Proskuryakov.
+
+        The Web process may ask to change the cursor when the view is in an active window, but
+        if by the time the UI process receives the message, the view is no longer in a window or the
+        window is not active , then the cursor should not change.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setCursor): Added a check that the view is in an active window before
+        allowing the page to change the cursor.
+
 2012-08-19  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r125972.

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (125978 => 125979)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-08-19 18:34:24 UTC (rev 125978)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-08-19 19:12:28 UTC (rev 125979)
@@ -3196,7 +3196,10 @@
 
 void WebPageProxy::setCursor(const WebCore::Cursor& cursor)
 {
-    m_pageClient->setCursor(cursor);
+    // The Web process may have asked to change the cursor when the view was in an active window, but
+    // if it is no longer in a window or the window is not active, then the cursor should not change.
+    if (m_pageClient->isViewWindowActive())
+        m_pageClient->setCursor(cursor);
 }
 
 void WebPageProxy::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to