aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2015-03-03 18:25:41 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2015-03-05 11:47:31 +0100
commita1a62c871a47a92e3712845283f6163f6f892109 (patch)
treefa3ef154a79162711dbb2d208a435542ecd39608
parent7a65ba6089560efdd840a9590684c24fbcdb7818 (diff)
qtwebengine: Fix build if qtbase has no accessibility
* backport patch from 5.4 branch to 5.4.1 release * bump SRCREV in git recipe to use newer revision from 5.4 which already includes this patch Signed-off-by: Stephan Binner <stephan.binner@basyskom.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qtbase.inc2
-rw-r--r--recipes-qt/qt5/qtwebengine-git/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch2
-rw-r--r--recipes-qt/qt5/qtwebengine-git/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch2
-rw-r--r--recipes-qt/qt5/qtwebengine-git/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch2
-rw-r--r--recipes-qt/qt5/qtwebengine/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch2
-rw-r--r--recipes-qt/qt5/qtwebengine/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch2
-rw-r--r--recipes-qt/qt5/qtwebengine/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch2
-rw-r--r--recipes-qt/qt5/qtwebengine/0004-Enable-building-Qt-WebEngine-without-accessiblity-en.patch534
-rw-r--r--recipes-qt/qt5/qtwebengine_5.4.1.bb1
-rw-r--r--recipes-qt/qt5/qtwebengine_git.bb2
10 files changed, 543 insertions, 8 deletions
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc
index c6fe358b..d7c027fb 100644
--- a/recipes-qt/qt5/qtbase.inc
+++ b/recipes-qt/qt5/qtbase.inc
@@ -64,7 +64,7 @@ PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples"
PACKAGECONFIG[tools] = "-make tools,-nomake tools"
# only for completeness, configure will add libs even if you try to explicitly remove it
PACKAGECONFIG[libs] = "-make libs,-nomake libs"
-# accessibility is required to compile qtquickcontrols and qtwebengine
+# accessibility is required to compile qtquickcontrols
PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility"
PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0"
# use either system freetype or bundled freetype, if you disable freetype completely
diff --git a/recipes-qt/qt5/qtwebengine-git/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch b/recipes-qt/qt5/qtwebengine-git/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch
index c07ada66..f9267dcf 100644
--- a/recipes-qt/qt5/qtwebengine-git/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch
+++ b/recipes-qt/qt5/qtwebengine-git/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch
@@ -1,4 +1,4 @@
-From 6e9a0fa4c1e3681deed659c2749223025637b38b Mon Sep 17 00:00:00 2001
+From 09f65b11a89e90ac115fad2403d22c723b287f31 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Mon, 30 Jun 2014 20:08:17 +0200
Subject: [PATCH 1/3] functions.prf: Don't match QMAKE_EXT_CPP or QMAKE_EXT_H
diff --git a/recipes-qt/qt5/qtwebengine-git/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch b/recipes-qt/qt5/qtwebengine-git/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch
index 91f9724c..cbd67cf7 100644
--- a/recipes-qt/qt5/qtwebengine-git/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch
+++ b/recipes-qt/qt5/qtwebengine-git/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch
@@ -1,4 +1,4 @@
-From 418d78e063a47c4a3085ad7761fa1b842775637b Mon Sep 17 00:00:00 2001
+From 22c68425fb780c435267a867677ec0f54d7dbcd2 Mon Sep 17 00:00:00 2001
From: Simon Busch <morphis@gravedo.de>
Date: Tue, 18 Nov 2014 10:38:18 +0100
Subject: [PATCH 2/3] functions.prf: Make sure we only use the file name to
diff --git a/recipes-qt/qt5/qtwebengine-git/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch b/recipes-qt/qt5/qtwebengine-git/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch
index 6e9def9f..57bac32a 100644
--- a/recipes-qt/qt5/qtwebengine-git/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtwebengine-git/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch
@@ -1,4 +1,4 @@
-From 6c8d9e121920519a831ca09f747ed77dfc2bd135 Mon Sep 17 00:00:00 2001
+From c2b2432649b15b4d7fcec24dd68501c4613e010a Mon Sep 17 00:00:00 2001
From: Frieder Schrempf <frieder.schrempf@online.de>
Date: Mon, 1 Dec 2014 14:34:40 +0000
Subject: [PATCH 3/3] functions.prf: allow build for linux-oe-g++ platform
diff --git a/recipes-qt/qt5/qtwebengine/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch b/recipes-qt/qt5/qtwebengine/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch
index 46a1e00c..83787f3a 100644
--- a/recipes-qt/qt5/qtwebengine/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch
+++ b/recipes-qt/qt5/qtwebengine/0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch
@@ -1,7 +1,7 @@
From 005fabe4148c78e8393c50ca6ebc9d0c2151c3cd Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Mon, 30 Jun 2014 20:08:17 +0200
-Subject: [PATCH 1/3] functions.prf: Don't match QMAKE_EXT_CPP or QMAKE_EXT_H
+Subject: [PATCH 1/4] functions.prf: Don't match QMAKE_EXT_CPP or QMAKE_EXT_H
anywhere in path, but at the end
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
diff --git a/recipes-qt/qt5/qtwebengine/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch b/recipes-qt/qt5/qtwebengine/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch
index 173a58bd..8cdf4ca8 100644
--- a/recipes-qt/qt5/qtwebengine/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch
+++ b/recipes-qt/qt5/qtwebengine/0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch
@@ -1,7 +1,7 @@
From 323f3d4fbd00b8655a1928c389d5f05ef4526044 Mon Sep 17 00:00:00 2001
From: Simon Busch <morphis@gravedo.de>
Date: Tue, 18 Nov 2014 10:38:18 +0100
-Subject: [PATCH 2/3] functions.prf: Make sure we only use the file name to
+Subject: [PATCH 2/4] functions.prf: Make sure we only use the file name to
generate it's moc'ed abbreviation
Signed-off-by: Simon Busch <morphis@gravedo.de>
diff --git a/recipes-qt/qt5/qtwebengine/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch b/recipes-qt/qt5/qtwebengine/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch
index bc8a0700..684b796d 100644
--- a/recipes-qt/qt5/qtwebengine/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch
+++ b/recipes-qt/qt5/qtwebengine/0003-functions.prf-allow-build-for-linux-oe-g-platform.patch
@@ -1,7 +1,7 @@
From 762c943fbe1bee878275788f376b33abce46e25a Mon Sep 17 00:00:00 2001
From: Frieder Schrempf <frieder.schrempf@online.de>
Date: Mon, 1 Dec 2014 14:34:40 +0000
-Subject: [PATCH 3/3] functions.prf: allow build for linux-oe-g++ platform
+Subject: [PATCH 3/4] functions.prf: allow build for linux-oe-g++ platform
Upstream-Status: Inappropriate [OE specific]
diff --git a/recipes-qt/qt5/qtwebengine/0004-Enable-building-Qt-WebEngine-without-accessiblity-en.patch b/recipes-qt/qt5/qtwebengine/0004-Enable-building-Qt-WebEngine-without-accessiblity-en.patch
new file mode 100644
index 00000000..7dfad9ac
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/0004-Enable-building-Qt-WebEngine-without-accessiblity-en.patch
@@ -0,0 +1,534 @@
+From dca162bbe2e0356596bdc4469fb0754be27e0b7d Mon Sep 17 00:00:00 2001
+From: Stephan Binner <stephan.binner@basyskom.com>
+Date: Wed, 4 Mar 2015 12:39:29 +0100
+Subject: [PATCH 4/4] Enable building Qt WebEngine without accessiblity
+ enabled.
+
+This adds guards that for QT_NO_ACCESSIBILITY being not defined
+around the code that uses accessibility types.
+
+It disables the quicknanobrowser and quicktestbrowser examples
+which need Qt QuickControls, which has a hard dependency to
+accessibility being enabled.
+
+Upstream-Status: Backport from 5.5
+https://codereview.qt-project.org/#/c/104207/
+
+Backport of d95b9295c970401939d2779cbdc9e2a8c7965277 from 5.5
+
+Change-Id: I2a2a0a6196fcb3baa39603d9c929183b454f39ed
+Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
+---
+ examples/webengine/quicknanobrowser/quicknanobrowser.pro | 2 ++
+ src/core/browser_accessibility_manager_qt.cpp | 6 ++++++
+ src/core/browser_accessibility_manager_qt.h | 2 ++
+ src/core/browser_accessibility_qt.cpp | 4 ++++
+ src/core/browser_accessibility_qt.h | 3 +++
+ src/core/render_widget_host_view_qt.cpp | 13 ++++++++++++-
+ src/core/render_widget_host_view_qt.h | 6 +++++-
+ src/core/web_contents_adapter.cpp | 2 ++
+ src/core/web_contents_adapter_client.h | 2 ++
+ src/webengine/api/qquickwebengineview.cpp | 12 ++++++++++++
+ src/webengine/api/qquickwebengineview_p.h | 2 ++
+ src/webengine/api/qquickwebengineview_p_p.h | 5 ++++-
+ src/webenginewidgets/api/qwebenginepage.cpp | 3 +++
+ src/webenginewidgets/api/qwebenginepage.h | 2 ++
+ src/webenginewidgets/api/qwebenginepage_p.h | 2 ++
+ src/webenginewidgets/api/qwebengineview.cpp | 7 ++++++-
+ src/webenginewidgets/api/qwebengineview_p.h | 3 ++-
+ tests/quicktestbrowser/quicktestbrowser.pro | 2 ++
+ 18 files changed, 73 insertions(+), 5 deletions(-)
+
+diff --git a/examples/webengine/quicknanobrowser/quicknanobrowser.pro b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
+index 3628b81..a8e57b0 100644
+--- a/examples/webengine/quicknanobrowser/quicknanobrowser.pro
++++ b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
+@@ -1,3 +1,5 @@
++requires(contains(QT_CONFIG, accessibility))
++
+ TEMPLATE = app
+ TARGET = quicknanobrowser
+
+diff --git a/src/core/browser_accessibility_manager_qt.cpp b/src/core/browser_accessibility_manager_qt.cpp
+index 28d0dd7..6729866 100644
+--- a/src/core/browser_accessibility_manager_qt.cpp
++++ b/src/core/browser_accessibility_manager_qt.cpp
+@@ -45,9 +45,14 @@ namespace content {
+
+ BrowserAccessibility *BrowserAccessibilityFactoryQt::Create()
+ {
++#ifndef QT_NO_ACCESSIBILITY
+ return new BrowserAccessibilityQt();
++#else
++ return 0;
++#endif // QT_NO_ACCESSIBILITY
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ BrowserAccessibilityManagerQt::BrowserAccessibilityManagerQt(
+ QObject* parentObject,
+ const ui::AXTreeUpdate& initialTree,
+@@ -131,5 +136,6 @@ void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(ui::AXEvent event_t
+ break;
+ }
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ }
+diff --git a/src/core/browser_accessibility_manager_qt.h b/src/core/browser_accessibility_manager_qt.h
+index 5d8498d..49b3af3 100644
+--- a/src/core/browser_accessibility_manager_qt.h
++++ b/src/core/browser_accessibility_manager_qt.h
+@@ -38,6 +38,7 @@
+ #define BROWSER_ACCESSIBILITY_MANAGER_QT_H
+
+ #include "content/browser/accessibility/browser_accessibility_manager.h"
++#ifndef QT_NO_ACCESSIBILITY
+ #include <QtCore/qobject.h>
+
+ QT_BEGIN_NAMESPACE
+@@ -74,4 +75,5 @@ private:
+
+ }
+
++#endif // QT_NO_ACCESSIBILITY
+ #endif
+diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
+index b5cd26f..4b8e97a 100644
+--- a/src/core/browser_accessibility_qt.cpp
++++ b/src/core/browser_accessibility_qt.cpp
+@@ -40,6 +40,8 @@
+
+ #include "browser_accessibility_qt.h"
+
++#ifndef QT_NO_ACCESSIBILITY
++
+ #include "third_party/WebKit/public/web/WebAXEnums.h"
+ #include "ui/accessibility/ax_node_data.h"
+
+@@ -898,3 +900,5 @@ void BrowserAccessibilityQt::modelChange(QAccessibleTableModelChangeEvent *)
+ }
+
+ } // namespace content
++
++#endif // QT_NO_ACCESSIBILITY
+diff --git a/src/core/browser_accessibility_qt.h b/src/core/browser_accessibility_qt.h
+index db190ff..e87b5d8 100644
+--- a/src/core/browser_accessibility_qt.h
++++ b/src/core/browser_accessibility_qt.h
+@@ -38,6 +38,8 @@
+ #define BROWSER_ACCESSIBILITY_QT_H
+
+ #include <QtGui/qaccessible.h>
++
++#ifndef QT_NO_ACCESSIBILITY
+ #include "content/browser/accessibility/browser_accessibility.h"
+
+ namespace content {
+@@ -145,4 +147,5 @@ public:
+
+ }
+
++#endif // QT_NO_ACCESSIBILITY
+ #endif
+diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
+index c221e94..18d64e8 100644
+--- a/src/core/render_widget_host_view_qt.cpp
++++ b/src/core/render_widget_host_view_qt.cpp
+@@ -198,15 +198,18 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost* widget
+ , m_initPending(false)
+ {
+ m_host->SetView(this);
+-
++#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::installActivationObserver(this);
+ if (QAccessible::isActive())
+ content::BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
++#endif // QT_NO_ACCESSIBILITY
+ }
+
+ RenderWidgetHostViewQt::~RenderWidgetHostViewQt()
+ {
++#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::removeActivationObserver(this);
++#endif // QT_NO_ACCESSIBILITY
+ }
+
+ void RenderWidgetHostViewQt::setDelegate(RenderWidgetHostViewQtDelegate* delegate)
+@@ -296,6 +299,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
+
+ void RenderWidgetHostViewQt::CreateBrowserAccessibilityManagerIfNeeded()
+ {
++#ifndef QT_NO_ACCESSIBILITY
+ if (GetBrowserAccessibilityManager())
+ return;
+
+@@ -303,6 +307,9 @@ void RenderWidgetHostViewQt::CreateBrowserAccessibilityManagerIfNeeded()
+ m_adapterClient->accessibilityParentObject(),
+ content::BrowserAccessibilityManagerQt::GetEmptyDocument(),
+ this));
++#else
++ return 0;
++#endif // QT_NO_ACCESSIBILITY
+ }
+
+ // Set focus to the associated View component.
+@@ -953,6 +960,7 @@ void RenderWidgetHostViewQt::AccessibilityFatalError()
+ SetBrowserAccessibilityManager(NULL);
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ void RenderWidgetHostViewQt::accessibilityActiveChanged(bool active)
+ {
+ if (active)
+@@ -960,6 +968,7 @@ void RenderWidgetHostViewQt::accessibilityActiveChanged(bool active)
+ else
+ content::BrowserAccessibilityStateImpl::GetInstance()->DisableAccessibility();
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ void RenderWidgetHostViewQt::handleWheelEvent(QWheelEvent *ev)
+ {
+@@ -1042,6 +1051,7 @@ void RenderWidgetHostViewQt::handleFocusEvent(QFocusEvent *ev)
+ }
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ QAccessibleInterface *RenderWidgetHostViewQt::GetQtAccessible()
+ {
+ // Assume we have a screen reader doing stuff
+@@ -1051,6 +1061,7 @@ QAccessibleInterface *RenderWidgetHostViewQt::GetQtAccessible()
+ content::BrowserAccessibilityQt *accQt = static_cast<content::BrowserAccessibilityQt*>(acc);
+ return accQt;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ void RenderWidgetHostViewQt::didFirstVisuallyNonEmptyLayout()
+ {
+diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
+index d4a3ff2..fac7efd 100644
+--- a/src/core/render_widget_host_view_qt.h
++++ b/src/core/render_widget_host_view_qt.h
+@@ -50,6 +50,7 @@
+ #include <QRect>
+ #include <QtGlobal>
+ #include <QtGui/qaccessible.h>
++#include <QtGui/QTouchEvent>
+
+ #include "delegated_frame_node.h"
+
+@@ -59,7 +60,6 @@ class QFocusEvent;
+ class QHoverEvent;
+ class QKeyEvent;
+ class QMouseEvent;
+-class QTouchEvent;
+ class QVariant;
+ class QWheelEvent;
+ class QAccessibleInterface;
+@@ -93,7 +93,9 @@ class RenderWidgetHostViewQt
+ , public RenderWidgetHostViewQtDelegateClient
+ , public content::BrowserAccessibilityDelegate
+ , public base::SupportsWeakPtr<RenderWidgetHostViewQt>
++#ifndef QT_NO_ACCESSIBILITY
+ , public QAccessible::ActivationObserver
++#endif // QT_NO_ACCESSIBILITY
+ {
+ public:
+ RenderWidgetHostViewQt(content::RenderWidgetHost* widget);
+@@ -213,9 +215,11 @@ public:
+ virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) const Q_DECL_OVERRIDE { return gfx::Point(); }
+ virtual void AccessibilityHitTest(const gfx::Point& point) Q_DECL_OVERRIDE { }
+ virtual void AccessibilityFatalError() Q_DECL_OVERRIDE;
++#ifndef QT_NO_ACCESSIBILITY
+ virtual void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
+
+ QAccessibleInterface *GetQtAccessible();
++#endif // QT_NO_ACCESSIBILITY
+
+ void didFirstVisuallyNonEmptyLayout();
+
+diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
+index 3f223f7..e41acd0 100644
+--- a/src/core/web_contents_adapter.cpp
++++ b/src/core/web_contents_adapter.cpp
+@@ -628,12 +628,14 @@ void WebContentsAdapter::enableInspector(bool enable)
+ ContentBrowserClientQt::Get()->enableInspector(enable);
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ QAccessibleInterface *WebContentsAdapter::browserAccessible()
+ {
+ Q_D(const WebContentsAdapter);
+ RenderWidgetHostViewQt *rwhv = static_cast<RenderWidgetHostViewQt*>(d->webContents->GetRenderWidgetHostView());
+ return rwhv ? rwhv->GetQtAccessible() : Q_NULLPTR;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ void WebContentsAdapter::runJavaScript(const QString &javaScript)
+ {
+diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
+index 8fd401f..df18980 100644
+--- a/src/core/web_contents_adapter_client.h
++++ b/src/core/web_contents_adapter_client.h
+@@ -168,7 +168,9 @@ public:
+ virtual void passOnFocus(bool reverse) = 0;
+ // returns the last QObject (QWidget/QQuickItem) based object in the accessibility
+ // hierarchy before going into the BrowserAccessibility tree
++#ifndef QT_NO_ACCESSIBILITY
+ virtual QObject *accessibilityParentObject() = 0;
++#endif // QT_NO_ACCESSIBILITY
+ virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) = 0;
+ virtual void authenticationRequired(const QUrl &requestUrl, const QString &realm, bool isProxy, const QString &challengingHost, QString *outUser, QString *outPassword) = 0;
+ virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) = 0;
+diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
+index 3497c16..a35cfc3 100644
+--- a/src/webengine/api/qquickwebengineview.cpp
++++ b/src/webengine/api/qquickwebengineview.cpp
+@@ -61,16 +61,20 @@
+ #include <QScreen>
+ #include <QStringBuilder>
+ #include <QUrl>
++#ifndef QT_NO_ACCESSIBILITY
+ #include <private/qquickaccessibleattached_p.h>
++#endif // QT_NO_ACCESSIBILITY
+
+ QT_BEGIN_NAMESPACE
+
++#ifndef QT_NO_ACCESSIBILITY
+ static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
+ {
+ if (QQuickWebEngineView *v = qobject_cast<QQuickWebEngineView*>(object))
+ return new QQuickWebEngineViewAccessible(v);
+ return 0;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
+ : adapter(new WebContentsAdapter)
+@@ -102,7 +106,9 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
+ // 1x, 2x, 3x etc assets that fit an integral number of pixels.
+ setDevicePixelRatio(qMax(1, qRound(webPixelRatio)));
+ }
++#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::installFactory(&webAccessibleFactory);
++#endif // QT_NO_ACCESSIBILITY
+ }
+
+ QQuickWebEngineViewPrivate::~QQuickWebEngineViewPrivate()
+@@ -395,11 +401,13 @@ void QQuickWebEngineViewPrivate::runMediaAccessPermissionRequest(const QUrl &sec
+ Q_EMIT e->featurePermissionRequested(securityOrigin, feature);
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ QObject *QQuickWebEngineViewPrivate::accessibilityParentObject()
+ {
+ Q_Q(QQuickWebEngineView);
+ return q;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ WebEngineSettings *QQuickWebEngineViewPrivate::webEngineSettings() const
+ {
+@@ -414,6 +422,7 @@ void QQuickWebEngineViewPrivate::setDevicePixelRatio(qreal devicePixelRatio)
+ m_dpiScale = devicePixelRatio / screen->devicePixelRatio();
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ QQuickWebEngineViewAccessible::QQuickWebEngineViewAccessible(QQuickWebEngineView *o)
+ : QAccessibleObject(o)
+ {}
+@@ -460,6 +469,7 @@ QAccessible::State QQuickWebEngineViewAccessible::state() const
+ QAccessible::State s;
+ return s;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContents)
+ {
+@@ -497,8 +507,10 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
+ this->setActiveFocusOnTab(true);
+ this->setFlag(QQuickItem::ItemIsFocusScope);
+
++#ifndef QT_NO_ACCESSIBILITY
+ QQuickAccessibleAttached *accessible = QQuickAccessibleAttached::qmlAttachedProperties(this);
+ accessible->setRole(QAccessible::Grouping);
++#endif // QT_NO_ACCESSIBILITY
+ }
+
+ QQuickWebEngineView::~QQuickWebEngineView()
+diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
+index 22713ee..f3ceb2c 100644
+--- a/src/webengine/api/qquickwebengineview_p.h
++++ b/src/webengine/api/qquickwebengineview_p.h
+@@ -155,7 +155,9 @@ private:
+ friend class QQuickWebEngineViewExperimental;
+ friend class QQuickWebEngineViewExperimentalExtension;
+ friend class QQuickWebEngineNewViewRequest;
++#ifndef QT_NO_ACCESSIBILITY
+ friend class QQuickWebEngineViewAccessible;
++#endif // QT_NO_ACCESSIBILITY
+ };
+
+ QT_END_NAMESPACE
+diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
+index 6662f1f..3ab95c6 100644
+--- a/src/webengine/api/qquickwebengineview_p_p.h
++++ b/src/webengine/api/qquickwebengineview_p_p.h
+@@ -175,7 +175,9 @@ public:
+ virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
+ virtual void authenticationRequired(const QUrl&, const QString&, bool, const QString&, QString*, QString*) Q_DECL_OVERRIDE { }
+ virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) Q_DECL_OVERRIDE;
++#ifndef QT_NO_ACCESSIBILITY
+ virtual QObject *accessibilityParentObject() Q_DECL_OVERRIDE;
++#endif // QT_NO_ACCESSIBILITY
+ virtual WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
+ virtual void allowCertificateError(const QExplicitlySharedDataPointer<CertificateErrorController> &errorController);
+
+@@ -202,6 +204,7 @@ private:
+ qreal m_dpiScale;
+ };
+
++#ifndef QT_NO_ACCESSIBILITY
+ class QQuickWebEngineViewAccessible : public QAccessibleObject
+ {
+ public:
+@@ -217,7 +220,7 @@ public:
+ private:
+ QQuickWebEngineView *engineView() const { return static_cast<QQuickWebEngineView*>(object()); }
+ };
+-
++#endif // QT_NO_ACCESSIBILITY
+ QT_END_NAMESPACE
+
+ QML_DECLARE_TYPE(QQuickWebEngineViewExperimental)
+diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
+index 72b16f2..068c175 100644
+--- a/src/webenginewidgets/api/qwebenginepage.cpp
++++ b/src/webenginewidgets/api/qwebenginepage.cpp
+@@ -39,6 +39,7 @@
+ #include <QApplication>
+ #include <QAuthenticator>
+ #include <QClipboard>
++#include <QContextMenuEvent>
+ #include <QFileDialog>
+ #include <QIcon>
+ #include <QInputDialog>
+@@ -342,10 +343,12 @@ void QWebEnginePagePrivate::runMediaAccessPermissionRequest(const QUrl &security
+ Q_EMIT q->featurePermissionRequested(securityOrigin, requestedFeature);
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ QObject *QWebEnginePagePrivate::accessibilityParentObject()
+ {
+ return view;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const
+ {
+diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
+index 7856b82..9fd81b0 100644
+--- a/src/webenginewidgets/api/qwebenginepage.h
++++ b/src/webenginewidgets/api/qwebenginepage.h
+@@ -258,7 +258,9 @@ private:
+
+ friend class QWebEngineView;
+ friend class QWebEngineViewPrivate;
++#ifndef QT_NO_ACCESSIBILITY
+ friend class QWebEngineViewAccessible;
++#endif // QT_NO_ACCESSIBILITY
+ };
+
+
+diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
+index 5412922..2307e7a 100644
+--- a/src/webenginewidgets/api/qwebenginepage_p.h
++++ b/src/webenginewidgets/api/qwebenginepage_p.h
+@@ -135,7 +135,9 @@ public:
+ virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
+ virtual void authenticationRequired(const QUrl &requestUrl, const QString &realm, bool isProxy, const QString &challengingHost, QString *outUser, QString *outPassword) Q_DECL_OVERRIDE;
+ virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) Q_DECL_OVERRIDE;
++#ifndef QT_NO_ACCESSIBILITY
+ virtual QObject *accessibilityParentObject() Q_DECL_OVERRIDE;
++#endif // QT_NO_ACCESSIBILITY
+ virtual WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
+ virtual void allowCertificateError(const QExplicitlySharedDataPointer<CertificateErrorController> &controller) Q_DECL_OVERRIDE;
+
+diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
+index 8d21989..63ac405 100644
+--- a/src/webenginewidgets/api/qwebengineview.cpp
++++ b/src/webenginewidgets/api/qwebengineview.cpp
+@@ -85,19 +85,22 @@ void QWebEngineViewPrivate::bind(QWebEngineView *view, QWebEnginePage *page)
+ }
+ }
+
+-
++#ifndef QT_NO_ACCESSIBILITY
+ static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
+ {
+ if (QWebEngineView *v = qobject_cast<QWebEngineView*>(object))
+ return new QWebEngineViewAccessible(v);
+ return Q_NULLPTR;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ QWebEngineViewPrivate::QWebEngineViewPrivate()
+ : page(0)
+ , m_pendingContextMenuEvent(false)
+ {
++#ifndef QT_NO_ACCESSIBILITY
+ QAccessible::installFactory(&webAccessibleFactory);
++#endif // QT_NO_ACCESSIBILITY
+ }
+
+ QWebEngineView::QWebEngineView(QWidget *parent)
+@@ -274,6 +277,7 @@ void QWebEngineView::contextMenuEvent(QContextMenuEvent *event)
+ menu->popup(event->globalPos());
+ }
+
++#ifndef QT_NO_ACCESSIBILITY
+ int QWebEngineViewAccessible::childCount() const
+ {
+ if (view() && child(0))
+@@ -294,6 +298,7 @@ int QWebEngineViewAccessible::indexOfChild(const QAccessibleInterface *c) const
+ return 0;
+ return -1;
+ }
++#endif // QT_NO_ACCESSIBILITY
+
+ QT_END_NAMESPACE
+
+diff --git a/src/webenginewidgets/api/qwebengineview_p.h b/src/webenginewidgets/api/qwebengineview_p.h
+index 9db971f..e0cc3f4 100644
+--- a/src/webenginewidgets/api/qwebengineview_p.h
++++ b/src/webenginewidgets/api/qwebengineview_p.h
+@@ -59,6 +59,7 @@ public:
+ bool m_pendingContextMenuEvent;
+ };
+
++#ifndef QT_NO_ACCESSIBILITY
+ class QWebEngineViewAccessible : public QAccessibleWidget
+ {
+ public:
+@@ -72,7 +73,7 @@ public:
+ private:
+ QWebEngineView *view() const { return static_cast<QWebEngineView*>(object()); }
+ };
+-
++#endif // QT_NO_ACCESSIBILITY
+
+ QT_END_NAMESPACE
+
+diff --git a/tests/quicktestbrowser/quicktestbrowser.pro b/tests/quicktestbrowser/quicktestbrowser.pro
+index ac8fe74..51ea5a2 100644
+--- a/tests/quicktestbrowser/quicktestbrowser.pro
++++ b/tests/quicktestbrowser/quicktestbrowser.pro
+@@ -1,3 +1,5 @@
++requires(contains(QT_CONFIG, accessibility))
++
+ TEMPLATE = app
+ TARGET = quicktestbrowser
+
+--
+2.3.1
+
diff --git a/recipes-qt/qt5/qtwebengine_5.4.1.bb b/recipes-qt/qt5/qtwebengine_5.4.1.bb
index 92e8c048..867d5bdd 100644
--- a/recipes-qt/qt5/qtwebengine_5.4.1.bb
+++ b/recipes-qt/qt5/qtwebengine_5.4.1.bb
@@ -8,5 +8,6 @@ SRC_URI += " \
file://0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch \
file://0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch \
file://0003-functions.prf-allow-build-for-linux-oe-g-platform.patch \
+ file://0004-Enable-building-Qt-WebEngine-without-accessiblity-en.patch \
file://0001-chromium-base.gypi-include-atomicops_internals_x86_g.patch \
"
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb
index b451c37e..89a83d46 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -11,7 +11,7 @@ SRC_URI += " \
file://0003-functions.prf-allow-build-for-linux-oe-g-platform.patch \
file://0001-chromium-base.gypi-include-atomicops_internals_x86_g.patch \
"
-SRCREV_qtwebengine = "4eceed9ac0b646238e76d77569a619d4dc515ba5"
+SRCREV_qtwebengine = "9d1a77b5be56a6a1dade613573eaeea63070969f"
SRCREV_chromium = "f9c03801de86b5e9da2b915a9e490c2f2254fecf"
SRCREV = "${SRCREV_qtwebengine}"