diff options
Diffstat (limited to 'Source/WebCore')
-rw-r--r-- | Source/WebCore/platform/graphics/qt/GradientQt.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/CookieJarQt.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp | 13 |
3 files changed, 9 insertions, 12 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()); |