diff options
| author | Konstantin Tokarev <annulen@yandex.ru> | 2015-08-25 22:09:33 +0300 |
|---|---|---|
| committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-27 13:32:33 +0000 |
| commit | a7592da5461b695f2182f14d5d03ef97e2177965 (patch) | |
| tree | b6e8861dabf0c09b3dcc8defec3ce0ac0d84f1ec /Source/WebKit2/UIProcess/API/qt | |
| parent | 3ab291d9e65847c4aefed34078c51d317e547f73 (diff) | |
| download | qtwebkit-a7592da5461b695f2182f14d5d03ef97e2177965.tar.gz | |
Added SpatialNavigationEnabled setting.
Includes partial cherry-pick of patch by Danilo Cesar Lemes de Paula
https://bugs.webkit.org/show_bug.cgi?id=114298.
Change-Id: Iff3ee6de9d318d41f20f949b31c20a15dd0cac17
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt')
| -rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp | 18 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h | 5 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h | 3 |
3 files changed, 25 insertions, 1 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp index 26eb944e9..976ffb8d3 100644 --- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp @@ -79,6 +79,8 @@ bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute return WKPreferencesGetCaretBrowsingEnabled(preferencesRef); case NotificationsEnabled: return WKPreferencesGetNotificationsEnabled(preferencesRef); + case SpatialNavigationEnabled: + return WKPreferencesGetSpatialNavigationEnabled(preferencesRef); case UniversalAccessFromFileURLsAllowed: return WKPreferencesGetUniversalAccessFromFileURLsAllowed(preferencesRef); case FileAccessFromFileURLsAllowed: @@ -149,6 +151,9 @@ void QWebPreferencesPrivate::setAttribute(QWebPreferencesPrivate::WebAttribute a case NotificationsEnabled: WKPreferencesSetNotificationsEnabled(preferencesRef, enable); break; + case SpatialNavigationEnabled: + WKPreferencesSetSpatialNavigationEnabled(preferencesRef, enable); + break; case UniversalAccessFromFileURLsAllowed: WKPreferencesSetUniversalAccessFromFileURLsAllowed(preferencesRef, enable); break; @@ -604,6 +609,19 @@ void QWebPreferences::setFileAccessFromFileURLsAllowed(bool enable) emit fileAccessFromFileURLsAllowedChanged(); } +bool QWebPreferences::spatialNavigationEnabled() const +{ + return d->testAttribute(QWebPreferencesPrivate::SpatialNavigationEnabled); +} + +void QWebPreferences::setSpatialNavigationEnabled(bool enable) +{ + if (spatialNavigationEnabled() == enable) + return; + d->setAttribute(QWebPreferencesPrivate::SpatialNavigationEnabled, enable); + emit spatialNavigationEnabledChanged(); +} + QWebPreferencesPrivate* QWebPreferencesPrivate::get(QWebPreferences* preferences) { return preferences->d; diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h index 9c503d431..795f4fd56 100644 --- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h +++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h @@ -49,6 +49,7 @@ public: Q_PROPERTY(bool notificationsEnabled READ notificationsEnabled WRITE setNotificationsEnabled NOTIFY notificationsEnabledChanged FINAL) Q_PROPERTY(bool universalAccessFromFileURLsAllowed READ universalAccessFromFileURLsAllowed WRITE setUniversalAccessFromFileURLsAllowed NOTIFY universalAccessFromFileURLsAllowedChanged FINAL) Q_PROPERTY(bool fileAccessFromFileURLsAllowed READ fileAccessFromFileURLsAllowed WRITE setFileAccessFromFileURLsAllowed NOTIFY fileAccessFromFileURLsAllowedChanged FINAL) + Q_PROPERTY(bool spatialNavigationEnabled READ spatialNavigationEnabled WRITE setSpatialNavigationEnabled NOTIFY spatialNavigationEnabledChanged FINAL) Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily NOTIFY standardFontFamilyChanged FINAL) Q_PROPERTY(QString fixedFontFamily READ fixedFontFamily WRITE setFixedFontFamily NOTIFY fixedFontFamilyChanged FINAL) @@ -115,6 +116,9 @@ public: bool fileAccessFromFileURLsAllowed() const; void setFileAccessFromFileURLsAllowed(bool enable); + bool spatialNavigationEnabled() const; + void setSpatialNavigationEnabled(bool enable); + QString standardFontFamily() const; void setStandardFontFamily(const QString& family); @@ -159,6 +163,7 @@ Q_SIGNALS: void webAudioEnabledChanged(); void caretBrowsingEnabledChanged(); void notificationsEnabledChanged(); + void spatialNavigationEnabledChanged(); void universalAccessFromFileURLsAllowedChanged(); void fileAccessFromFileURLsAllowedChanged(); diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h index 844fd5b4e..c2b3d4bdb 100644 --- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h +++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h @@ -43,7 +43,8 @@ public: CaretBrowsingEnabled, NotificationsEnabled, UniversalAccessFromFileURLsAllowed, - FileAccessFromFileURLsAllowed + FileAccessFromFileURLsAllowed, + SpatialNavigationEnabled }; enum FontFamily { |
