summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2015-09-25 19:38:48 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2015-09-29 18:31:02 +0000
commit4630324b92435e0b58375c36c5f8fa2cb0ffade6 (patch)
tree9422dd5d1a781c24d3f54e2005153f8aba9a1c9e
parentdfa35d7fd5aebe5ed5e38223dd8c313c4a3dfd72 (diff)
downloadqtwebkit-4630324b92435e0b58375c36c5f8fa2cb0ffade6.tar.gz
Added linksIncludedInFocusChain property to WebView.experimental.preferences
It is similar to QWebSettings::LinksIncludedInFocusChain attribute from widgets API. Change-Id: Ie5a38bc7372657fee5c50ab91bc1eb7e8e1d3524 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp18
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h5
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h3
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 976ffb8d3..edca4c901 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
@@ -81,6 +81,8 @@ bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute
return WKPreferencesGetNotificationsEnabled(preferencesRef);
case SpatialNavigationEnabled:
return WKPreferencesGetSpatialNavigationEnabled(preferencesRef);
+ case LinksIncludedInFocusChain:
+ return WKPreferencesGetTabsToLinks(preferencesRef);
case UniversalAccessFromFileURLsAllowed:
return WKPreferencesGetUniversalAccessFromFileURLsAllowed(preferencesRef);
case FileAccessFromFileURLsAllowed:
@@ -154,6 +156,9 @@ void QWebPreferencesPrivate::setAttribute(QWebPreferencesPrivate::WebAttribute a
case SpatialNavigationEnabled:
WKPreferencesSetSpatialNavigationEnabled(preferencesRef, enable);
break;
+ case LinksIncludedInFocusChain:
+ WKPreferencesSetTabsToLinks(preferencesRef, enable);
+ break;
case UniversalAccessFromFileURLsAllowed:
WKPreferencesSetUniversalAccessFromFileURLsAllowed(preferencesRef, enable);
break;
@@ -622,6 +627,19 @@ void QWebPreferences::setSpatialNavigationEnabled(bool enable)
emit spatialNavigationEnabledChanged();
}
+bool QWebPreferences::linksIncludedInFocusChain() const
+{
+ return d->testAttribute(QWebPreferencesPrivate::LinksIncludedInFocusChain);
+}
+
+void QWebPreferences::setLinksIncludedInFocusChain(bool enable)
+{
+ if (linksIncludedInFocusChain() == enable)
+ return;
+ d->setAttribute(QWebPreferencesPrivate::LinksIncludedInFocusChain, enable);
+ emit linksIncludedInFocusChainChanged();
+}
+
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 795f4fd56..08c4df2d8 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
@@ -50,6 +50,7 @@ public:
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(bool linksIncludedInFocusChain READ linksIncludedInFocusChain WRITE setLinksIncludedInFocusChain NOTIFY linksIncludedInFocusChainChanged FINAL)
Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily NOTIFY standardFontFamilyChanged FINAL)
Q_PROPERTY(QString fixedFontFamily READ fixedFontFamily WRITE setFixedFontFamily NOTIFY fixedFontFamilyChanged FINAL)
@@ -119,6 +120,9 @@ public:
bool spatialNavigationEnabled() const;
void setSpatialNavigationEnabled(bool enable);
+ bool linksIncludedInFocusChain() const;
+ void setLinksIncludedInFocusChain(bool enable);
+
QString standardFontFamily() const;
void setStandardFontFamily(const QString& family);
@@ -164,6 +168,7 @@ Q_SIGNALS:
void caretBrowsingEnabledChanged();
void notificationsEnabledChanged();
void spatialNavigationEnabledChanged();
+ void linksIncludedInFocusChainChanged();
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 c2b3d4bdb..f978a5bd2 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
@@ -44,7 +44,8 @@ public:
NotificationsEnabled,
UniversalAccessFromFileURLsAllowed,
FileAccessFromFileURLsAllowed,
- SpatialNavigationEnabled
+ SpatialNavigationEnabled,
+ LinksIncludedInFocusChain
};
enum FontFamily {