summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-22 15:28:16 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-01-09 16:10:22 +0000
commit4a85e3dcca015b30dff457dc41712fb6d0b437e9 (patch)
tree2bca52844136e9791a6a861267be61b61eada244 /src/core/render_widget_host_view_qt.cpp
parentcffba828bc53fab284f030b8131ea47913108618 (diff)
Make AccessiblityActivationObserver separate of RWHV
It is a global control anyway, and with future Chromium headers, there are conflicts with qaccessibility.h. Change-Id: Ife43340684b8b9498b1f4cd3f6fbe450d88794ec Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 4bb41a303..61b1e2a09 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -93,7 +93,6 @@
#include <QWheelEvent>
#include <QWindow>
#include <QtGui/private/qinputcontrol_p.h>
-#include <QtGui/qaccessible.h>
namespace QtWebEngineCore {
@@ -244,19 +243,6 @@ private:
float dpiScale;
};
-bool isAccessibilityEnabled() {
- // On Linux accessibility is disabled by default due to performance issues,
- // and can be re-enabled by setting the QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY environment
- // variable. For details, see QTBUG-59922.
-#ifdef Q_OS_LINUX
- static bool accessibility_enabled
- = qEnvironmentVariableIsSet("QTWEBENGINE_ENABLE_LINUX_ACCESSIBILITY");
-#else
- const bool accessibility_enabled = true;
-#endif
- return accessibility_enabled;
-}
-
RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost *widget)
: content::RenderWidgetHostViewBase::RenderWidgetHostViewBase(widget)
, m_gestureProvider(QtGestureProviderConfig(), this)
@@ -280,13 +266,6 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost *widget
base::checked_cast<uint32_t>(widget->GetRoutingID()))
{
host()->SetView(this);
-#ifndef QT_NO_ACCESSIBILITY
- if (isAccessibilityEnabled()) {
- QAccessible::installActivationObserver(this);
- if (QAccessible::isActive())
- content::BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
- }
-#endif // QT_NO_ACCESSIBILITY
if (GetTextInputManager())
GetTextInputManager()->AddObserver(this);
@@ -303,9 +282,6 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost *widget
RenderWidgetHostViewQt::~RenderWidgetHostViewQt()
{
QObject::disconnect(m_adapterClientDestroyedConnection);
-#ifndef QT_NO_ACCESSIBILITY
- QAccessible::removeActivationObserver(this);
-#endif // QT_NO_ACCESSIBILITY
if (text_input_manager_)
text_input_manager_->RemoveObserver(this);
@@ -1393,16 +1369,6 @@ void RenderWidgetHostViewQt::handleInputMethodQueryEvent(QInputMethodQueryEvent
ev->accept();
}
-#ifndef QT_NO_ACCESSIBILITY
-void RenderWidgetHostViewQt::accessibilityActiveChanged(bool active)
-{
- if (active)
- content::BrowserAccessibilityStateImpl::GetInstance()->EnableAccessibility();
- else
- content::BrowserAccessibilityStateImpl::GetInstance()->DisableAccessibility();
-}
-#endif // QT_NO_ACCESSIBILITY
-
void RenderWidgetHostViewQt::handleWheelEvent(QWheelEvent *ev)
{
if (!m_wheelAckPending) {