diff options
Diffstat (limited to 'WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp')
-rw-r--r-- | WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp index d63317c..190ae9b 100644 --- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp +++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp @@ -26,10 +26,12 @@ #include "Console.h" #include "DumpRenderTreeSupportGtk.h" +#include "Element.h" #include "FileSystem.h" #include "FileChooser.h" #include "FloatRect.h" #include "FrameLoadRequest.h" +#include "FrameView.h" #include "GtkVersioning.h" #include "HTMLNames.h" #include "IntRect.h" @@ -520,6 +522,13 @@ void ChromeClient::mouseDidMoveOverElement(const HitTestResult& hit, unsigned mo g_signal_emit_by_name(m_webView, "hovering-over-link", 0, 0); m_hoveredLinkURL = KURL(); } + + if (Node* node = hit.innerNonSharedNode()) { + Frame* frame = node->document()->frame(); + FrameView* view = frame ? frame->view() : 0; + m_webView->priv->tooltipArea = view ? view->contentsToWindow(node->getRect()) : IntRect(); + } else + m_webView->priv->tooltipArea = IntRect(); } void ChromeClient::setToolTip(const String& toolTip, TextDirection) |