[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
aroben at apple.com
aroben at apple.com
Fri Jan 21 15:08:32 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 8effab9d8adb1ff3080911d87ed777b80b7569ac
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 7 21:20:30 2011 +0000
Don't ever call ::SetCursor(0)
Doing so makes the cursor disappear from the screen.
Fixes <http://webkit.org/b/52024> Mouse cursor flashes when moving it
around a WKView before the web process has finished launching
Reviewed by Jon Honeycutt.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::onSetCursor): If we don't have a cursor to set, just
let Windows do its default thing (which is to set the cursor to the
window class's cursor, which in our case is the arrow cursor).
(WebKit::WebView::cursorToShow): Just return 0 when the page has
crashed so that we'll show the default cursor (which is the arrow
cursor). This change has no visible effect, but seems slightly better
conceptually.
(WebKit::WebView::updateNativeCursor): Don't do anything if we don't
have a cursor to set.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 214d382..1aab770 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,27 @@
2011-01-06 Adam Roben <aroben at apple.com>
+ Don't ever call ::SetCursor(0)
+
+ Doing so makes the cursor disappear from the screen.
+
+ Fixes <http://webkit.org/b/52024> Mouse cursor flashes when moving it
+ around a WKView before the web process has finished launching
+
+ Reviewed by Jon Honeycutt.
+
+ * UIProcess/win/WebView.cpp:
+ (WebKit::WebView::onSetCursor): If we don't have a cursor to set, just
+ let Windows do its default thing (which is to set the cursor to the
+ window class's cursor, which in our case is the arrow cursor).
+ (WebKit::WebView::cursorToShow): Just return 0 when the page has
+ crashed so that we'll show the default cursor (which is the arrow
+ cursor). This change has no visible effect, but seems slightly better
+ conceptually.
+ (WebKit::WebView::updateNativeCursor): Don't do anything if we don't
+ have a cursor to set.
+
+2011-01-06 Adam Roben <aroben at apple.com>
+
Fill the WKView with white when the web process hasn't drawn anything
yet
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index 1f7dc1f..282f76f 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -482,7 +482,12 @@ LRESULT WebView::onShowWindowEvent(HWND hWnd, UINT message, WPARAM wParam, LPARA
LRESULT WebView::onSetCursor(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled)
{
- handled = ::SetCursor(m_lastCursorSet);
+ if (!m_lastCursorSet) {
+ handled = false;
+ return 0;
+ }
+
+ ::SetCursor(m_lastCursorSet);
return 0;
}
@@ -625,12 +630,11 @@ void WebView::toolTipChanged(const String&, const String& newToolTip)
HCURSOR WebView::cursorToShow() const
{
- static HCURSOR arrowCursor = ::LoadCursor(0, IDC_ARROW);
-
if (!m_page->isValid())
- return arrowCursor;
+ return 0;
// We only show the override cursor if the default (arrow) cursor is showing.
+ static HCURSOR arrowCursor = ::LoadCursor(0, IDC_ARROW);
if (m_overrideCursor && m_webCoreCursor == arrowCursor)
return m_overrideCursor;
@@ -640,6 +644,8 @@ HCURSOR WebView::cursorToShow() const
void WebView::updateNativeCursor()
{
m_lastCursorSet = cursorToShow();
+ if (!m_lastCursorSet)
+ return;
::SetCursor(m_lastCursorSet);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list