summaryrefslogtreecommitdiffstats
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)
downloadmeta-qt5-a1a62c871a47a92e3712845283f6163f6f892109.tar.gz
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"
64PACKAGECONFIG[tools] = "-make tools,-nomake tools" 64PACKAGECONFIG[tools] = "-make tools,-nomake tools"
65# only for completeness, configure will add libs even if you try to explicitly remove it 65# only for completeness, configure will add libs even if you try to explicitly remove it
66PACKAGECONFIG[libs] = "-make libs,-nomake libs" 66PACKAGECONFIG[libs] = "-make libs,-nomake libs"
67# accessibility is required to compile qtquickcontrols and qtwebengine 67# accessibility is required to compile qtquickcontrols
68PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility" 68PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility"
69PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0" 69PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0"
70# use either system freetype or bundled freetype, if you disable freetype completely 70# 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 @@
1From 6e9a0fa4c1e3681deed659c2749223025637b38b Mon Sep 17 00:00:00 2001 1From 09f65b11a89e90ac115fad2403d22c723b287f31 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Mon, 30 Jun 2014 20:08:17 +0200 3Date: Mon, 30 Jun 2014 20:08:17 +0200
4Subject: [PATCH 1/3] functions.prf: Don't match QMAKE_EXT_CPP or QMAKE_EXT_H 4Subject: [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 @@
1From 418d78e063a47c4a3085ad7761fa1b842775637b Mon Sep 17 00:00:00 2001 1From 22c68425fb780c435267a867677ec0f54d7dbcd2 Mon Sep 17 00:00:00 2001
2From: Simon Busch <morphis@gravedo.de> 2From: Simon Busch <morphis@gravedo.de>
3Date: Tue, 18 Nov 2014 10:38:18 +0100 3Date: Tue, 18 Nov 2014 10:38:18 +0100
4Subject: [PATCH 2/3] functions.prf: Make sure we only use the file name to 4Subject: [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 @@
1From 6c8d9e121920519a831ca09f747ed77dfc2bd135 Mon Sep 17 00:00:00 2001 1From c2b2432649b15b4d7fcec24dd68501c4613e010a Mon Sep 17 00:00:00 2001
2From: Frieder Schrempf <frieder.schrempf@online.de> 2From: Frieder Schrempf <frieder.schrempf@online.de>
3Date: Mon, 1 Dec 2014 14:34:40 +0000 3Date: Mon, 1 Dec 2014 14:34:40 +0000
4Subject: [PATCH 3/3] functions.prf: allow build for linux-oe-g++ platform 4Subject: [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 @@
1From 005fabe4148c78e8393c50ca6ebc9d0c2151c3cd Mon Sep 17 00:00:00 2001 1From 005fabe4148c78e8393c50ca6ebc9d0c2151c3cd Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Mon, 30 Jun 2014 20:08:17 +0200 3Date: Mon, 30 Jun 2014 20:08:17 +0200
4Subject: [PATCH 1/3] functions.prf: Don't match QMAKE_EXT_CPP or QMAKE_EXT_H 4Subject: [PATCH 1/4] functions.prf: Don't match QMAKE_EXT_CPP or QMAKE_EXT_H
5 anywhere in path, but at the end 5 anywhere in path, but at the end
6 6
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> 7Signed-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 @@
1From 323f3d4fbd00b8655a1928c389d5f05ef4526044 Mon Sep 17 00:00:00 2001 1From 323f3d4fbd00b8655a1928c389d5f05ef4526044 Mon Sep 17 00:00:00 2001
2From: Simon Busch <morphis@gravedo.de> 2From: Simon Busch <morphis@gravedo.de>
3Date: Tue, 18 Nov 2014 10:38:18 +0100 3Date: Tue, 18 Nov 2014 10:38:18 +0100
4Subject: [PATCH 2/3] functions.prf: Make sure we only use the file name to 4Subject: [PATCH 2/4] functions.prf: Make sure we only use the file name to
5 generate it's moc'ed abbreviation 5 generate it's moc'ed abbreviation
6 6
7Signed-off-by: Simon Busch <morphis@gravedo.de> 7Signed-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 @@
1From 762c943fbe1bee878275788f376b33abce46e25a Mon Sep 17 00:00:00 2001 1From 762c943fbe1bee878275788f376b33abce46e25a Mon Sep 17 00:00:00 2001
2From: Frieder Schrempf <frieder.schrempf@online.de> 2From: Frieder Schrempf <frieder.schrempf@online.de>
3Date: Mon, 1 Dec 2014 14:34:40 +0000 3Date: Mon, 1 Dec 2014 14:34:40 +0000
4Subject: [PATCH 3/3] functions.prf: allow build for linux-oe-g++ platform 4Subject: [PATCH 3/4] functions.prf: allow build for linux-oe-g++ platform
5 5
6Upstream-Status: Inappropriate [OE specific] 6Upstream-Status: Inappropriate [OE specific]
7 7
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 @@
1From dca162bbe2e0356596bdc4469fb0754be27e0b7d Mon Sep 17 00:00:00 2001
2From: Stephan Binner <stephan.binner@basyskom.com>
3Date: Wed, 4 Mar 2015 12:39:29 +0100
4Subject: [PATCH 4/4] Enable building Qt WebEngine without accessiblity
5 enabled.
6
7This adds guards that for QT_NO_ACCESSIBILITY being not defined
8around the code that uses accessibility types.
9
10It disables the quicknanobrowser and quicktestbrowser examples
11which need Qt QuickControls, which has a hard dependency to
12accessibility being enabled.
13
14Upstream-Status: Backport from 5.5
15https://codereview.qt-project.org/#/c/104207/
16
17Backport of d95b9295c970401939d2779cbdc9e2a8c7965277 from 5.5
18
19Change-Id: I2a2a0a6196fcb3baa39603d9c929183b454f39ed
20Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
21---
22 examples/webengine/quicknanobrowser/quicknanobrowser.pro | 2 ++
23 src/core/browser_accessibility_manager_qt.cpp | 6 ++++++
24 src/core/browser_accessibility_manager_qt.h | 2 ++
25 src/core/browser_accessibility_qt.cpp | 4 ++++
26 src/core/browser_accessibility_qt.h | 3 +++
27 src/core/render_widget_host_view_qt.cpp | 13 ++++++++++++-
28 src/core/render_widget_host_view_qt.h | 6 +++++-
29 src/core/web_contents_adapter.cpp | 2 ++
30 src/core/web_contents_adapter_client.h | 2 ++
31 src/webengine/api/qquickwebengineview.cpp | 12 ++++++++++++
32 src/webengine/api/qquickwebengineview_p.h | 2 ++
33 src/webengine/api/qquickwebengineview_p_p.h | 5 ++++-
34 src/webenginewidgets/api/qwebenginepage.cpp | 3 +++
35 src/webenginewidgets/api/qwebenginepage.h | 2 ++
36 src/webenginewidgets/api/qwebenginepage_p.h | 2 ++
37 src/webenginewidgets/api/qwebengineview.cpp | 7 ++++++-
38 src/webenginewidgets/api/qwebengineview_p.h | 3 ++-
39 tests/quicktestbrowser/quicktestbrowser.pro | 2 ++
40 18 files changed, 73 insertions(+), 5 deletions(-)
41
42diff --git a/examples/webengine/quicknanobrowser/quicknanobrowser.pro b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
43index 3628b81..a8e57b0 100644
44--- a/examples/webengine/quicknanobrowser/quicknanobrowser.pro
45+++ b/examples/webengine/quicknanobrowser/quicknanobrowser.pro
46@@ -1,3 +1,5 @@
47+requires(contains(QT_CONFIG, accessibility))
48+
49 TEMPLATE = app
50 TARGET = quicknanobrowser
51
52diff --git a/src/core/browser_accessibility_manager_qt.cpp b/src/core/browser_accessibility_manager_qt.cpp
53index 28d0dd7..6729866 100644
54--- a/src/core/browser_accessibility_manager_qt.cpp
55+++ b/src/core/browser_accessibility_manager_qt.cpp
56@@ -45,9 +45,14 @@ namespace content {
57
58 BrowserAccessibility *BrowserAccessibilityFactoryQt::Create()
59 {
60+#ifndef QT_NO_ACCESSIBILITY
61 return new BrowserAccessibilityQt();
62+#else
63+ return 0;
64+#endif // QT_NO_ACCESSIBILITY
65 }
66
67+#ifndef QT_NO_ACCESSIBILITY
68 BrowserAccessibilityManagerQt::BrowserAccessibilityManagerQt(
69 QObject* parentObject,
70 const ui::AXTreeUpdate& initialTree,
71@@ -131,5 +136,6 @@ void BrowserAccessibilityManagerQt::NotifyAccessibilityEvent(ui::AXEvent event_t
72 break;
73 }
74 }
75+#endif // QT_NO_ACCESSIBILITY
76
77 }
78diff --git a/src/core/browser_accessibility_manager_qt.h b/src/core/browser_accessibility_manager_qt.h
79index 5d8498d..49b3af3 100644
80--- a/src/core/browser_accessibility_manager_qt.h
81+++ b/src/core/browser_accessibility_manager_qt.h
82@@ -38,6 +38,7 @@
83 #define BROWSER_ACCESSIBILITY_MANAGER_QT_H
84
85 #include "content/browser/accessibility/browser_accessibility_manager.h"
86+#ifndef QT_NO_ACCESSIBILITY
87 #include <QtCore/qobject.h>
88
89 QT_BEGIN_NAMESPACE
90@@ -74,4 +75,5 @@ private:
91
92 }
93
94+#endif // QT_NO_ACCESSIBILITY
95 #endif
96diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
97index b5cd26f..4b8e97a 100644
98--- a/src/core/browser_accessibility_qt.cpp
99+++ b/src/core/browser_accessibility_qt.cpp
100@@ -40,6 +40,8 @@
101
102 #include "browser_accessibility_qt.h"
103
104+#ifndef QT_NO_ACCESSIBILITY
105+
106 #include "third_party/WebKit/public/web/WebAXEnums.h"
107 #include "ui/accessibility/ax_node_data.h"
108
109@@ -898,3 +900,5 @@ void BrowserAccessibilityQt::modelChange(QAccessibleTableModelChangeEvent *)
110 }
111
112 } // namespace content
113+
114+#endif // QT_NO_ACCESSIBILITY
115diff --git a/src/core/browser_accessibility_qt.h b/src/core/browser_accessibility_qt.h
116index db190ff..e87b5d8 100644
117--- a/src/core/browser_accessibility_qt.h
118+++ b/src/core/browser_accessibility_qt.h
119@@ -38,6 +38,8 @@
120 #define BROWSER_ACCESSIBILITY_QT_H
121
122 #include <QtGui/qaccessible.h>
123+
124+#ifndef QT_NO_ACCESSIBILITY
125 #include "content/browser/accessibility/browser_accessibility.h"
126
127 namespace content {
128@@ -145,4 +147,5 @@ public:
129
130 }
131
132+#endif // QT_NO_ACCESSIBILITY
133 #endif
134diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
135index c221e94..18d64e8 100644
136--- a/src/core/render_widget_host_view_qt.cpp
137+++ b/src/core/render_widget_host_view_qt.cpp
138@@ -198,15 +198,18 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost* widget
139 , m_initPending(false)
140 {
141 m_host->SetView(this);
142-
143+#ifndef QT_NO_ACCESSIBILITY
144 QAccessible::installActivationObserver(this);
145 if (QAccessible::isActive())
146 content::BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
147+#endif // QT_NO_ACCESSIBILITY
148 }
149
150 RenderWidgetHostViewQt::~RenderWidgetHostViewQt()
151 {
152+#ifndef QT_NO_ACCESSIBILITY
153 QAccessible::removeActivationObserver(this);
154+#endif // QT_NO_ACCESSIBILITY
155 }
156
157 void RenderWidgetHostViewQt::setDelegate(RenderWidgetHostViewQtDelegate* delegate)
158@@ -296,6 +299,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
159
160 void RenderWidgetHostViewQt::CreateBrowserAccessibilityManagerIfNeeded()
161 {
162+#ifndef QT_NO_ACCESSIBILITY
163 if (GetBrowserAccessibilityManager())
164 return;
165
166@@ -303,6 +307,9 @@ void RenderWidgetHostViewQt::CreateBrowserAccessibilityManagerIfNeeded()
167 m_adapterClient->accessibilityParentObject(),
168 content::BrowserAccessibilityManagerQt::GetEmptyDocument(),
169 this));
170+#else
171+ return 0;
172+#endif // QT_NO_ACCESSIBILITY
173 }
174
175 // Set focus to the associated View component.
176@@ -953,6 +960,7 @@ void RenderWidgetHostViewQt::AccessibilityFatalError()
177 SetBrowserAccessibilityManager(NULL);
178 }
179
180+#ifndef QT_NO_ACCESSIBILITY
181 void RenderWidgetHostViewQt::accessibilityActiveChanged(bool active)
182 {
183 if (active)
184@@ -960,6 +968,7 @@ void RenderWidgetHostViewQt::accessibilityActiveChanged(bool active)
185 else
186 content::BrowserAccessibilityStateImpl::GetInstance()->DisableAccessibility();
187 }
188+#endif // QT_NO_ACCESSIBILITY
189
190 void RenderWidgetHostViewQt::handleWheelEvent(QWheelEvent *ev)
191 {
192@@ -1042,6 +1051,7 @@ void RenderWidgetHostViewQt::handleFocusEvent(QFocusEvent *ev)
193 }
194 }
195
196+#ifndef QT_NO_ACCESSIBILITY
197 QAccessibleInterface *RenderWidgetHostViewQt::GetQtAccessible()
198 {
199 // Assume we have a screen reader doing stuff
200@@ -1051,6 +1061,7 @@ QAccessibleInterface *RenderWidgetHostViewQt::GetQtAccessible()
201 content::BrowserAccessibilityQt *accQt = static_cast<content::BrowserAccessibilityQt*>(acc);
202 return accQt;
203 }
204+#endif // QT_NO_ACCESSIBILITY
205
206 void RenderWidgetHostViewQt::didFirstVisuallyNonEmptyLayout()
207 {
208diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
209index d4a3ff2..fac7efd 100644
210--- a/src/core/render_widget_host_view_qt.h
211+++ b/src/core/render_widget_host_view_qt.h
212@@ -50,6 +50,7 @@
213 #include <QRect>
214 #include <QtGlobal>
215 #include <QtGui/qaccessible.h>
216+#include <QtGui/QTouchEvent>
217
218 #include "delegated_frame_node.h"
219
220@@ -59,7 +60,6 @@ class QFocusEvent;
221 class QHoverEvent;
222 class QKeyEvent;
223 class QMouseEvent;
224-class QTouchEvent;
225 class QVariant;
226 class QWheelEvent;
227 class QAccessibleInterface;
228@@ -93,7 +93,9 @@ class RenderWidgetHostViewQt
229 , public RenderWidgetHostViewQtDelegateClient
230 , public content::BrowserAccessibilityDelegate
231 , public base::SupportsWeakPtr<RenderWidgetHostViewQt>
232+#ifndef QT_NO_ACCESSIBILITY
233 , public QAccessible::ActivationObserver
234+#endif // QT_NO_ACCESSIBILITY
235 {
236 public:
237 RenderWidgetHostViewQt(content::RenderWidgetHost* widget);
238@@ -213,9 +215,11 @@ public:
239 virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) const Q_DECL_OVERRIDE { return gfx::Point(); }
240 virtual void AccessibilityHitTest(const gfx::Point& point) Q_DECL_OVERRIDE { }
241 virtual void AccessibilityFatalError() Q_DECL_OVERRIDE;
242+#ifndef QT_NO_ACCESSIBILITY
243 virtual void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
244
245 QAccessibleInterface *GetQtAccessible();
246+#endif // QT_NO_ACCESSIBILITY
247
248 void didFirstVisuallyNonEmptyLayout();
249
250diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
251index 3f223f7..e41acd0 100644
252--- a/src/core/web_contents_adapter.cpp
253+++ b/src/core/web_contents_adapter.cpp
254@@ -628,12 +628,14 @@ void WebContentsAdapter::enableInspector(bool enable)
255 ContentBrowserClientQt::Get()->enableInspector(enable);
256 }
257
258+#ifndef QT_NO_ACCESSIBILITY
259 QAccessibleInterface *WebContentsAdapter::browserAccessible()
260 {
261 Q_D(const WebContentsAdapter);
262 RenderWidgetHostViewQt *rwhv = static_cast<RenderWidgetHostViewQt*>(d->webContents->GetRenderWidgetHostView());
263 return rwhv ? rwhv->GetQtAccessible() : Q_NULLPTR;
264 }
265+#endif // QT_NO_ACCESSIBILITY
266
267 void WebContentsAdapter::runJavaScript(const QString &javaScript)
268 {
269diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
270index 8fd401f..df18980 100644
271--- a/src/core/web_contents_adapter_client.h
272+++ b/src/core/web_contents_adapter_client.h
273@@ -168,7 +168,9 @@ public:
274 virtual void passOnFocus(bool reverse) = 0;
275 // returns the last QObject (QWidget/QQuickItem) based object in the accessibility
276 // hierarchy before going into the BrowserAccessibility tree
277+#ifndef QT_NO_ACCESSIBILITY
278 virtual QObject *accessibilityParentObject() = 0;
279+#endif // QT_NO_ACCESSIBILITY
280 virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) = 0;
281 virtual void authenticationRequired(const QUrl &requestUrl, const QString &realm, bool isProxy, const QString &challengingHost, QString *outUser, QString *outPassword) = 0;
282 virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) = 0;
283diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
284index 3497c16..a35cfc3 100644
285--- a/src/webengine/api/qquickwebengineview.cpp
286+++ b/src/webengine/api/qquickwebengineview.cpp
287@@ -61,16 +61,20 @@
288 #include <QScreen>
289 #include <QStringBuilder>
290 #include <QUrl>
291+#ifndef QT_NO_ACCESSIBILITY
292 #include <private/qquickaccessibleattached_p.h>
293+#endif // QT_NO_ACCESSIBILITY
294
295 QT_BEGIN_NAMESPACE
296
297+#ifndef QT_NO_ACCESSIBILITY
298 static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
299 {
300 if (QQuickWebEngineView *v = qobject_cast<QQuickWebEngineView*>(object))
301 return new QQuickWebEngineViewAccessible(v);
302 return 0;
303 }
304+#endif // QT_NO_ACCESSIBILITY
305
306 QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
307 : adapter(new WebContentsAdapter)
308@@ -102,7 +106,9 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate()
309 // 1x, 2x, 3x etc assets that fit an integral number of pixels.
310 setDevicePixelRatio(qMax(1, qRound(webPixelRatio)));
311 }
312+#ifndef QT_NO_ACCESSIBILITY
313 QAccessible::installFactory(&webAccessibleFactory);
314+#endif // QT_NO_ACCESSIBILITY
315 }
316
317 QQuickWebEngineViewPrivate::~QQuickWebEngineViewPrivate()
318@@ -395,11 +401,13 @@ void QQuickWebEngineViewPrivate::runMediaAccessPermissionRequest(const QUrl &sec
319 Q_EMIT e->featurePermissionRequested(securityOrigin, feature);
320 }
321
322+#ifndef QT_NO_ACCESSIBILITY
323 QObject *QQuickWebEngineViewPrivate::accessibilityParentObject()
324 {
325 Q_Q(QQuickWebEngineView);
326 return q;
327 }
328+#endif // QT_NO_ACCESSIBILITY
329
330 WebEngineSettings *QQuickWebEngineViewPrivate::webEngineSettings() const
331 {
332@@ -414,6 +422,7 @@ void QQuickWebEngineViewPrivate::setDevicePixelRatio(qreal devicePixelRatio)
333 m_dpiScale = devicePixelRatio / screen->devicePixelRatio();
334 }
335
336+#ifndef QT_NO_ACCESSIBILITY
337 QQuickWebEngineViewAccessible::QQuickWebEngineViewAccessible(QQuickWebEngineView *o)
338 : QAccessibleObject(o)
339 {}
340@@ -460,6 +469,7 @@ QAccessible::State QQuickWebEngineViewAccessible::state() const
341 QAccessible::State s;
342 return s;
343 }
344+#endif // QT_NO_ACCESSIBILITY
345
346 void QQuickWebEngineViewPrivate::adoptWebContents(WebContentsAdapter *webContents)
347 {
348@@ -497,8 +507,10 @@ QQuickWebEngineView::QQuickWebEngineView(QQuickItem *parent)
349 this->setActiveFocusOnTab(true);
350 this->setFlag(QQuickItem::ItemIsFocusScope);
351
352+#ifndef QT_NO_ACCESSIBILITY
353 QQuickAccessibleAttached *accessible = QQuickAccessibleAttached::qmlAttachedProperties(this);
354 accessible->setRole(QAccessible::Grouping);
355+#endif // QT_NO_ACCESSIBILITY
356 }
357
358 QQuickWebEngineView::~QQuickWebEngineView()
359diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
360index 22713ee..f3ceb2c 100644
361--- a/src/webengine/api/qquickwebengineview_p.h
362+++ b/src/webengine/api/qquickwebengineview_p.h
363@@ -155,7 +155,9 @@ private:
364 friend class QQuickWebEngineViewExperimental;
365 friend class QQuickWebEngineViewExperimentalExtension;
366 friend class QQuickWebEngineNewViewRequest;
367+#ifndef QT_NO_ACCESSIBILITY
368 friend class QQuickWebEngineViewAccessible;
369+#endif // QT_NO_ACCESSIBILITY
370 };
371
372 QT_END_NAMESPACE
373diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
374index 6662f1f..3ab95c6 100644
375--- a/src/webengine/api/qquickwebengineview_p_p.h
376+++ b/src/webengine/api/qquickwebengineview_p_p.h
377@@ -175,7 +175,9 @@ public:
378 virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
379 virtual void authenticationRequired(const QUrl&, const QString&, bool, const QString&, QString*, QString*) Q_DECL_OVERRIDE { }
380 virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) Q_DECL_OVERRIDE;
381+#ifndef QT_NO_ACCESSIBILITY
382 virtual QObject *accessibilityParentObject() Q_DECL_OVERRIDE;
383+#endif // QT_NO_ACCESSIBILITY
384 virtual WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
385 virtual void allowCertificateError(const QExplicitlySharedDataPointer<CertificateErrorController> &errorController);
386
387@@ -202,6 +204,7 @@ private:
388 qreal m_dpiScale;
389 };
390
391+#ifndef QT_NO_ACCESSIBILITY
392 class QQuickWebEngineViewAccessible : public QAccessibleObject
393 {
394 public:
395@@ -217,7 +220,7 @@ public:
396 private:
397 QQuickWebEngineView *engineView() const { return static_cast<QQuickWebEngineView*>(object()); }
398 };
399-
400+#endif // QT_NO_ACCESSIBILITY
401 QT_END_NAMESPACE
402
403 QML_DECLARE_TYPE(QQuickWebEngineViewExperimental)
404diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
405index 72b16f2..068c175 100644
406--- a/src/webenginewidgets/api/qwebenginepage.cpp
407+++ b/src/webenginewidgets/api/qwebenginepage.cpp
408@@ -39,6 +39,7 @@
409 #include <QApplication>
410 #include <QAuthenticator>
411 #include <QClipboard>
412+#include <QContextMenuEvent>
413 #include <QFileDialog>
414 #include <QIcon>
415 #include <QInputDialog>
416@@ -342,10 +343,12 @@ void QWebEnginePagePrivate::runMediaAccessPermissionRequest(const QUrl &security
417 Q_EMIT q->featurePermissionRequested(securityOrigin, requestedFeature);
418 }
419
420+#ifndef QT_NO_ACCESSIBILITY
421 QObject *QWebEnginePagePrivate::accessibilityParentObject()
422 {
423 return view;
424 }
425+#endif // QT_NO_ACCESSIBILITY
426
427 void QWebEnginePagePrivate::updateAction(QWebEnginePage::WebAction action) const
428 {
429diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
430index 7856b82..9fd81b0 100644
431--- a/src/webenginewidgets/api/qwebenginepage.h
432+++ b/src/webenginewidgets/api/qwebenginepage.h
433@@ -258,7 +258,9 @@ private:
434
435 friend class QWebEngineView;
436 friend class QWebEngineViewPrivate;
437+#ifndef QT_NO_ACCESSIBILITY
438 friend class QWebEngineViewAccessible;
439+#endif // QT_NO_ACCESSIBILITY
440 };
441
442
443diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
444index 5412922..2307e7a 100644
445--- a/src/webenginewidgets/api/qwebenginepage_p.h
446+++ b/src/webenginewidgets/api/qwebenginepage_p.h
447@@ -135,7 +135,9 @@ public:
448 virtual void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) Q_DECL_OVERRIDE;
449 virtual void authenticationRequired(const QUrl &requestUrl, const QString &realm, bool isProxy, const QString &challengingHost, QString *outUser, QString *outPassword) Q_DECL_OVERRIDE;
450 virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) Q_DECL_OVERRIDE;
451+#ifndef QT_NO_ACCESSIBILITY
452 virtual QObject *accessibilityParentObject() Q_DECL_OVERRIDE;
453+#endif // QT_NO_ACCESSIBILITY
454 virtual WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
455 virtual void allowCertificateError(const QExplicitlySharedDataPointer<CertificateErrorController> &controller) Q_DECL_OVERRIDE;
456
457diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
458index 8d21989..63ac405 100644
459--- a/src/webenginewidgets/api/qwebengineview.cpp
460+++ b/src/webenginewidgets/api/qwebengineview.cpp
461@@ -85,19 +85,22 @@ void QWebEngineViewPrivate::bind(QWebEngineView *view, QWebEnginePage *page)
462 }
463 }
464
465-
466+#ifndef QT_NO_ACCESSIBILITY
467 static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
468 {
469 if (QWebEngineView *v = qobject_cast<QWebEngineView*>(object))
470 return new QWebEngineViewAccessible(v);
471 return Q_NULLPTR;
472 }
473+#endif // QT_NO_ACCESSIBILITY
474
475 QWebEngineViewPrivate::QWebEngineViewPrivate()
476 : page(0)
477 , m_pendingContextMenuEvent(false)
478 {
479+#ifndef QT_NO_ACCESSIBILITY
480 QAccessible::installFactory(&webAccessibleFactory);
481+#endif // QT_NO_ACCESSIBILITY
482 }
483
484 QWebEngineView::QWebEngineView(QWidget *parent)
485@@ -274,6 +277,7 @@ void QWebEngineView::contextMenuEvent(QContextMenuEvent *event)
486 menu->popup(event->globalPos());
487 }
488
489+#ifndef QT_NO_ACCESSIBILITY
490 int QWebEngineViewAccessible::childCount() const
491 {
492 if (view() && child(0))
493@@ -294,6 +298,7 @@ int QWebEngineViewAccessible::indexOfChild(const QAccessibleInterface *c) const
494 return 0;
495 return -1;
496 }
497+#endif // QT_NO_ACCESSIBILITY
498
499 QT_END_NAMESPACE
500
501diff --git a/src/webenginewidgets/api/qwebengineview_p.h b/src/webenginewidgets/api/qwebengineview_p.h
502index 9db971f..e0cc3f4 100644
503--- a/src/webenginewidgets/api/qwebengineview_p.h
504+++ b/src/webenginewidgets/api/qwebengineview_p.h
505@@ -59,6 +59,7 @@ public:
506 bool m_pendingContextMenuEvent;
507 };
508
509+#ifndef QT_NO_ACCESSIBILITY
510 class QWebEngineViewAccessible : public QAccessibleWidget
511 {
512 public:
513@@ -72,7 +73,7 @@ public:
514 private:
515 QWebEngineView *view() const { return static_cast<QWebEngineView*>(object()); }
516 };
517-
518+#endif // QT_NO_ACCESSIBILITY
519
520 QT_END_NAMESPACE
521
522diff --git a/tests/quicktestbrowser/quicktestbrowser.pro b/tests/quicktestbrowser/quicktestbrowser.pro
523index ac8fe74..51ea5a2 100644
524--- a/tests/quicktestbrowser/quicktestbrowser.pro
525+++ b/tests/quicktestbrowser/quicktestbrowser.pro
526@@ -1,3 +1,5 @@
527+requires(contains(QT_CONFIG, accessibility))
528+
529 TEMPLATE = app
530 TARGET = quicktestbrowser
531
532--
5332.3.1
534
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 += " \
8 file://0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch \ 8 file://0001-functions.prf-Don-t-match-QMAKE_EXT_CPP-or-QMAKE_EXT.patch \
9 file://0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch \ 9 file://0002-functions.prf-Make-sure-we-only-use-the-file-name-to.patch \
10 file://0003-functions.prf-allow-build-for-linux-oe-g-platform.patch \ 10 file://0003-functions.prf-allow-build-for-linux-oe-g-platform.patch \
11 file://0004-Enable-building-Qt-WebEngine-without-accessiblity-en.patch \
11 file://0001-chromium-base.gypi-include-atomicops_internals_x86_g.patch \ 12 file://0001-chromium-base.gypi-include-atomicops_internals_x86_g.patch \
12" 13"
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 += " \
11 file://0003-functions.prf-allow-build-for-linux-oe-g-platform.patch \ 11 file://0003-functions.prf-allow-build-for-linux-oe-g-platform.patch \
12 file://0001-chromium-base.gypi-include-atomicops_internals_x86_g.patch \ 12 file://0001-chromium-base.gypi-include-atomicops_internals_x86_g.patch \
13" 13"
14SRCREV_qtwebengine = "4eceed9ac0b646238e76d77569a619d4dc515ba5" 14SRCREV_qtwebengine = "9d1a77b5be56a6a1dade613573eaeea63070969f"
15SRCREV_chromium = "f9c03801de86b5e9da2b915a9e490c2f2254fecf" 15SRCREV_chromium = "f9c03801de86b5e9da2b915a9e490c2f2254fecf"
16SRCREV = "${SRCREV_qtwebengine}" 16SRCREV = "${SRCREV_qtwebengine}"
17 17