summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebengineview.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-07-31 17:24:26 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-01 15:33:00 +0200
commit04f58ffc1904bef7ba788b56ed098a7823017e65 (patch)
tree8fb75f472afecbb2fc11d71bf6a4496a73f5114e /src/webengine/api/qquickwebengineview.cpp
parent945f9183ced012960c75e0b0339a328bbbc96ee6 (diff)
Fix tab focus in the widgets and QML webviews
Fixes: - Make sure that we call SetInitialFocus when giving focus through Tab This does the same as would WebContents::FocusThroughTabTraversal - Implement QWebEnginePagePrivate::passOnFocus - Set each new RWHVQtDelegate as the focus proxy of the QWebEngineView - Make sure that the widgets delegate accepts the tab focus policy Cleaups: - RenderWidgetHostViewQtDelegateQuick doesn't need to be a focus scope, it doesn't have any children - We don't need to reimplement QQuickWebEngineView::forceActiveFocus since the view is now a focus scope - Do not explicitly setFocus(true) on the QQuickWebEngineView, the application should decide this through the API Change-Id: I817dc2c895d4fff4aa3536c71ecc5d306bb3bee0 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index cfbfe04e7..3fbd53d34 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -469,7 +469,6 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
Q_D(QQuickWebEngineView);
d->e->q_ptr = this;
d->adapter->initialize(d);
- this->setFocus(true);
this->setActiveFocusOnTab(true);
this->setFlag(QQuickItem::ItemIsFocusScope);
@@ -570,16 +569,6 @@ bool QQuickWebEngineView::canGoForward() const
return d->adapter->canGoForward();
}
-void QQuickWebEngineView::forceActiveFocus()
-{
- Q_FOREACH (QQuickItem *child, childItems()) {
- if (qobject_cast<RenderWidgetHostViewQtDelegateQuick *>(child)) {
- child->forceActiveFocus();
- break;
- }
- }
-}
-
QQuickWebEngineViewExperimental *QQuickWebEngineView::experimental() const
{
Q_D(const QQuickWebEngineView);