[Qt][WK2] Add support for hover API in Qt WebKit2
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 14:09:00 +0000 (14:09 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Sep 2011 14:09:00 +0000 (14:09 +0000)
commit77a825a96aebc1952adfb359ac6e128fd45f881a
treeba595cebb4de7b6ddec8b2d07c6ed95ab2ec74b6
parent25e1cf7fb557a098bc00e4e6db77c539dc17d32b
[Qt][WK2] Add support for hover API in Qt WebKit2
https://bugs.webkit.org/show_bug.cgi?id=68369

Reviewed by Andreas Kling.

Source/WebKit2:

Based on the patch from Igor Oliveira in the same bug.

Expose a linkHovered() signal in QDesktopWebView, that passes the QUrl and the
QString corresponding to the link title. I left textContent out because was
unsure of its use case.

In QDesktopWebView we store the last URL and title emitted to make sure we send
the signal only if either value changes. Tests were added to the QML element to
check: if values are correctly emitted and if we don't emit more signals than
necessary.

* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::didMouseMoveOverElement):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/test2.html:
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_mouseDidMoveOverElement):
* UIProcess/qt/ClientImpl.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::init):
* UIProcess/qt/TouchViewInterface.h:
(WebKit::TouchViewInterface::didMouseMoveOverElement):
* UIProcess/qt/ViewInterface.h:

Tools:

Change the statusbar to show the link URL when hovering links in
MiniBrowser using QDesktopWebView.

* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::BrowserWindow):
(BrowserWindow::onLinkHovered):
* MiniBrowser/qt/BrowserWindow.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp
Source/WebKit2/UIProcess/API/qt/qdesktopwebview.h
Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/test2.html
Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro
Source/WebKit2/UIProcess/qt/ClientImpl.cpp
Source/WebKit2/UIProcess/qt/ClientImpl.h
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/TouchViewInterface.h
Source/WebKit2/UIProcess/qt/ViewInterface.h
Tools/ChangeLog
Tools/MiniBrowser/qt/BrowserWindow.cpp
Tools/MiniBrowser/qt/BrowserWindow.h