From 55e7440f3def65cfaefc5960334961504e438b9c Mon Sep 17 00:00:00 2001 From: "hausmann@webkit.org" Date: Tue, 20 Nov 2007 09:06:06 +0000 Subject: [PATCH] Add an argument to pass the link text in the hovering signal Signed-off-by: Simon Hausmann git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27919 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebKit/qt/Api/qwebframe.h | 2 +- WebKit/qt/Api/qwebpage.cpp | 6 +++--- WebKit/qt/Api/qwebpage.h | 6 +++--- WebKit/qt/ChangeLog | 13 +++++++++++++ 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h index 20356d2a8c18..8d8e842ff27f 100644 --- a/WebKit/qt/Api/qwebframe.h +++ b/WebKit/qt/Api/qwebframe.h @@ -83,7 +83,7 @@ signals: void loadDone(bool ok); void provisionalLoad(); void titleChanged(const QString &title); - void hoveringOverLink(const QString &link, const QString &title); + void hoveringOverLink(const QString &link, const QString &title, const QString &textContent); private: friend class QWebPage; diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index 98fd3951529b..ec3dfff46fec 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -127,8 +127,8 @@ void QWebPagePrivate::createMainFrame() mainFrame = new QWebFrame(q, &frameData); QObject::connect(mainFrame, SIGNAL(titleChanged(const QString&)), q, SIGNAL(titleChanged(const QString&))); - QObject::connect(mainFrame, SIGNAL(hoveringOverLink(const QString&, const QString&)), - q, SIGNAL(hoveringOverLink(const QString&, const QString&))); + QObject::connect(mainFrame, SIGNAL(hoveringOverLink(const QString&, const QString&, const QString&)), + q, SIGNAL(hoveringOverLink(const QString&, const QString&, const QString&))); mainFrame->d->frameView->setFrameGeometry(q->geometry()); @@ -860,7 +860,7 @@ void QWebPage::mouseMoveEvent(QMouseEvent *ev) WebCore::Element *link = result.URLElement(); if (link != frame->lastHoverElement) { frame->lastHoverElement = link; - emit hoveringOverLink(result.absoluteLinkURL().prettyURL(), result.title()); + emit hoveringOverLink(result.absoluteLinkURL().prettyURL(), result.title(), result.textContent()); } } diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h index 68a351db7f47..082a4ae53efa 100644 --- a/WebKit/qt/Api/qwebpage.h +++ b/WebKit/qt/Api/qwebpage.h @@ -204,10 +204,10 @@ signals: /** * Signal is emitted when the mouse is hovering over a link. * The first parameter is the link url, the second is the link title - * if any. Method is emitter with both empty parameters when the mouse - * isn't hovering over any link element. + * if any, and third is the text content. Method is emitter with both + * empty parameters when the mouse isn't hovering over any link element. */ - void hoveringOverLink(const QString &link, const QString &title); + void hoveringOverLink(const QString &link, const QString &title, const QString &textContent); /** * Signal is emitted when the statusbar text is changed by the page. */ diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index 8dcaefe64fe3..615d60d10236 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,16 @@ +2007-11-20 George Staikos + + Reviewed by Simon Hausmann . + + Add an argument to pass the link text in the hovering signal + + + * Api/qwebframe.h: + * Api/qwebpage.cpp: + (QWebPagePrivate::createMainFrame): + (QWebPage::mouseMoveEvent): + * Api/qwebpage.h: + 2007-11-20 Adam Treat Reviewed by Simon and George. -- 2.36.0