summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2019-08-06 19:40:03 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2019-08-13 20:24:44 +0300
commit688ec88511dedc1de04b4438c26ef071c55de4e8 (patch)
treec98e42ebc677f28518311513ec82d13fda994613
parentb38ffac98772e2c544c212872a2664078a363cfd (diff)
Import QtWebKit commit 58390740ab21cbf3ad8d7b51972c9b24fdf58a9c
Change-Id: Ia730b2ca3e5c8c1556fed3301cdf2da7cfbd802f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
-rw-r--r--Source/WebCore/platform/graphics/qt/GradientQt.cpp6
-rw-r--r--Source/WebCore/platform/network/qt/CookieJarQt.cpp2
-rw-r--r--Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp13
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp5
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.h3
-rw-r--r--Source/WebKit/qt/WidgetApi/qwebpage.cpp2
-rw-r--r--Source/WebKit/qt/tests/CMakeLists.txt2
-rw-r--r--Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp1
-rw-r--r--Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp6
-rw-r--r--Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp30
-rw-r--r--Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp8
-rw-r--r--Source/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp7
-rw-r--r--Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp62
-rw-r--r--Source/WebKit/qt/tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp4
-rw-r--r--Tools/Scripts/webkitperl/FeatureList.pm2
-rw-r--r--Tools/qmake/mkspecs/features/functions.prf2
-rw-r--r--Tools/qt/jhbuild-qt-5.4.modules1
-rw-r--r--Tools/qt/jhbuild.modules61
-rw-r--r--Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch10
-rw-r--r--Tools/qt/patches/openwebrtc-no-gtk-doc.patch60
-rw-r--r--Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch50
-rwxr-xr-xTools/qt/update-wip-qtwebkit-refs47
22 files changed, 166 insertions, 218 deletions
diff --git a/Source/WebCore/platform/graphics/qt/GradientQt.cpp b/Source/WebCore/platform/graphics/qt/GradientQt.cpp
index 3412cfadd..2c3dec5ba 100644
--- a/Source/WebCore/platform/graphics/qt/GradientQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GradientQt.cpp
@@ -66,6 +66,10 @@ QGradient* Gradient::platformGradient()
qreal lastStop(0.0);
const qreal lastStopDiff = 0.0000001;
while (stopIterator != m_stops.end()) {
+ // Drop gradient stops after 1.0 to avoid overwriting color at 1.0
+ if (lastStop >= 1)
+ break;
+
stopColor.setRgbF(stopIterator->red, stopIterator->green, stopIterator->blue, stopIterator->alpha);
if (qFuzzyCompare(lastStop, qreal(stopIterator->stop)))
lastStop = stopIterator->stop + lastStopDiff;
@@ -78,6 +82,8 @@ QGradient* Gradient::platformGradient()
lastStop += innerRadius / outerRadius;
}
+ // Clamp stop position to 1.0, otherwise QGradient will ignore it
+ // https://bugs.webkit.org/show_bug.cgi?id=41484
qreal stopPosition = qMin(lastStop, qreal(1.0f));
if (m_radial && reversed)
diff --git a/Source/WebCore/platform/network/qt/CookieJarQt.cpp b/Source/WebCore/platform/network/qt/CookieJarQt.cpp
index d1cf87fdd..0e05e677b 100644
--- a/Source/WebCore/platform/network/qt/CookieJarQt.cpp
+++ b/Source/WebCore/platform/network/qt/CookieJarQt.cpp
@@ -123,7 +123,7 @@ String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const
bool cookiesEnabled(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/)
{
- return true;
+ return session.context() ? session.context()->networkAccessManager()->cookieJar() : SharedCookieJarQt::shared();
}
bool getRawCookies(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& /*url*/, Vector<Cookie>& rawCookies)
diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 0ce68838e..48432d974 100644
--- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -588,19 +588,10 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
m_replyWrapper->reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(),
m_replyWrapper->encoding());
- if (url.isLocalFile()) {
- if (client->usesAsyncCallbacks()) {
- setLoadingDeferred(true);
- client->didReceiveResponseAsync(m_resourceHandle, response);
- } else
- client->didReceiveResponse(m_resourceHandle, response);
- return;
- }
-
- // The status code is equal to 0 for protocols not in the HTTP family.
- int statusCode = m_replyWrapper->reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
if (url.protocolIsInHTTPFamily()) {
+ // The status code is equal to 0 for protocols not in the HTTP family.
+ int statusCode = m_replyWrapper->reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
response.setHTTPStatusCode(statusCode);
response.setHTTPStatusText(m_replyWrapper->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray().constData());
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index d552cec17..3cbb831af 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -600,6 +600,7 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::FullScreenSupportEnabled, true);
d->attributes.insert(QWebSettings::ImagesEnabled, true);
d->attributes.insert(QWebSettings::AllowRunningInsecureContent, false);
+ d->attributes.insert(QWebSettings::ErrorPageEnabled, true);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
d->thirdPartyCookiePolicy = AlwaysAllowThirdPartyCookies;
@@ -936,10 +937,8 @@ void QWebSettings::clearMemoryCaches()
// FastMalloc has lock-free thread specific caches that can only be cleared from the thread itself.
WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads();
-#if ENABLE(WORKERS)
WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads();
-#endif
- WTF::releaseFastMallocFreeMemory();
+ WTF::releaseFastMallocFreeMemory();
}
/*!
diff --git a/Source/WebKit/qt/Api/qwebsettings.h b/Source/WebKit/qt/Api/qwebsettings.h
index 0b0a1f00a..2c22fb46e 100644
--- a/Source/WebKit/qt/Api/qwebsettings.h
+++ b/Source/WebKit/qt/Api/qwebsettings.h
@@ -92,7 +92,8 @@ public:
WebSecurityEnabled,
FullScreenSupportEnabled,
ImagesEnabled,
- AllowRunningInsecureContent
+ AllowRunningInsecureContent,
+ ErrorPageEnabled
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
index f8d8c0abc..b27ac1357 100644
--- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp
+++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp
@@ -3219,7 +3219,7 @@ bool QWebPage::supportsExtension(Extension extension) const
if (extension == ChooseMultipleFilesExtension)
return true;
#endif
- return extension == ErrorPageExtension;
+ return extension == ErrorPageExtension && d->settings->testAttribute(QWebSettings::ErrorPageEnabled);
}
/*!
diff --git a/Source/WebKit/qt/tests/CMakeLists.txt b/Source/WebKit/qt/tests/CMakeLists.txt
index 3dc6af1d5..42d636573 100644
--- a/Source/WebKit/qt/tests/CMakeLists.txt
+++ b/Source/WebKit/qt/tests/CMakeLists.txt
@@ -14,6 +14,8 @@ include_directories(SYSTEM
${Qt5Test_INCLUDE_DIRS}
)
+add_definitions(-DTESTS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}/")
+
if (ENABLE_TEST_SUPPORT)
add_definitions(-DHAVE_QTTESTSUPPORT)
endif ()
diff --git a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 0fd5d0a85..8417d0ef7 100644
--- a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -190,6 +190,7 @@ void tst_QGraphicsWebView::widgetsRenderingThroughCache()
// 1. Reference without tiling.
webView->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, false);
QPixmap referencePixmap(view.size());
+ QApplication::processEvents();
widget->render(&referencePixmap);
// 2. With tiling.
diff --git a/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index 32935e6a2..4ca5fe5f9 100644
--- a/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/Source/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -74,9 +74,9 @@ private Q_SLOTS:
void addElementToHead();
private:
- QWebView* m_view;
- QWebPage* m_page;
- QWebFrame* m_mainFrame;
+ QWebView* m_view { nullptr };
+ QWebPage* m_page { nullptr };
+ QWebFrame* m_mainFrame { nullptr };
};
tst_QWebElement::tst_QWebElement()
diff --git a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index a4056f996..2068eec3f 100644
--- a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -99,10 +99,10 @@ private Q_SLOTS:
void loadInSignalHandlers();
private:
- QWebView* m_view;
- QWebPage* m_page;
- QWebView* m_inputFieldsTestView;
- int m_inputFieldTestPaintCount;
+ QWebView* m_view { nullptr };
+ QWebPage* m_page { nullptr };
+ QWebView* m_inputFieldsTestView { nullptr };
+ int m_inputFieldTestPaintCount { 0 };
};
bool tst_QWebFrame::eventFilter(QObject* watched, QEvent* event)
@@ -341,11 +341,21 @@ void tst_QWebFrame::requestedUrlAfterSetAndLoadFailures()
const QUrl second("http://abcdef.abcdef/another_page.html");
QVERIFY(first != second);
+ page.settings()->setAttribute(QWebSettings::ErrorPageEnabled, false);
+
frame->load(second);
::waitForSignal(frame, SIGNAL(loadFinished(bool)));
QCOMPARE(frame->url(), first);
QCOMPARE(frame->requestedUrl(), second);
QVERIFY(!spy.at(1).first().toBool());
+
+ page.settings()->setAttribute(QWebSettings::ErrorPageEnabled, true);
+
+ frame->load(second);
+ ::waitForSignal(frame, SIGNAL(loadFinished(bool)));
+ QCOMPARE(frame->url(), second);
+ QCOMPARE(frame->requestedUrl(), second);
+ QVERIFY(!spy.at(2).first().toBool());
}
void tst_QWebFrame::javaScriptWindowObjectCleared_data()
@@ -463,7 +473,7 @@ void tst_QWebFrame::setHtmlWithBaseURL()
QDir::setCurrent(TESTS_SOURCE_DIR);
- QString html("<html><body><p>hello world</p><img src='resources/image2.png'/></body></html>");
+ QString html("<html><body><p>hello world</p><img src='qwebframe/resources/image.png'/></body></html>");
QWebPage page;
QWebFrame* frame = page.mainFrame();
@@ -1268,7 +1278,7 @@ void tst_QWebFrame::setUrlHistory()
QCOMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(frame->url(), url);
QCOMPARE(frame->requestedUrl(), url);
- QCOMPARE(m_page->history()->count(), 0);
+ QCOMPARE(m_page->history()->count(), 1);
url = QUrl("qrc:/test1.html");
frame->setUrl(url);
@@ -1277,14 +1287,14 @@ void tst_QWebFrame::setUrlHistory()
QCOMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(frame->url(), url);
QCOMPARE(frame->requestedUrl(), url);
- QCOMPARE(m_page->history()->count(), 1);
+ QCOMPARE(m_page->history()->count(), 2);
frame->setUrl(QUrl());
expectedLoadFinishedCount++;
QCOMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(frame->url(), aboutBlank);
QCOMPARE(frame->requestedUrl(), QUrl());
- QCOMPARE(m_page->history()->count(), 1);
+ QCOMPARE(m_page->history()->count(), 2);
// Loading same page as current in history, so history count doesn't change.
url = QUrl("qrc:/test1.html");
@@ -1294,7 +1304,7 @@ void tst_QWebFrame::setUrlHistory()
QCOMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(frame->url(), url);
QCOMPARE(frame->requestedUrl(), url);
- QCOMPARE(m_page->history()->count(), 1);
+ QCOMPARE(m_page->history()->count(), 2);
url = QUrl("qrc:/test2.html");
frame->setUrl(url);
@@ -1303,7 +1313,7 @@ void tst_QWebFrame::setUrlHistory()
QCOMPARE(spy.count(), expectedLoadFinishedCount);
QCOMPARE(frame->url(), url);
QCOMPARE(frame->requestedUrl(), url);
- QCOMPARE(m_page->history()->count(), 2);
+ QCOMPARE(m_page->history()->count(), 3);
}
void tst_QWebFrame::setUrlUsingStateObject()
diff --git a/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
index 17488ebb9..8df3d26d6 100644
--- a/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
+++ b/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
@@ -70,11 +70,11 @@ private Q_SLOTS:
private:
- QWebPage* page;
- QWebFrame* frame;
- QWebHistory* hist;
+ QWebPage* page { nullptr };
+ QWebFrame* frame { nullptr };
+ QWebHistory* hist { nullptr };
QScopedPointer<SignalBarrier> loadFinishedBarrier;
- int histsize;
+ int histsize {0};
};
tst_QWebHistory::tst_QWebHistory()
diff --git a/Source/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp b/Source/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
index 1612eb7b9..91d1c997f 100644
--- a/Source/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
+++ b/Source/WebKit/qt/tests/qwebhistoryinterface/tst_qwebhistoryinterface.cpp
@@ -42,11 +42,8 @@ private Q_SLOTS:
void visitedLinks();
private:
-
-
-private:
- QWebView* m_view;
- QWebPage* m_page;
+ QWebView* m_view { nullptr };
+ QWebPage* m_page { nullptr };
};
tst_QWebHistoryInterface::tst_QWebHistoryInterface()
diff --git a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 760a242af..db4c911e6 100644
--- a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -173,7 +173,6 @@ private Q_SLOTS:
void errorPageExtension();
void errorPageExtensionInIFrames();
void errorPageExtensionInFrameset();
- void errorPageExtensionLoadFinished();
void userAgentApplicationName();
void userAgentNewlineStripping();
void undoActionHaveCustomText();
@@ -217,8 +216,8 @@ private Q_SLOTS:
#endif
private:
- QWebView* m_view;
- QWebPage* m_page;
+ QWebView* m_view { nullptr };
+ QWebPage* m_page { nullptr };
QString tmpDirPath() const
{
static QString tmpd = QDir::tempPath() + "/tst_qwebpage-"
@@ -379,7 +378,7 @@ public:
}
private:
- bool m_allowGeolocation;
+ bool m_allowGeolocation { false };
};
// [Qt] tst_QWebPage::infiniteLoopJS() timeouts with DFG JIT
@@ -2755,35 +2754,6 @@ void tst_QWebPage::errorPageExtensionInFrameset()
m_view->setPage(0);
}
-void tst_QWebPage::errorPageExtensionLoadFinished()
-{
- ErrorPage page;
- m_view->setPage(&page);
-
- QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool)));
- QSignalSpy spyFrameLoadFinished(m_view->page()->mainFrame(), SIGNAL(loadFinished(bool)));
-
- m_view->setUrl(QUrl("data:text/html,foo"));
- QTRY_COMPARE(spyLoadFinished.count(), 1);
- QTRY_COMPARE(spyFrameLoadFinished.count(), 1);
-
- const bool loadSucceded = spyLoadFinished.at(0).at(0).toBool();
- QVERIFY(loadSucceded);
- const bool frameLoadSucceded = spyFrameLoadFinished.at(0).at(0).toBool();
- QVERIFY(frameLoadSucceded);
-
- m_view->page()->mainFrame()->setUrl(QUrl("http://non.existent/url"));
- QTRY_COMPARE(spyLoadFinished.count(), 2);
- QTRY_COMPARE(spyFrameLoadFinished.count(), 2);
-
- const bool nonExistantLoadSucceded = spyLoadFinished.at(1).at(0).toBool();
- QVERIFY(nonExistantLoadSucceded);
- const bool nonExistantFrameLoadSucceded = spyFrameLoadFinished.at(1).at(0).toBool();
- QVERIFY(nonExistantFrameLoadSucceded);
-
- m_view->setPage(0);
-}
-
class FriendlyWebPage : public QWebPage
{
public:
@@ -2926,15 +2896,13 @@ void tst_QWebPage::originatingObjectInNetworkRequests()
m_page->setNetworkAccessManager(networkManager);
networkManager->requests.clear();
- m_view->setHtml(QString("<frameset cols=\"25%,75%\"><frame src=\"data:text/html,"
- "<head><meta http-equiv='refresh' content='1'></head>foo \">"
- "<frame src=\"data:text/html,bar\"></frameset>"), QUrl());
+ m_view->setHtml(QString("<frameset cols=\"25%,75%\"><frame src=\"qrc:///frame_c.html\">"
+ "<frame src=\"qrc:///frame_b.html\"></frameset>"), QUrl());
QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));
QCOMPARE(networkManager->requests.count(), 2);
QList<QWebFrame*> childFrames = m_page->mainFrame()->childFrames();
- QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=118660", Continue);
QCOMPARE(childFrames.count(), 2);
for (int i = 0; i < 2; ++i)
@@ -3102,15 +3070,6 @@ void tst_QWebPage::findText()
}
}
-static QString getMimeTypeForExtension(const QString &ext)
-{
- QMimeType mimeType = QMimeDatabase().mimeTypeForFile(QStringLiteral("filename.") + ext.toLower(), QMimeDatabase::MatchExtension);
- if (mimeType.isValid() && !mimeType.isDefault())
- return mimeType.name();
-
- return QString();
-}
-
void tst_QWebPage::supportedContentType()
{
QStringList contentTypes;
@@ -3118,19 +3077,14 @@ void tst_QWebPage::supportedContentType()
// Add supported non image types...
contentTypes << "text/html" << "text/xml" << "text/xsl" << "text/plain" << "text/"
<< "application/xml" << "application/xhtml+xml" << "application/vnd.wap.xhtml+xml"
- << "application/rss+xml" << "application/atom+xml" << "application/json";
+ << "application/rss+xml" << "application/atom+xml" << "application/json"
+ // Add JPEG MIME type
+ << "image/jpeg";
#if ENABLE_MHTML
contentTypes << "application/x-mimearchive";
#endif
- // Add supported image types...
- Q_FOREACH(const QByteArray& imageType, QImageWriter::supportedImageFormats()) {
- const QString mimeType = getMimeTypeForExtension(imageType);
- if (!mimeType.isEmpty())
- contentTypes << mimeType;
- }
-
// Get the mime types supported by webkit...
const QStringList supportedContentTypes = m_page->supportedContentTypes();
diff --git a/Source/WebKit/qt/tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp b/Source/WebKit/qt/tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp
index a15838274..225c42d0a 100644
--- a/Source/WebKit/qt/tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp
+++ b/Source/WebKit/qt/tests/qwebsecurityorigin/tst_qwebsecurityorigin.cpp
@@ -38,8 +38,8 @@ private slots:
void whiteList_data();
void whiteList();
private:
- QWebView* m_view;
- QWebPage* m_page;
+ QWebView* m_view { nullptr };
+ QWebPage* m_page { nullptr };
};
tst_QWebSecurityOrigin::tst_QWebSecurityOrigin()
diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm
index 067779122..919c85875 100644
--- a/Tools/Scripts/webkitperl/FeatureList.pm
+++ b/Tools/Scripts/webkitperl/FeatureList.pm
@@ -233,7 +233,7 @@ my @features = (
define => "ENABLE_CSS_REGIONS", default => 1, value => \$cssRegionsSupport },
{ option => "css-compositing", desc => "Toggle CSS Compositing support",
- define => "ENABLE_CSS_COMPOSITING", default => isAppleWebKit(), value => \$cssCompositingSupport },
+ define => "ENABLE_CSS_COMPOSITING", default => (isAppleWebKit() || isQt()), value => \$cssCompositingSupport },
{ option => "custom-elements", desc => "Toggle custom elements support",
define => "ENABLE_CUSTOM_ELEMENTS", default => (isAppleMacWebKit() || isIOSWebKit()), value => \$customElementsSupport },
diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
index 213e482d1..e3f42cec4 100644
--- a/Tools/qmake/mkspecs/features/functions.prf
+++ b/Tools/qmake/mkspecs/features/functions.prf
@@ -82,7 +82,7 @@ defineTest(isPlatformSupported) {
}
}
} else {
- skipBuild("MinGW build skipped.")
+ isGCCVersionSupported()
}
} else: macos {
# We require macOS 10.10 (darwin version 14.0.0) or newer
diff --git a/Tools/qt/jhbuild-qt-5.4.modules b/Tools/qt/jhbuild-qt-5.4.modules
index 194335129..0bffc61a0 100644
--- a/Tools/qt/jhbuild-qt-5.4.modules
+++ b/Tools/qt/jhbuild-qt-5.4.modules
@@ -69,6 +69,7 @@
<patch file="qtbase-5.4-add-macros-for-enabling-disabling-warnings.patch" strip="1"/>
<patch file="qtbase-5.4-fix-Clang-warning-about-inconsistent-use-of-C-11-ove.patch" strip="1"/>
<patch file="qtbase-5.4-fix-gcc-Wsuggest-override-warning-on-Q_OBJECT.patch" strip="1"/>
+ <patch file="qtbase-5.4-fix-QTBUG-77231.patch" strip="1"/>
</branch>
<dependencies>
<dep package="fontconfig"/>
diff --git a/Tools/qt/jhbuild.modules b/Tools/qt/jhbuild.modules
index b3e0c5101..2c8ba1384 100644
--- a/Tools/qt/jhbuild.modules
+++ b/Tools/qt/jhbuild.modules
@@ -17,7 +17,6 @@
<dep package="gst-plugins-good"/>
<dep package="gst-plugins-bad"/>
<dep package="gst-libav"/>
- <dep package="openwebrtc"/>
<dep package="qt"/>
<if condition-set="linux">
<dep package="llvm"/>
@@ -75,7 +74,8 @@
</branch>
</autotools>
- <autotools id="harfbuzz" autogen-sh="configure">
+ <autotools id="harfbuzz" autogen-sh="configure"
+ autogenargs="--with-cairo=no">
<dependencies>
<dep package="icu"/>
</dependencies>
@@ -107,22 +107,21 @@
</branch>
</autotools>
- <autotools id="fontconfig"
- autogen-sh="configure"
- autogenargs="--enable-libxml2">
+ <autotools id="fontconfig"
+ autogenargs="--enable-libxml2 --disable-docs"
+ supports-non-srcdir-builds="no">
+ <if condition-set="macos">
+ <autogenargs value="--with-add-fonts=/System/Library/Fonts,/Library/Fonts,~/Library/Fonts"/>
+ </if>
<dependencies>
<dep package="freetype6"/>
<dep package="libxml2"/>
</dependencies>
- <branch module="software/fontconfig/release/fontconfig-2.11.1.tar.gz" version="2.11.1"
+ <branch module="software/fontconfig/release/fontconfig-2.12.4.tar.bz2" version="2.12.4"
repo="freedesktop.org"
- hash="sha256:b6b066c7dce3f436fdc0dfbae9d36122b38094f4f53bd8dffd45e195b0540d8d"
- md5sum="e75e303b4f7756c2b16203a57ac87eba">
- <patch file="fontconfig-2.11.1-no-bitmaps.patch" strip="0"/>
- </branch>
+ hash="sha256:668293fcc4b3c59765cdee5cee05941091c0879edcc24dfec5455ef83912e45c"/>
</autotools>
-
<autotools id="libxml2" supports-non-srcdir-builds="no"
autogen-sh="./autogen.sh; ./configure --without-python --without-valid --without-xinclude --without-xptr --without-c14n --without-catalog --without-regexps --without-zlib --without-lzma --without-schemas --without-schematron --without-threads --without-legacy --without-http --without-iconv --with-icu">
<dependencies>
@@ -221,46 +220,6 @@
md5sum="361638fa45466c5050bcde6bfe10fa46"/>
</autotools>
- <autotools id="libusrsctp" supports-non-srcdir-builds="no" autogen-sh="./bootstrap; ./configure --disable-warnings-as-errors">
- <branch repo="github.com" module="sctplab/usrsctp.git" checkoutdir="usrsctp" tag="078ff3252f73327e0ac11d6fd5eff62011f6646e"/>
- </autotools>
-
- <autotools id="gst-plugins-openwebrtc" supports-parallel-builds="no" supports-non-srcdir-builds="no" autogen-sh="./autogen.sh; ./configure">
- <if condition-set="macos">
- <makeargs value="CFLAGS+=-Wno-error"/>
- </if>
- <dependencies>
- <dep package="gst-plugins-base"/>
- <dep package="libusrsctp"/>
- </dependencies>
- <branch repo="github.com" module="EricssonResearch/openwebrtc-gst-plugins.git" checkoutdir="gst-plugins-openwebrtc" tag="e359b67484af90f416ea35e301205d2b53c77a14"/>
- </autotools>
-
- <autotools id="libnice" supports-non-srcdir-builds="no">
- <dependencies>
- <dep package="gstreamer"/>
- </dependencies>
- <branch repo="nice.freedesktop.org" module="releases/libnice-0.1.10.tar.gz" checkoutdir="libnice" version="0.1.10"
- hash="sha256:1dbfb663b730889ae8cab13a2913fe557d581f70b513c918bbbd0b7d3eefebc9"
- md5sum="27b62d0093ce29a39df1c6fcf0bb4396" size="903083">
- </branch>
- </autotools>
-
- <autotools id="openwebrtc" autogenargs="--enable-bridge=no --enable-owr-gst=yes --disable-tests">
- <if condition-set="macos">
- <makeargs value="CFLAGS+=-Wno-error"/>
- </if>
- <dependencies>
- <dep package="gst-plugins-openwebrtc"/>
- <dep package="libnice"/>
- </dependencies>
- <branch repo="github.com-tarball" module="EricssonResearch/openwebrtc/archive/13516c7f79a0c48bb411464f7613d4b426c70f5b.tar.gz" checkoutdir="openwebrtc" version="13516c7f79a0c48bb411464f7613d4b426c70f5b"
- hash="sha256:c849d36d97c17a198a5d9c180f13f14c7897c9236e2384ea11029e23b09b59ac"
- md5sum="13516c7f79a0c48bb411464f7613d4b426c70f5b.tar.gz" size="258936">
- <patch file="openwebrtc-no-gtk-doc.patch" strip="1"/>
- </branch>
- </autotools>
-
<autotools id="icu"
autogen-sh="./source/configure"
autogenargs="--disable-samples --enable-weak-threads">
diff --git a/Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch b/Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch
deleted file mode 100644
index 03babba2d..000000000
--- a/Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- conf.d/Makefile.in.old 2016-06-23 19:00:01.309774583 +0300
-+++ conf.d/Makefile.in 2016-06-23 19:00:23.542159140 +0300
-@@ -341,6 +341,7 @@
- 65-fonts-persian.conf \
- 65-nonlatin.conf \
- 69-unifont.conf \
-+ 70-no-bitmaps.conf \
- 80-delicious.conf \
- 90-synthetic.conf
-
diff --git a/Tools/qt/patches/openwebrtc-no-gtk-doc.patch b/Tools/qt/patches/openwebrtc-no-gtk-doc.patch
deleted file mode 100644
index fb665e7d2..000000000
--- a/Tools/qt/patches/openwebrtc-no-gtk-doc.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/autogen.sh b/autogen.sh
-index 2c45ea9..878cf05 100755
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -6,27 +6,42 @@
- srcdir=`dirname $0`
- (test -d $srcdir/m4) || mkdir $srcdir/m4
-
--pushd $srcdir > /dev/null
--gtkdocize && \
--autoreconf --verbose --force --install --make || {
-- echo 'autogen.sh failed';
-- exit 1;
--}
--
--popd > /dev/null
--
--while test "x$@" != "x" ; do
--optarg=`expr "x$@" : 'x[^=]*=\(.*\)'`
--case "$@" in
-+for ag_option in $@
-+do
-+case $ag_option in
- --noconfigure)
- NOCONFIGURE=defined
- AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure"
- echo "+ configure run disabled"
-- shift
-+ ;;
-+ --disable-gtk-doc)
-+ enable_gtk_doc=no
-+ echo "+ gtk-doc disabled"
- ;;
- esac
- done
-
-+pushd $srcdir > /dev/null
-+
-+if test x$enable_gtk_doc = xno; then
-+ if test -f gtk-doc.make; then :; else
-+ echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make
-+ fi
-+ echo "WARNING: You have disabled gtk-doc."
-+ echo " As a result, you will not be able to generate the API"
-+ echo " documentation and 'make dist' will not work."
-+ echo
-+else
-+ gtkdocize || exit $?
-+fi
-+
-+autoreconf --verbose --force --install --make || {
-+ echo 'autogen.sh failed';
-+ exit 1;
-+}
-+
-+popd > /dev/null
-+
- for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done
- if test ! -z "$CONFIGURE_EXT_OPT"
- then
diff --git a/Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch b/Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch
new file mode 100644
index 000000000..6858e585c
--- /dev/null
+++ b/Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch
@@ -0,0 +1,50 @@
+--- a/src/gui/painting/qdrawhelper.cpp 2014-12-05 19:24:36.000000000 +0300
++++ b/src/gui/painting/qdrawhelper.cpp 2019-08-03 15:31:42.034910641 +0300
+@@ -3506,8 +3506,10 @@
+ }
+
+ /*
+- if Sca.Da + Dca.Sa >= Sa.Da
++ if Sca.Da + Dca.Sa > Sa.Da
+ Dca' = Sa.Da + Sca.(1 - Da) + Dca.(1 - Sa)
++ else if Sca == Sa
++ Dca' = Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa)
+ otherwise
+ Dca' = Dca.Sa/(1-Sca/Sa) + Sca.(1 - Da) + Dca.(1 - Sa)
+ */
+@@ -3518,8 +3520,10 @@
+ const int src_da = src * da;
+
+ const int temp = src * (255 - da) + dst * (255 - sa);
+- if (src_da + dst_sa >= sa_da)
++ if (src_da + dst_sa > sa_da)
+ return qt_div_255(sa_da + temp);
++ else if (src == sa || sa == 0)
++ return qt_div_255(temp);
+ else
+ return qt_div_255(255 * dst_sa / (255 - 255 * src / sa) + temp);
+ }
+@@ -3589,8 +3593,10 @@
+ }
+
+ /*
+- if Sca.Da + Dca.Sa <= Sa.Da
++ if Sca.Da + Dca.Sa < Sa.Da
+ Dca' = Sca.(1 - Da) + Dca.(1 - Sa)
++ else if Sca == 0
++ Dca' = Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa)
+ otherwise
+ Dca' = Sa.(Sca.Da + Dca.Sa - Sa.Da)/Sca + Sca.(1 - Da) + Dca.(1 - Sa)
+ */
+@@ -3602,8 +3608,10 @@
+
+ const int temp = src * (255 - da) + dst * (255 - sa);
+
+- if (src == 0 || src_da + dst_sa <= sa_da)
++ if (src_da + dst_sa < sa_da)
+ return qt_div_255(temp);
++ else if (src == 0)
++ return qt_div_255(dst_sa + temp);
+ return qt_div_255(sa * (src_da + dst_sa - sa_da) / src + temp);
+ }
+
diff --git a/Tools/qt/update-wip-qtwebkit-refs b/Tools/qt/update-wip-qtwebkit-refs
new file mode 100755
index 000000000..b37f31ddd
--- /dev/null
+++ b/Tools/qt/update-wip-qtwebkit-refs
@@ -0,0 +1,47 @@
+#!/usr/bin/env perl
+# Copyright (C) 2019 Konstantin Tokarev <annulen@yandex.ru>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+use strict;
+use warnings;
+
+sub usage { print "Usage: $0 <remote> <commit>\n"; exit(1); }
+
+my ($remote, $commit) = @ARGV;
+defined $remote or usage();
+defined $commit or usage();
+
+print "Remote '$remote': ", `git remote get-url $remote`, "\n";
+$? == 0 or die "git exited with code $?";
+
+print `git --no-pager log --color -n1 --decorate=full $commit`;
+$? == 0 or die "git exited with code $?";
+
+print "\nDo you really want to switch wip/qtwebkit/5.212 to this commit? [y/N]";
+my $answer = <STDIN>;
+chomp $answer;
+lc $answer eq "y" or die "Got '$answer', exiting";
+
+print "git push -f $remote $commit:refs/heads/wip/qtwebkit/5.212 && git push -f $remote $commit:refs/staging/wip/qtwebkit/5.212\n";
+`git push -f $remote $commit:refs/heads/wip/qtwebkit/5.212 && git push -f $remote $commit:refs/staging/wip/qtwebkit/5.212`;
+$? == 0 or die "git exited with code $?";