Reviewed by Alp Toker.
http://bugs.webkit.org/show_bug.cgi?id=15793
[GTK] Webkit doesn't show title attribute tooltip when hovering over an image
Implement tooltip support using the new Tooltip API.
Support for older versions of GTK+ is still lacking.
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::setToolTip):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28000
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-24 Christian Dywan <christian@twotoasts.de>
+
+ Reviewed by Alp Toker.
+
+ http://bugs.webkit.org/show_bug.cgi?id=15793
+ [GTK] Webkit doesn't show title attribute tooltip when hovering over an image
+
+ Implement tooltip support using the new Tooltip API.
+
+ Support for older versions of GTK+ is still lacking.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::setToolTip):
+
2007-11-22 Alp Toker <alp@atoker.com>
Reviewed by Mark Rowe.
}
}
-void ChromeClient::setToolTip(const String&)
-{
- notImplemented();
+void ChromeClient::setToolTip(const String& toolTip)
+{
+#if GTK_CHECK_VERSION(2,12,0)
+ if (toolTip.isEmpty())
+ g_object_set(G_OBJECT(m_webPage), "has-tooltip", FALSE, NULL);
+ else
+ gtk_widget_set_tooltip_text(GTK_WIDGET(m_webPage), toolTip.utf8().data());
+#else
+ // TODO: Support older GTK+ versions
+ // See http://bugs.webkit.org/show_bug.cgi?id=15793
+ notImplemented();
+#endif
}
void ChromeClient::print(Frame*)