diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:28 +0200 |
commit | 4d6084feccab99c0a7b3ecef26bb49c41dd50201 (patch) | |
tree | fd1195897f551eee6d5a15d07ff5733b15aa2a5c /Source/WebKit/qt/Api/qwebview.cpp | |
parent | ae901828d4689ab9e89113f6b6ea8042b37a9fda (diff) | |
download | qtwebkit-4d6084feccab99c0a7b3ecef26bb49c41dd50201.tar.gz |
Imported WebKit commit ff52235a78888e5cb8e286a828a8698042200e67 (http://svn.webkit.org/repository/webkit/trunk@122948)
New snapshot that should fix the rendering issues recently introduced
Diffstat (limited to 'Source/WebKit/qt/Api/qwebview.cpp')
-rw-r--r-- | Source/WebKit/qt/Api/qwebview.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/WebKit/qt/Api/qwebview.cpp b/Source/WebKit/qt/Api/qwebview.cpp index 296661aa4..a6082cf63 100644 --- a/Source/WebKit/qt/Api/qwebview.cpp +++ b/Source/WebKit/qt/Api/qwebview.cpp @@ -33,6 +33,11 @@ #include "qprinter.h" #include "qdir.h" #include "qfile.h" +#ifndef QT_NO_ACCESSIBILITY +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#include "qwebviewaccessible_p.h" +#endif +#endif class QWebViewPrivate { public: @@ -148,6 +153,23 @@ void QWebViewPrivate::_q_pageDestroyed() {Google Chat Example}, {Fancy Browser Example} */ +#ifndef QT_NO_ACCESSIBILITY +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +static QAccessibleInterface* accessibleInterfaceFactory(const QString& key, QObject* object) +{ + Q_UNUSED(key) + + if (QWebPage* page = qobject_cast<QWebPage*>(object)) + return new QWebPageAccessible(page); + if (QWebView* view = qobject_cast<QWebView*>(object)) + return new QWebViewAccessible(view); + if (QWebFrame* frame = qobject_cast<QWebFrame*>(object)) + return new QWebFrameAccessible(frame); + return 0; +} +#endif +#endif + /*! Constructs an empty QWebView with parent \a parent. @@ -167,6 +189,12 @@ QWebView::QWebView(QWidget *parent) setMouseTracking(true); setFocusPolicy(Qt::WheelFocus); + +#ifndef QT_NO_ACCESSIBILITY +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + QAccessible::installFactory(accessibleInterfaceFactory); +#endif +#endif } /*! |