[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrobinson at webkit.org
mrobinson at webkit.org
Wed Dec 22 16:26:32 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 31c1cb0cd193556d8b88a890a4b2c5ac7ea5bb45
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 23 20:40:34 2010 +0000
2010-11-23 Carlos Garcia Campos <cgarcia at igalia.com>
Reviewed by Martin Robinson.
focus issue with links that have tooltips
https://bugs.webkit.org/show_bug.cgi?id=49498
Set the area of the widget where the tooltip should be shown when
a new tooltip is set. Since the widget is the same (the view), if
the tooltip area is not set and a new tooltip is triggered while
the previous one is still visible, the text of the tooltip is
updated but its position doesn't change.
* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::mouseDidMoveOverElement):
* webkit/webkitprivate.h:
* webkit/webkitwebview.cpp:
(webkit_web_view_query_tooltip):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 3305bcb..6b1f293 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,22 @@
+2010-11-23 Carlos Garcia Campos <cgarcia at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ focus issue with links that have tooltips
+ https://bugs.webkit.org/show_bug.cgi?id=49498
+
+ Set the area of the widget where the tooltip should be shown when
+ a new tooltip is set. Since the widget is the same (the view), if
+ the tooltip area is not set and a new tooltip is triggered while
+ the previous one is still visible, the text of the tooltip is
+ updated but its position doesn't change.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::mouseDidMoveOverElement):
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_query_tooltip):
+
2010-11-21 Mario Sanchez Prada <msanchez at igalia.com>
Reviewed by Chris Fleizach.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index d63317c..3ceff66 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -520,6 +520,9 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo
g_signal_emit_by_name(m_webView, "hovering-over-link", 0, 0);
m_hoveredLinkURL = KURL();
}
+
+ Node* node = hit.innerNonSharedNode();
+ m_webView->priv->tooltipArea = node ? node->getRect() : IntRect();
}
void ChromeClient::setToolTip(const String& toolTip, TextDirection)
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 7385677..e090ed4 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -55,6 +55,7 @@
#include "HistoryItem.h"
#include "InspectorClientGtk.h"
#include "IntPoint.h"
+#include "IntRect.h"
#include "FrameLoaderClient.h"
#include "FullscreenVideoController.h"
#include "Node.h"
@@ -181,6 +182,7 @@ extern "C" {
CString mainResourceIdentifier;
PlatformRefPtr<GHashTable> subResources;
CString tooltipText;
+ WebCore::IntRect tooltipArea;
int currentClickCount;
WebCore::IntPoint previousClickPoint;
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 0dc19f3..ed61516 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -1637,6 +1637,13 @@ static gboolean webkit_web_view_query_tooltip(GtkWidget *widget, gint x, gint y,
WebKitWebViewPrivate* priv = WEBKIT_WEB_VIEW_GET_PRIVATE(widget);
if (priv->tooltipText.length() > 0) {
+ if (!keyboard_mode) {
+ if (!priv->tooltipArea.isEmpty()) {
+ GdkRectangle area = priv->tooltipArea;
+ gtk_tooltip_set_tip_area(tooltip, &area);
+ } else
+ gtk_tooltip_set_tip_area(tooltip, 0);
+ }
gtk_tooltip_set_text(tooltip, priv->tooltipText.data());
return TRUE;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list