Title: [90766] trunk/Source/WebKit2
- Revision
- 90766
- Author
- [email protected]
- Date
- 2011-07-11 11:22:17 -0700 (Mon, 11 Jul 2011)
Log Message
[Qt][WK2] Get rid of focusNextPrevChild()
https://bugs.webkit.org/show_bug.cgi?id=64289
Reviewed by Andreas Kling.
Qt 5 does not use focusNextPrevChild() but uses setFocusNavigation(), and
the focus is not based on QWidget.
We can get rid of the method since the new implementation will be totally
different.
* UIProcess/API/qt/qtouchwebpage.cpp:
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/qt/ClientImpl.cpp:
(qt_wk_takeFocus):
* UIProcess/qt/QtWebPageProxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (90765 => 90766)
--- trunk/Source/WebKit2/ChangeLog 2011-07-11 18:20:23 UTC (rev 90765)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-11 18:22:17 UTC (rev 90766)
@@ -1,3 +1,22 @@
+2011-07-11 Benjamin Poulain <[email protected]>
+
+ [Qt][WK2] Get rid of focusNextPrevChild()
+ https://bugs.webkit.org/show_bug.cgi?id=64289
+
+ Reviewed by Andreas Kling.
+
+ Qt 5 does not use focusNextPrevChild() but uses setFocusNavigation(), and
+ the focus is not based on QWidget.
+
+ We can get rid of the method since the new implementation will be totally
+ different.
+
+ * UIProcess/API/qt/qtouchwebpage.cpp:
+ * UIProcess/API/qt/qtouchwebpage.h:
+ * UIProcess/qt/ClientImpl.cpp:
+ (qt_wk_takeFocus):
+ * UIProcess/qt/QtWebPageProxy.h:
+
2011-07-11 Anders Carlsson <[email protected]>
Implement getFormValue for WebKit2
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp (90765 => 90766)
--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp 2011-07-11 18:20:23 UTC (rev 90765)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp 2011-07-11 18:22:17 UTC (rev 90766)
@@ -67,48 +67,8 @@
return d->page->title();
}
-class FriendlyWidget : public QWidget {
-public:
- bool focusNextPrevChild(bool next);
-};
-
-void QTouchWebPage::focusNextPrevChildCallback(bool next)
-{
- if (!hasFocus())
- return;
-
- // Find the view which has the focus.
- QList<QGraphicsView*> views = scene()->views();
- const int viewCount = views.count();
- QGraphicsView* focusedView = 0;
- for (int i = 0; i < viewCount; ++i) {
- if (views[i]->hasFocus()) {
- focusedView = views[i];
- break;
- }
- }
-
- if (focusedView) {
- QWidget* window = focusedView->window();
- FriendlyWidget* friendlyWindow = static_cast<FriendlyWidget*>(window);
- friendlyWindow->focusNextPrevChild(next);
- }
-}
-
/*! \reimp
*/
-bool QTouchWebPage::focusNextPrevChild(bool next)
-{
-#if 0
- // FIXME: Key event is handled by the QtWebPageProxy subclass.
- QKeyEvent ev(QEvent::KeyPress, Qt::Key_Tab, Qt::KeyboardModifiers(next ? Qt::NoModifier : Qt::ShiftModifier));
- d->page.keyPressEvent(&ev);
-#endif
- return true;
-}
-
-/*! \reimp
-*/
bool QTouchWebPage::event(QEvent* ev)
{
switch (ev->type()) {
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h (90765 => 90766)
--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h 2011-07-11 18:20:23 UTC (rev 90765)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h 2011-07-11 18:22:17 UTC (rev 90766)
@@ -65,10 +65,6 @@
virtual void timerEvent(QTimerEvent*);
virtual void resizeEvent(QGraphicsSceneResizeEvent*);
- Q_SLOT void focusNextPrevChildCallback(bool next);
-
- virtual bool focusNextPrevChild(bool next);
-
private:
Q_PRIVATE_SLOT(d, void onScaleChanged())
Modified: trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp (90765 => 90766)
--- trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp 2011-07-11 18:20:23 UTC (rev 90765)
+++ trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp 2011-07-11 18:22:17 UTC (rev 90766)
@@ -171,7 +171,6 @@
void qt_wk_takeFocus(WKPageRef page, WKFocusDirection direction, const void *clientInfo)
{
- emit toQtWebPageProxy(clientInfo)->focusNextPrevChild(direction == kWKFocusDirectionForward);
}
void qt_wk_runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h (90765 => 90766)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-07-11 18:20:23 UTC (rev 90765)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-07-11 18:22:17 UTC (rev 90766)
@@ -194,7 +194,6 @@
Q_SIGNAL void scrollRequested(int dx, int dy);
Q_SIGNAL void windowCloseRequested();
Q_SIGNAL void zoomableAreaFound(const QRect&);
- Q_SIGNAL void focusNextPrevChild(bool);
protected:
void init();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes