summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/JavaScriptCore/assembler/ARMv7Assembler.h6
-rw-r--r--Source/JavaScriptCore/offlineasm/asm.rb2
-rw-r--r--Source/ThirdParty/ANGLE/DerivedSources.pri7
-rw-r--r--Source/WebCore/WebCore.pri2
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp15
-rw-r--r--Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp4
-rw-r--r--Source/WebCore/platform/network/qt/QtMIMETypeSniffer.cpp4
-rw-r--r--Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp3
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp6
-rw-r--r--Source/WebKit2/Shared/WebPreferencesStore.h1
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKPreferences.cpp10
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKPreferences.h4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp52
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h4
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp36
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h10
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h4
-rw-r--r--Source/WebKit2/WebProcess.pro2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp9
-rw-r--r--Source/api.pri2
21 files changed, 164 insertions, 21 deletions
diff --git a/Source/JavaScriptCore/assembler/ARMv7Assembler.h b/Source/JavaScriptCore/assembler/ARMv7Assembler.h
index 28989549d..ddb57b19d 100644
--- a/Source/JavaScriptCore/assembler/ARMv7Assembler.h
+++ b/Source/JavaScriptCore/assembler/ARMv7Assembler.h
@@ -1960,8 +1960,10 @@ public:
int jumpSizeDelta(JumpType jumpType, JumpLinkType jumpLinkType) { return JUMP_ENUM_SIZE(jumpType) - JUMP_ENUM_SIZE(jumpLinkType); }
// Assembler admin methods:
-
- static ALWAYS_INLINE bool linkRecordSourceComparator(const LinkRecord& a, const LinkRecord& b)
+#if !OS(QNX)
+ ALWAYS_INLINE
+#endif
+ static bool linkRecordSourceComparator(const LinkRecord& a, const LinkRecord& b)
{
return a.from() < b.from();
}
diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb
index bf2426399..ed0f15340 100644
--- a/Source/JavaScriptCore/offlineasm/asm.rb
+++ b/Source/JavaScriptCore/offlineasm/asm.rb
@@ -28,6 +28,7 @@ $: << File.dirname(__FILE__)
require "config"
require "backends"
require "digest/sha1"
+require "fileutils"
require "offsets"
require "parser"
require "self_hash"
@@ -244,6 +245,7 @@ if FileTest.exist? outputFlnm
firstLine = inp.gets
if firstLine and firstLine.chomp == inputHash
$stderr.puts "offlineasm: Nothing changed."
+ FileUtils.touch(outputFlnm)
exit 0
end
}
diff --git a/Source/ThirdParty/ANGLE/DerivedSources.pri b/Source/ThirdParty/ANGLE/DerivedSources.pri
index 8f950e82c..686c8266f 100644
--- a/Source/ThirdParty/ANGLE/DerivedSources.pri
+++ b/Source/ThirdParty/ANGLE/DerivedSources.pri
@@ -11,6 +11,13 @@
sanitizedFile = $$toSanitizedPath($$_FILE_)
equals(sanitizedFile, $$toSanitizedPath($$_PRO_FILE_)):TEMPLATE = derived
+INCLUDEPATH += \
+ $$PWD/include \
+ $$PWD/include/GLSLANG \
+ $$PWD/include/KHR \
+ $$PWD/src \
+ $$PWD/src/compiler/preprocessor
+
ANGLE_FLEX_SOURCES = \
$$PWD/src/compiler/glslang.l \
$$PWD/src/compiler/preprocessor/Tokenizer.l
diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri
index 4e5e13cba..ffe389d46 100644
--- a/Source/WebCore/WebCore.pri
+++ b/Source/WebCore/WebCore.pri
@@ -289,7 +289,7 @@ win32 {
}
# Remove whole program optimizations due to miscompilations
-win32-msvc2005|win32-msvc2008|win32-msvc2010|win32-msvc2012|win32-msvc2013|wince* {
+win32-msvc*|wince* {
QMAKE_CFLAGS_LTCG -= -GL
QMAKE_CXXFLAGS_LTCG -= -GL
}
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index d183dd8ee..65b93535a 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -49,6 +49,7 @@
#include "Font.h"
#include "ImageBuffer.h"
#include "NotImplemented.h"
+#include "KURL.h"
#include "Path.h"
#include "Pattern.h"
#include "ShadowBlur.h"
@@ -65,9 +66,12 @@
#include <QPixmap>
#include <QPolygonF>
#include <QStack>
+#include <QUrl>
#include <QVector>
#include <wtf/MathExtras.h>
+#include <private/qpdf_p.h>
+
#if OS(WINDOWS)
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP, int hbitmapFormat = 0);
@@ -1558,9 +1562,18 @@ void GraphicsContext::set3DTransform(const TransformationMatrix& transform)
}
#endif
-void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
+void GraphicsContext::setURLForRect(const KURL& url, const IntRect& rect)
{
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
+ if (paintingDisabled())
+ return;
+
+ QPainter* p = m_data->p();
+ if (p->paintEngine()->type() == QPaintEngine::Pdf)
+ static_cast<QPdfEngine *>(p->paintEngine())->drawHyperlink(p->worldTransform().mapRect(QRectF(rect.x(), rect.y(), rect.width(), rect.height())), QUrl(url.string()));
+#else
notImplemented();
+#endif
}
void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colorSpace)
diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index e24d0b1c8..e07bc76a9 100644
--- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -683,6 +683,10 @@ void QNetworkReplyHandler::forwardData()
{
ASSERT(m_replyWrapper && m_replyWrapper->reply() && !wasAborted() && !m_replyWrapper->wasRedirected());
+ // reply may be closed if reply->close() or reply->abort() is called
+ if (!m_replyWrapper->reply()->isReadable())
+ return;
+
ResourceHandleClient* client = m_resourceHandle->client();
if (!client)
return;
diff --git a/Source/WebCore/platform/network/qt/QtMIMETypeSniffer.cpp b/Source/WebCore/platform/network/qt/QtMIMETypeSniffer.cpp
index 60ab727ce..bd119a8e1 100644
--- a/Source/WebCore/platform/network/qt/QtMIMETypeSniffer.cpp
+++ b/Source/WebCore/platform/network/qt/QtMIMETypeSniffer.cpp
@@ -41,6 +41,10 @@ QtMIMETypeSniffer::QtMIMETypeSniffer(QNetworkReply* reply, const QString& advert
bool QtMIMETypeSniffer::sniff()
{
+ // reply may be closed if reply->close() or reply->abort() is called
+ if (!m_reply->isReadable())
+ return true;
+
// See QNetworkReplyWrapper::setFinished().
const bool isReplyFinished = m_reply->property("_q_isFinished").toBool();
diff --git a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
index 103dc1fcc..ca7b60cd2 100644
--- a/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+++ b/Source/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
@@ -215,7 +215,8 @@ int SocketStreamHandle::platformSend(const char* data, int len)
void SocketStreamHandle::platformClose()
{
LOG(Network, "SocketStreamHandle %p platformClose", this);
- m_p->close();
+ if (m_p)
+ m_p->close();
}
void SocketStreamHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge&)
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index f55b6d721..363f58f78 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -519,12 +519,18 @@ QWebSettings* QWebSettings::globalSettings()
enabled by default.
\value CSSGridLayoutEnabled This setting enables support for the CSS 3 Grid Layout module. This
CSS module is currently only a draft and support for it is disabled by default.
+ \value CSSRegionsEnabled This setting enables support for the CSS 3 Regions module. This
+ CSS module is currently only a draft and support for it is enabled by default.
\value ScrollAnimatorEnabled This setting enables animated scrolling. It is disabled by default.
\value CaretBrowsingEnabled This setting enables caret browsing. It is disabled by default.
\value NotificationsEnabled Specifies whether support for the HTML 5 web notifications is enabled
or not. This is enabled by default.
\value Accelerated2dCanvasEnabled Specifies whether the HTML5 2D canvas should be a OpenGL framebuffer.
This makes many painting operations faster, but slows down pixel access. This is disabled by default.
+ \value WebGLEnabled This setting enables support for WebGL.
+ It is enabled by default.
+ \value HyperlinkAuditingEnabled This setting enables support for hyperlink auditing (<a ping>).
+ It is disabled by default.
*/
/*!
diff --git a/Source/WebKit2/Shared/WebPreferencesStore.h b/Source/WebKit2/Shared/WebPreferencesStore.h
index fb6eabc45..46a5ffab5 100644
--- a/Source/WebKit2/Shared/WebPreferencesStore.h
+++ b/Source/WebKit2/Shared/WebPreferencesStore.h
@@ -161,6 +161,7 @@ namespace WebKit {
macro(HiddenPageDOMTimerThrottlingEnabled, hiddenPageDOMTimerThrottlingEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_DOM_TIMER_THROTTLING_ENABLED) \
macro(HiddenPageCSSAnimationSuspensionEnabled, hiddenPageCSSAnimationSuspensionEnabled, Bool, bool, DEFAULT_HIDDEN_PAGE_CSS_ANIMATION_SUSPENSION_ENABLED) \
macro(LowPowerVideoAudioBufferSizeEnabled, lowPowerVideoAudioBufferSizeEnabled, Bool, bool, false) \
+ macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false) \
\
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
diff --git a/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
index 86af62ea6..b4deaac84 100644
--- a/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
+++ b/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
@@ -1144,3 +1144,13 @@ double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef p
{
return toAPI(toImpl(preferencesRef)->incrementalRenderingSuppressionTimeout());
}
+
+void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setSpatialNavigationEnabled(enabled);
+}
+
+bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->spatialNavigationEnabled();
+}
diff --git a/Source/WebKit2/UIProcess/API/C/WKPreferences.h b/Source/WebKit2/UIProcess/API/C/WKPreferences.h
index bf36bb60e..a9865d15f 100644
--- a/Source/WebKit2/UIProcess/API/C/WKPreferences.h
+++ b/Source/WebKit2/UIProcess/API/C/WKPreferences.h
@@ -240,6 +240,10 @@ WK_EXPORT bool WKPreferencesGetQTKitEnabled(WKPreferencesRef preferencesRef);
WK_EXPORT void WKPreferencesSetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetAsynchronousSpellCheckingEnabled(WKPreferencesRef preferencesRef);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
index 11ebb4f81..bc2d5d21c 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
@@ -621,6 +621,7 @@ void QQuickWebViewPrivate::didRelaunchProcess()
updateViewportSize();
updateUserScripts();
+ updateUserStyleSheets();
updateSchemeDelegates();
}
@@ -874,27 +875,32 @@ void QQuickWebViewPrivate::setNavigatorQtObjectEnabled(bool enabled)
WKPagePostMessageToInjectedBundle(webPage.get(), messageName, wkEnabled.get());
}
-static WKRetainPtr<WKStringRef> readUserScript(const QUrl& url)
+static WKRetainPtr<WKStringRef> readUserFile(const QUrl& url, const char* userFileType)
{
+ if (!url.isValid()) {
+ qWarning("QQuickWebView: Couldn't open '%s' as %s because URL is invalid.", qPrintable(url.toString()), userFileType);
+ return 0;
+ }
+
QString path;
if (url.isLocalFile())
path = url.toLocalFile();
else if (url.scheme() == QLatin1String("qrc"))
path = QStringLiteral(":") + url.path();
else {
- qWarning("QQuickWebView: Couldn't open '%s' as user script because only file:/// and qrc:/// URLs are supported.", qPrintable(url.toString()));
+ qWarning("QQuickWebView: Couldn't open '%s' as %s because only file:/// and qrc:/// URLs are supported.", qPrintable(url.toString()), userFileType);
return 0;
}
QFile file(path);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
- qWarning("QQuickWebView: Couldn't open '%s' as user script due to error '%s'.", qPrintable(url.toString()), qPrintable(file.errorString()));
+ qWarning("QQuickWebView: Couldn't open '%s' as %s due to error '%s'.", qPrintable(url.toString()), userFileType, qPrintable(file.errorString()));
return 0;
}
QByteArray contents = file.readAll();
if (contents.isEmpty())
- qWarning("QQuickWebView: Ignoring '%s' as user script because file is empty.", qPrintable(url.toString()));
+ qWarning("QQuickWebView: Ignoring '%s' as %s because file is empty.", qPrintable(url.toString()), userFileType);
return adoptWK(WKStringCreateWithUTF8CString(contents.constData()));
}
@@ -905,17 +911,25 @@ void QQuickWebViewPrivate::updateUserScripts()
// each Page/WebView pair we create.
WKPageGroupRemoveAllUserScripts(pageGroup.get());
- for (unsigned i = 0; i < userScripts.size(); ++i) {
- const QUrl& url = userScripts.at(i);
- if (!url.isValid()) {
- qWarning("QQuickWebView: Couldn't open '%s' as user script because URL is invalid.", qPrintable(url.toString()));
+ foreach (const QUrl& url, userScripts) {
+ WKRetainPtr<WKStringRef> contents = readUserFile(url, "user script");
+ if (!contents || WKStringIsEmpty(contents.get()))
continue;
- }
+ WKPageGroupAddUserScript(pageGroup.get(), contents.get(), /*baseURL*/ 0, /*whitelistedURLPatterns*/ 0, /*blacklistedURLPatterns*/ 0, kWKInjectInTopFrameOnly, kWKInjectAtDocumentEnd);
+ }
+}
+
+void QQuickWebViewPrivate::updateUserStyleSheets()
+{
+ // This feature works per-WebView because we keep an unique page group for
+ // each Page/WebView pair we create.
+ WKPageGroupRemoveAllUserStyleSheets(pageGroup.get());
- WKRetainPtr<WKStringRef> contents = readUserScript(url);
+ foreach (const QUrl& url, userStyleSheets) {
+ WKRetainPtr<WKStringRef> contents = readUserFile(url, "user style sheet");
if (!contents || WKStringIsEmpty(contents.get()))
continue;
- WKPageGroupAddUserScript(pageGroup.get(), contents.get(), /*baseURL*/ 0, /*whitelistedURLPatterns*/ 0, /*blacklistedURLPatterns*/ 0, kWKInjectInTopFrameOnly, kWKInjectAtDocumentEnd);
+ WKPageGroupAddUserStyleSheet(pageGroup.get(), contents.get(), /*baseURL*/ 0, /*whitelistedURLPatterns*/ 0, /*blacklistedURLPatterns*/ 0, kWKInjectInTopFrameOnly);
}
}
@@ -1524,6 +1538,22 @@ void QQuickWebViewExperimental::setUserScripts(const QList<QUrl>& userScripts)
emit userScriptsChanged();
}
+QList<QUrl> QQuickWebViewExperimental::userStyleSheets() const
+{
+ Q_D(const QQuickWebView);
+ return d->userStyleSheets;
+}
+
+void QQuickWebViewExperimental::setUserStyleSheets(const QList<QUrl>& userStyleSheets)
+{
+ Q_D(QQuickWebView);
+ if (d->userStyleSheets == userStyleSheets)
+ return;
+ d->userStyleSheets = userStyleSheets;
+ d->updateUserStyleSheets();
+ emit userStyleSheetsChanged();
+}
+
QUrl QQuickWebViewExperimental::remoteInspectorUrl() const
{
#if ENABLE(INSPECTOR_SERVER)
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
index 8604dead2..1daf5db0a 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
@@ -281,6 +281,7 @@ class QWEBKIT_EXPORT QQuickWebViewExperimental : public QObject {
Q_PROPERTY(QQmlListProperty<QQuickUrlSchemeDelegate> urlSchemeDelegates READ schemeDelegates)
Q_PROPERTY(QString userAgent READ userAgent WRITE setUserAgent NOTIFY userAgentChanged)
Q_PROPERTY(QList<QUrl> userScripts READ userScripts WRITE setUserScripts NOTIFY userScriptsChanged)
+ Q_PROPERTY(QList<QUrl> userStyleSheets READ userStyleSheets WRITE setUserStyleSheets NOTIFY userStyleSheetsChanged)
Q_PROPERTY(QUrl remoteInspectorUrl READ remoteInspectorUrl NOTIFY remoteInspectorUrlChanged FINAL)
#ifdef HAVE_WEBCHANNEL
Q_PROPERTY(QQmlWebChannel* webChannel READ webChannel WRITE setWebChannel NOTIFY webChannelChanged)
@@ -331,6 +332,8 @@ public:
void setDeviceHeight(int);
QList<QUrl> userScripts() const;
void setUserScripts(const QList<QUrl>& userScripts);
+ QList<QUrl> userStyleSheets() const;
+ void setUserStyleSheets(const QList<QUrl>& userScripts);
QUrl remoteInspectorUrl() const;
QWebKitTest* test();
@@ -396,6 +399,7 @@ Q_SIGNALS:
void enterFullScreenRequested();
void exitFullScreenRequested();
void userScriptsChanged();
+ void userStyleSheetsChanged();
void preferredMinimumContentsWidthChanged();
void remoteInspectorUrlChanged();
void textFound(int matchCount);
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
index f09c16e90..a7358b5cf 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
@@ -122,6 +122,7 @@ public:
bool transparentBackground() const;
void setNavigatorQtObjectEnabled(bool);
void updateUserScripts();
+ void updateUserStyleSheets();
void updateSchemeDelegates();
QPointF contentPos() const;
@@ -214,6 +215,7 @@ protected:
QQmlComponent* colorChooser;
QList<QUrl> userScripts;
+ QList<QUrl> userStyleSheets;
bool m_betweenLoadCommitAndFirstFrame;
bool m_useDefaultContentItemSize;
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
index 26eb944e9..edca4c901 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
@@ -79,6 +79,10 @@ bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute
return WKPreferencesGetCaretBrowsingEnabled(preferencesRef);
case NotificationsEnabled:
return WKPreferencesGetNotificationsEnabled(preferencesRef);
+ case SpatialNavigationEnabled:
+ return WKPreferencesGetSpatialNavigationEnabled(preferencesRef);
+ case LinksIncludedInFocusChain:
+ return WKPreferencesGetTabsToLinks(preferencesRef);
case UniversalAccessFromFileURLsAllowed:
return WKPreferencesGetUniversalAccessFromFileURLsAllowed(preferencesRef);
case FileAccessFromFileURLsAllowed:
@@ -149,6 +153,12 @@ void QWebPreferencesPrivate::setAttribute(QWebPreferencesPrivate::WebAttribute a
case NotificationsEnabled:
WKPreferencesSetNotificationsEnabled(preferencesRef, enable);
break;
+ case SpatialNavigationEnabled:
+ WKPreferencesSetSpatialNavigationEnabled(preferencesRef, enable);
+ break;
+ case LinksIncludedInFocusChain:
+ WKPreferencesSetTabsToLinks(preferencesRef, enable);
+ break;
case UniversalAccessFromFileURLsAllowed:
WKPreferencesSetUniversalAccessFromFileURLsAllowed(preferencesRef, enable);
break;
@@ -604,6 +614,32 @@ 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();
+}
+
+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 9c503d431..08c4df2d8 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h
@@ -49,6 +49,8 @@ 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(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)
@@ -115,6 +117,12 @@ public:
bool fileAccessFromFileURLsAllowed() const;
void setFileAccessFromFileURLsAllowed(bool enable);
+ bool spatialNavigationEnabled() const;
+ void setSpatialNavigationEnabled(bool enable);
+
+ bool linksIncludedInFocusChain() const;
+ void setLinksIncludedInFocusChain(bool enable);
+
QString standardFontFamily() const;
void setStandardFontFamily(const QString& family);
@@ -159,6 +167,8 @@ Q_SIGNALS:
void webAudioEnabledChanged();
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 844fd5b4e..f978a5bd2 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences_p_p.h
@@ -43,7 +43,9 @@ public:
CaretBrowsingEnabled,
NotificationsEnabled,
UniversalAccessFromFileURLsAllowed,
- FileAccessFromFileURLsAllowed
+ FileAccessFromFileURLsAllowed,
+ SpatialNavigationEnabled,
+ LinksIncludedInFocusChain
};
enum FontFamily {
diff --git a/Source/WebKit2/WebProcess.pro b/Source/WebKit2/WebProcess.pro
index b832cb479..3463b9431 100644
--- a/Source/WebKit2/WebProcess.pro
+++ b/Source/WebKit2/WebProcess.pro
@@ -5,7 +5,7 @@
# -------------------------------------------------------------------
TEMPLATE = app
-
+!build_pass:contains(QT_CONFIG, debug_and_release):contains(QT_CONFIG, build_all): CONFIG += release
TARGET = QtWebProcess
DESTDIR = $${ROOT_BUILD_DIR}/bin
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index 6d75b2b83..1351a095d 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -679,8 +679,12 @@ EditorState WebPage::editorState() const
// FIXME: We should only transfer innerText when it changes and do this on the UI side.
- if (result.isContentEditable && !result.isInPasswordField) {
- result.surroundingText = scope->innerText();
+ if (result.isContentEditable) {
+ if (isHTMLTextFormControlElement(scope))
+ result.surroundingText = toHTMLTextFormControlElement(scope)->innerTextValue();
+ else
+ result.surroundingText = scope->innerText();
+
if (result.hasComposition) {
// The anchor is always the left position when they represent a composition.
result.surroundingText.remove(result.anchorPosition, result.cursorPosition - result.anchorPosition);
@@ -2522,6 +2526,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
settings->setScrollAnimatorEnabled(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
#endif
settings->setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
+ settings->setSpatialNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::spatialNavigationEnabledKey()));
#if ENABLE(SQL_DATABASE)
DatabaseManager::manager().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
diff --git a/Source/api.pri b/Source/api.pri
index e0a09e829..de04652ca 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -28,7 +28,7 @@ use?(3D_GRAPHICS): WEBKIT += angle
use?(leveldb):!use?(system_leveldb) WEBKIT += leveldb
MODULE = webkit
-CONFIG += creating_module
+CONFIG += creating_module no_linker_version_script
# This is the canonical list of dependencies for the public API of
# the QtWebKit library, and will end up in the library's prl file.