summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-09-28 16:39:37 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:01 +0000
commit9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch)
tree322337ad0acbc75732f916376ec6d36e7ec0e5bc /Tools
parent6882a04fb36642862b11efe514251d32070c3d65 (diff)
downloadqtwebkit-9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c.tar.gz
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Tools')
-rw-r--r--Tools/QtTestBrowser/webpage.h14
-rw-r--r--Tools/Scripts/webkitperl/FeatureList.pm2
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.html6
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstoragebin0 -> 12288 bytes
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage-shmbin0 -> 32768 bytes
-rw-r--r--Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp6
-rw-r--r--Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp13
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp12
-rw-r--r--Tools/WebKitTestRunner/TestController.h4
-rw-r--r--Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp6
-rw-r--r--Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp9
-rw-r--r--Tools/WebKitTestRunner/qt/TestControllerQt.cpp27
-rw-r--r--Tools/WebKitTestRunner/qt/TestInvocationQt.cpp2
-rwxr-xr-xTools/qt/make-snapshot.pl40
15 files changed, 99 insertions, 44 deletions
diff --git a/Tools/QtTestBrowser/webpage.h b/Tools/QtTestBrowser/webpage.h
index 959318018..1a6ef2e38 100644
--- a/Tools/QtTestBrowser/webpage.h
+++ b/Tools/QtTestBrowser/webpage.h
@@ -42,17 +42,17 @@ class WebPage : public QWebPage {
public:
WebPage(QObject* parent = 0);
- virtual QWebPage* createWindow(QWebPage::WebWindowType);
- virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
- virtual bool supportsExtension(QWebPage::Extension) const;
- virtual bool extension(Extension, const ExtensionOption*, ExtensionReturn*);
+ QWebPage* createWindow(QWebPage::WebWindowType) override;
+ QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&) override;
+ bool supportsExtension(QWebPage::Extension) const override;
+ bool extension(Extension, const ExtensionOption*, ExtensionReturn*) override;
- virtual bool acceptNavigationRequest(QWebFrame*, const QNetworkRequest&, NavigationType);
+ bool acceptNavigationRequest(QWebFrame*, const QNetworkRequest&, NavigationType) override;
- QString userAgentForUrl(const QUrl&) const;
+ QString userAgentForUrl(const QUrl&) const override;
void setInterruptingJavaScriptEnabled(bool enabled) { m_interruptingJavaScriptEnabled = enabled; }
- virtual bool shouldInterruptJavaScript();
+ bool shouldInterruptJavaScript() override;
void javaScriptConsoleMessage(const QString &message, int lineNumber, const QString &sourceID) override;
diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm
index 81264636a..8301d9bc6 100644
--- a/Tools/Scripts/webkitperl/FeatureList.pm
+++ b/Tools/Scripts/webkitperl/FeatureList.pm
@@ -470,7 +470,7 @@ my @features = (
define => "ENABLE_XSLT", default => 1, value => \$xsltSupport },
{ option => "ftl-jit", desc => "Toggle FTLJIT support",
- define => "ENABLE_FTL_JIT", default => (isX86_64() && (isGtk() || isEfl()) || (isQt() && !isAnyWindows())) , value => \$ftlJITSupport },
+ define => "ENABLE_FTL_JIT", default => (isX86_64() && (isGtk() || isEfl() || (isQt() && !isAnyWindows()))) , value => \$ftlJITSupport },
);
sub getFeatureOptionList()
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.html b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.html
new file mode 100644
index 000000000..9878f36ac
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.html
@@ -0,0 +1,6 @@
+<script>
+
+window.localStorage.key(0);
+window.webkit.messageHandlers.testHandler.postMessage('DONE');
+
+</script>
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage
new file mode 100644
index 000000000..0b41b25c7
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage
Binary files differ
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage-shm b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage-shm
new file mode 100644
index 000000000..fe9ac2845
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/LocalStorageNullEntries.localstorage-shm
Binary files differ
diff --git a/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp b/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp
index b210a4a1d..6b67622b7 100644
--- a/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp
+++ b/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp
@@ -21,9 +21,9 @@
#include "config.h"
#include "PlatformUtilities.h"
-#include <WebKit2/WKStringQt.h>
-#include <WebKit2/WKNativeEvent.h>
-#include <WebKit2/WKURLQt.h>
+#include <WebKit/WKNativeEvent.h>
+#include <WebKit/WKStringQt.h>
+#include <WebKit/WKURLQt.h>
#include <QCoreApplication>
#include <QDir>
diff --git a/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp b/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp
index 17c786e8e..553462285 100644
--- a/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp
+++ b/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp
@@ -31,7 +31,7 @@
#include "qquickwebpage_p.h"
#include "qquickwebview_p.h"
-#include <WebKit2/WKRetainPtr.h>
+#include <WebKit/WKRetainPtr.h>
#include <QCoreApplication>
#include <QEventLoop>
diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
index ded3a329d..cab9a21c5 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
@@ -379,6 +379,8 @@ const gchar* roleToString(AtkObject* object)
return "AXInvalid";
case ATK_ROLE_LABEL:
return "AXLabel";
+ case ATK_ROLE_LEVEL_BAR:
+ return "AXProgressIndicator";
case ATK_ROLE_LINK:
return "AXLink";
case ATK_ROLE_LIST:
@@ -1217,15 +1219,15 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
AtkRelationSet* relationSet = atk_object_ref_relation_set(ATK_OBJECT(m_element.get()));
if (!relationSet)
- return nullptr;
+ return JSStringCreateWithCharacters(0, 0);
AtkRelation* relation = atk_relation_set_get_relation_by_type(relationSet, ATK_RELATION_DESCRIBED_BY);
if (!relation)
- return nullptr;
+ return JSStringCreateWithCharacters(0, 0);
GPtrArray* targetList = atk_relation_get_target(relation);
if (!targetList || !targetList->len)
- return nullptr;
+ return JSStringCreateWithCharacters(0, 0);
StringBuilder builder;
builder.append("AXHelp: ");
@@ -1400,8 +1402,9 @@ double AccessibilityUIElement::maxValue()
JSRetainPtr<JSStringRef> AccessibilityUIElement::valueDescription()
{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
+ String valueText = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "valuetext");
+ GUniquePtr<gchar> valueDescription(g_strdup_printf("AXValueDescription: %s", valueText.utf8().data()));
+ return JSStringCreateWithUTF8CString(valueDescription.get());
}
int AccessibilityUIElement::insertionPointLineNumber()
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp
index 95ed46d00..7a30b9d6e 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp
@@ -52,7 +52,7 @@ public:
public Q_SLOTS:
void timerFired()
{
- InjectedBundle::shared().testRunner()->waitToDumpWatchdogTimerFired();
+ InjectedBundle::singleton().testRunner()->waitToDumpWatchdogTimerFired();
}
private:
@@ -80,11 +80,8 @@ void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded()
if (m_waitToDumpWatchdogTimer.isActive())
return;
- if (m_timeout > 0)
- timerInterval = m_timeout;
- else
- timerInterval = waitToDumpWatchdogTimerInterval * 1000;
+ timerInterval = m_timeout;
m_waitToDumpWatchdogTimer.start(timerInterval);
}
@@ -107,10 +104,9 @@ JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
return url;
}
-JSRetainPtr<JSStringRef> TestRunner::platformName()
+JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL()
{
- JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("qt"));
- return platformName;
+ return JSStringCreateWithUTF8CString("qrc:/webkit/inspector/UserInterface/TestStub.html");
}
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h
index 461d87990..56bfbee88 100644
--- a/Tools/WebKitTestRunner/TestController.h
+++ b/Tools/WebKitTestRunner/TestController.h
@@ -314,8 +314,8 @@ private:
std::unique_ptr<EventSenderProxy> m_eventSenderProxy;
#if PLATFORM(QT)
- class RunLoop;
- RunLoop* m_runLoop;
+ class RunLoopQt;
+ RunLoopQt* m_runLoop;
#endif
WorkQueueManager m_workQueueManager;
diff --git a/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp b/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
index e16e3efe0..8fdf331db 100644
--- a/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
+++ b/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
@@ -28,11 +28,11 @@
#include "PlatformWebView.h"
#include "TestController.h"
-#include <QGraphicsSceneMouseEvent>
+#include <QApplication>
#include <QKeyEvent>
#include <QtTest/QtTest>
-#include <WebKit2/WKPagePrivate.h>
-#include <WebKit2/WKStringQt.h>
+#include <WebKit/WKPagePrivate.h>
+#include <WebKit/WKStringQt.h>
#include <qpa/qwindowsysteminterface.h>
namespace WTR {
diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
index 510b0465e..ea322093c 100644
--- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
+++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
@@ -30,12 +30,12 @@
#include "qquickwebpage_p.h"
#include "qquickwebview_p.h"
-#include <QCoreApplication>
+#include <QApplication>
#include <QEventLoop>
#include <QQmlProperty>
#include <QtQuick/QQuickView>
#include <QtQuick/private/qquickwindow_p.h>
-#include <WebKit2/WKImageQt.h>
+#include <WebKit/WKImageQt.h>
#include <qpa/qwindowsysteminterface.h>
namespace WTR {
@@ -107,6 +107,11 @@ PlatformWebView::~PlatformWebView()
m_modalEventLoop->exit();
}
+void PlatformWebView::setWindowIsKey(bool isKey)
+{
+ m_windowIsKey = isKey;
+}
+
void PlatformWebView::resizeTo(unsigned width, unsigned height)
{
// If we do not have a platform window we will never get the necessary
diff --git a/Tools/WebKitTestRunner/qt/TestControllerQt.cpp b/Tools/WebKitTestRunner/qt/TestControllerQt.cpp
index 9d3515c82..dd1f3cfbf 100644
--- a/Tools/WebKitTestRunner/qt/TestControllerQt.cpp
+++ b/Tools/WebKitTestRunner/qt/TestControllerQt.cpp
@@ -28,7 +28,6 @@
#include "TestController.h"
#include "PlatformWebView.h"
-#include "WKStringQt.h"
#include <cstdlib>
#include <QCoreApplication>
@@ -38,16 +37,17 @@
#include <QObject>
#include <QTimer>
#include <QtGlobal>
+#include <WebKit/WKStringQt.h>
#include <qquickwebview_p.h>
#include <wtf/Platform.h>
#include <wtf/text/WTFString.h>
namespace WTR {
-class TestController::RunLoop : public QObject {
+class TestController::RunLoopQt : public QObject {
Q_OBJECT
public:
- RunLoop();
+ RunLoopQt();
void runUntil(double timeout);
void notifyDone();
@@ -61,14 +61,14 @@ private:
bool m_runUntilLoopClosePending;
};
-TestController::RunLoop::RunLoop()
+TestController::RunLoopQt::RunLoopQt()
: m_runUntilLoopClosePending(false)
{
m_runUntilLoopTimer.setSingleShot(true);
QObject::connect(&m_runUntilLoopTimer, SIGNAL(timeout()), this, SLOT(timerFired()));
}
-void TestController::RunLoop::runUntil(double timeout)
+void TestController::RunLoopQt::runUntil(double timeout)
{
ASSERT(!m_runUntilLoop.isRunning());
if (timeout) {
@@ -78,7 +78,7 @@ void TestController::RunLoop::runUntil(double timeout)
m_runUntilLoop.exec(QEventLoop::ExcludeUserInputEvents);
}
-void TestController::RunLoop::notifyDone()
+void TestController::RunLoopQt::notifyDone()
{
if (m_modalLoop.isRunning()) {
// Wait for the modal loop first. We only kill it if we timeout.
@@ -90,7 +90,7 @@ void TestController::RunLoop::notifyDone()
m_runUntilLoop.exit();
}
-void TestController::RunLoop::timerFired()
+void TestController::RunLoopQt::timerFired()
{
if (m_modalLoop.isRunning()) {
m_runUntilLoopClosePending = true;
@@ -101,7 +101,7 @@ void TestController::RunLoop::timerFired()
m_runUntilLoop.exit();
}
-void TestController::RunLoop::runModal(PlatformWebView* view)
+void TestController::RunLoopQt::runModal(PlatformWebView* view)
{
ASSERT(!m_modalLoop.isRunning());
view->setModalEventLoop(&m_modalLoop);
@@ -118,10 +118,15 @@ void TestController::notifyDone()
void TestController::platformInitialize()
{
- m_runLoop = new RunLoop;
+ m_runLoop = new RunLoopQt;
QQuickWebView::platformInitialize();
}
+WKPreferencesRef TestController::platformPreferences()
+{
+ return WKPageGroupGetPreferences(m_pageGroup.get());
+}
+
void TestController::platformDestroy()
{
delete m_runLoop;
@@ -130,7 +135,7 @@ void TestController::platformDestroy()
void TestController::platformRunUntil(bool& condition, double timeout)
{
UNUSED_PARAM(condition);
- const bool shouldTimeout = !(qgetenv("QT_WEBKIT2_DEBUG") == "1" || timeout == m_noTimeout);
+ const bool shouldTimeout = !(qgetenv("QT_WEBKIT2_DEBUG") == "1" || timeout <= 0);
m_runLoop->runUntil(shouldTimeout ? timeout : 0);
}
@@ -175,7 +180,7 @@ void TestController::platformInitializeContext()
void TestController::runModal(PlatformWebView* view)
{
- shared().m_runLoop->runModal(view);
+ singleton().m_runLoop->runModal(view);
}
const char* TestController::platformLibraryPathForTesting()
diff --git a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
index ac6aaf1ec..a1237a05e 100644
--- a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
+++ b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
@@ -32,7 +32,7 @@
#include <QBuffer>
#include <QCryptographicHash>
#include <QtGui/QPainter>
-#include <WebKit2/WKImageQt.h>
+#include <WebKit/WKImageQt.h>
#include <stdio.h>
#include <wtf/Assertions.h>
diff --git a/Tools/qt/make-snapshot.pl b/Tools/qt/make-snapshot.pl
new file mode 100755
index 000000000..27c5621d6
--- /dev/null
+++ b/Tools/qt/make-snapshot.pl
@@ -0,0 +1,40 @@
+#!/usr/bin/env perl
+
+use Cwd;
+use File::Basename;
+use strict;
+use warnings;
+
+sub usage {
+ my $msg = shift || "";
+ die $msg . "Usage: cd target/repo/path; $0 src/repo/path";
+}
+
+scalar @ARGV == 0 || usage();
+-f "ChangeLog" && die "This script must be run in snapshots repository";
+-d ".git" || usage();
+
+`git status` =~ "nothing to commit, working tree clean" or die "Target working tree is dirty";
+
+my $src_repo = dirname(dirname(dirname(__FILE__)));
+my $target_repo = getcwd();
+
+chdir $src_repo;
+(-f "ChangeLog" && -x "Tools/gtk/make-dist.py") or usage("Target repository path is invalid!\n");
+my $commit = `git rev-parse HEAD` or usage("Cannot get HEAD revision in target repo!\n");
+chomp $commit;
+
+my @commands = (
+ "Tools/gtk/make-dist.py -t snapshot Tools/qt/manifest.txt",
+ "cd $target_repo",
+ "git rm -rf *",
+ "tar -xf $src_repo/snapshot.tar --strip-components=1",
+ "git add -A",
+ "rm $src_repo/snapshot.tar",
+ "git commit -m 'Imported WebKit commit $commit'"
+);
+
+my $cmd = join " && ", @commands;
+print "Executing $cmd\n";
+
+exec $cmd;