Commit 6e8124fa authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

2011-03-15 Martin Robinson <mrobinson@igalia.com>

        Reviewed by Adam Barth.

        [GTK] [WebKit2] The UIProcess never changes the mouse cursor
        https://bugs.webkit.org/show_bug.cgi?id=56333

        Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
        the cursor to change as the user mouses around the page. There is currently
        no test infrastructure to track cursor changes.

        * UIProcess/gtk/WebView.cpp:
        (WebKit::WebView::setCursor): Ported implementation from WebKit1.

git-svn-id: svn://svn.chromium.org/blink/trunk@81137 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 314f8355
2011-03-15 Martin Robinson <mrobinson@igalia.com>
Reviewed by Adam Barth.
[GTK] [WebKit2] The UIProcess never changes the mouse cursor
https://bugs.webkit.org/show_bug.cgi?id=56333
Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
the cursor to change as the user mouses around the page. There is currently
no test infrastructure to track cursor changes.
* UIProcess/gtk/WebView.cpp:
(WebKit::WebView::setCursor): Ported implementation from WebKit1.
2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Darin Adler.
......
......@@ -194,9 +194,17 @@ void WebView::toolTipChanged(const String&, const String&)
notImplemented();
}
void WebView::setCursor(const Cursor&)
{
notImplemented();
void WebView::setCursor(const Cursor& cursor)
{
// [GTK] Widget::setCursor() gets called frequently
// http://bugs.webkit.org/show_bug.cgi?id=16388
// Setting the cursor may be an expensive operation in some backends,
// so don't re-set the cursor if it's already set to the target value.
GdkWindow* window = gtk_widget_get_window(m_viewWidget);
GdkCursor* currentCursor = gdk_window_get_cursor(window);
GdkCursor* newCursor = cursor.platformCursor().get();
if (currentCursor != newCursor)
gdk_window_set_cursor(window, newCursor);
}
void WebView::setViewportArguments(const WebCore::ViewportArguments&)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment