diff options
| author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-09-30 23:10:45 +0200 |
|---|---|---|
| committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-09-30 23:10:45 +0200 |
| commit | dc79ad17bf7f40ace6b988e687e4d193615aa576 (patch) | |
| tree | 1981d0cf5de2c70ffb3f5c5260174c27aa7da522 /Source | |
| parent | 4b6772fbf7ec96eb95a0d32f2a3a2005147efeb7 (diff) | |
| parent | 2efedcdc92b15b5a29de5de370f92f11892498c3 (diff) | |
| download | qtwebkit-dc79ad17bf7f40ace6b988e687e4d193615aa576.tar.gz | |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ibd9bacebd17018d03e6e5bd93d171b18173c9ee7
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/JavaScriptCore/llint/LLIntData.cpp | 2 | ||||
| -rw-r--r-- | Source/WTF/wtf/Platform.h | 5 | ||||
| -rw-r--r-- | Source/WebCore/platform/network/qt/ResourceRequestQt.cpp | 58 | ||||
| -rw-r--r-- | Source/WebKit/WebKit1.pri | 2 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp | 7 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp | 2 | ||||
| -rw-r--r-- | Source/WebKit/qt/WidgetSupport/PageClientQt.cpp | 2 | ||||
| -rw-r--r-- | Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp | 12 | ||||
| -rw-r--r-- | Source/WebKit2/Platform/mac/SharedMemoryMac.cpp | 5 | ||||
| -rw-r--r-- | Source/WebKit2/Target.pri | 2 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.cpp | 4 | ||||
| -rw-r--r-- | Source/WebKit2/WebKit2.pri | 2 | ||||
| -rw-r--r-- | Source/sync.profile | 1 |
13 files changed, 95 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp index 079bf3cec..f91da9c0a 100644 --- a/Source/JavaScriptCore/llint/LLIntData.cpp +++ b/Source/JavaScriptCore/llint/LLIntData.cpp @@ -120,7 +120,7 @@ void Data::performAssertions(VM& vm) ASSERT(bitwise_cast<int**>(&testVector)[0] == testVector.begin()); #endif - ASSERT(StringImpl::s_hashFlag8BitBuffer == 32); + ASSERT(StringImpl::s_hashFlag8BitBuffer == 64); } #if COMPILER(CLANG) #pragma clang diagnostic pop diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 37dd12f97..d61c20383 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -728,6 +728,11 @@ #define ENABLE_DISASSEMBLER 1 #endif +/* Disable the LLINT on versions of GCC prior to 4.3. Mainly due to buggy assembler on OSX 10.6, the only supported platform using that old a version. */ +#if !defined(ENABLE_LLINT) && COMPILER(GCC) && !GCC_VERSION_AT_LEAST(4, 3, 0) +#define ENABLE_LLINT 0 +#endif + /* On some of the platforms where we have a JIT, we want to also have the low-level interpreter. */ #if !defined(ENABLE_LLINT) \ diff --git a/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp b/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp index e84e677a5..46229027e 100644 --- a/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp +++ b/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp @@ -22,6 +22,12 @@ #include "ResourceRequest.h" #include "ThirdPartyCookiesQt.h" +#if ENABLE(BLOB) +#include "BlobData.h" +#include "BlobRegistryImpl.h" +#include "BlobStorageData.h" +#endif + #include <qglobal.h> #include <QNetworkRequest> @@ -40,10 +46,60 @@ unsigned initializeMaximumHTTPConnectionCountPerHost() return 6 * (1 + 3 + 2); } +#if ENABLE(BLOB) +static void appendBlobResolved(QByteArray& data, const QUrl& url, QString* contentType = 0) +{ + RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url); + if (!blobData) + return; + + if (contentType) + *contentType = blobData->contentType(); + + BlobDataItemList::const_iterator it = blobData->items().begin(); + const BlobDataItemList::const_iterator itend = blobData->items().end(); + for (; it != itend; ++it) { + const BlobDataItem& blobItem = *it; + if (blobItem.type == BlobDataItem::Data) + data.append(blobItem.data->data() + static_cast<int>(blobItem.offset), static_cast<int>(blobItem.length)); + else if (blobItem.type == BlobDataItem::Blob) + appendBlobResolved(data, blobItem.url); + else if (blobItem.type == BlobDataItem::File) { + // File types are not allowed here, so just ignore it. + } else + ASSERT_NOT_REACHED(); + } +} + +static void resolveBlobUrl(const QUrl& url, QUrl& resolvedUrl) +{ + RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url); + if (!blobData) + return; + + QByteArray data; + QString contentType; + appendBlobResolved(data, url, &contentType); + + QString dataUri(QStringLiteral("data:")); + dataUri.append(contentType); + dataUri.append(QStringLiteral(";base64,")); + dataUri.append(QString::fromLatin1(data.toBase64())); + resolvedUrl = QUrl(dataUri); +} +#endif + QNetworkRequest ResourceRequest::toNetworkRequest(NetworkingContext *context) const { QNetworkRequest request; - request.setUrl(url()); + QUrl newurl = url(); + +#if ENABLE(BLOB) + if (newurl.scheme() == QLatin1String("blob")) + resolveBlobUrl(url(), newurl); +#endif + + request.setUrl(newurl); request.setOriginatingObject(context ? context->originatingObject() : 0); const HTTPHeaderMap &headers = httpHeaderFields(); diff --git a/Source/WebKit/WebKit1.pri b/Source/WebKit/WebKit1.pri index 06ac16031..6fc182941 100644 --- a/Source/WebKit/WebKit1.pri +++ b/Source/WebKit/WebKit1.pri @@ -14,7 +14,7 @@ INCLUDEPATH += \ have?(qtsensors):if(enable?(DEVICE_ORIENTATION)|enable?(ORIENTATION_EVENTS)): QT += sensors -have?(qtlocation):enable?(GEOLOCATION): QT += location +have?(qtpositioning):enable?(GEOLOCATION): QT += positioning contains(CONFIG, texmap): DEFINES += WTF_USE_TEXTURE_MAPPER=1 diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 542b64e8d..09b0aae82 100644 --- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -982,12 +982,17 @@ WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoad return loader.release(); } -void FrameLoaderClientQt::convertMainResourceLoadToDownload(WebCore::DocumentLoader* documentLoader, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&) +void FrameLoaderClientQt::convertMainResourceLoadToDownload(WebCore::DocumentLoader* documentLoader, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse&) { if (!m_webFrame) return; QNetworkReplyHandler* handler = documentLoader->mainResourceLoader()->handle()->getInternal()->m_job; + if (!handler) { + qWarning("Attempted to download unsupported URL %s", request.url().string().characters8()); + return; + } + QNetworkReply* reply = handler->release(); if (reply) { if (m_webFrame->pageAdapter->forwardUnsupportedContent) diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp index 26d1b407a..b4c5189f6 100644 --- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp @@ -36,7 +36,7 @@ #include "QWebFrameAdapter.h" #include "QWebPageAdapter.h" -#include <QtLocation/QGeoPositionInfoSource> +#include <QtPositioning/QGeoPositionInfoSource> namespace WebCore { diff --git a/Source/WebKit/qt/WidgetSupport/PageClientQt.cpp b/Source/WebKit/qt/WidgetSupport/PageClientQt.cpp index 8f486d594..de21c9fd7 100644 --- a/Source/WebKit/qt/WidgetSupport/PageClientQt.cpp +++ b/Source/WebKit/qt/WidgetSupport/PageClientQt.cpp @@ -64,6 +64,7 @@ void PageClientQWidget::update(const QRect & dirtyRect) void PageClientQWidget::repaintViewport() { update(view->rect()); + QMetaObject::invokeMethod(page, "repaintRequested", Qt::QueuedConnection, Q_ARG(QRect, view->rect())); } void PageClientQWidget::setInputMethodEnabled(bool enable) @@ -175,6 +176,7 @@ void PageClientQGraphicsWidget::update(const QRect& dirtyRect) void PageClientQGraphicsWidget::repaintViewport() { update(view->boundingRect().toAlignedRect()); + QMetaObject::invokeMethod(page, "repaintRequested", Qt::QueuedConnection, Q_ARG(QRect, view->boundingRect().toAlignedRect())); } bool PageClientQGraphicsWidget::makeOpenGLContextCurrentIfAvailable() diff --git a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp index 2ceac7706..be2a42b48 100644 --- a/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp +++ b/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp @@ -113,7 +113,13 @@ void Connection::platformInitialize(Identifier identifier) static dispatch_source_t createDataAvailableSource(mach_port_t receivePort, WorkQueue* workQueue, const Function<void()>& function) { dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, receivePort, 0, workQueue->dispatchQueue()); +#if COMPILER(GCC) + dispatch_source_set_event_handler(source, ^{ + function(); + }); +#else dispatch_source_set_event_handler(source, function); +#endif dispatch_source_set_cancel_handler(source, ^{ mach_port_mod_refs(mach_task_self(), receivePort, MACH_PORT_RIGHT_RECEIVE, -1); }); @@ -290,7 +296,13 @@ bool Connection::sendOutgoingMessage(PassOwnPtr<MessageEncoder> encoder) void Connection::initializeDeadNameSource() { m_deadNameSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_SEND, m_sendPort, 0, m_connectionQueue->dispatchQueue()); +#if COMPILER(GCC) + dispatch_source_set_event_handler(m_deadNameSource, ^{ + connectionDidClose(); + }); +#else dispatch_source_set_event_handler(m_deadNameSource, bind(&Connection::connectionDidClose, this)); +#endif mach_port_t sendPort = m_sendPort; dispatch_source_set_cancel_handler(m_deadNameSource, ^{ diff --git a/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp b/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp index c7b52d910..b581b353a 100644 --- a/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp +++ b/Source/WebKit2/Platform/mac/SharedMemoryMac.cpp @@ -36,6 +36,11 @@ #include <mach/vm_map.h> #include <wtf/RefPtr.h> +// Define this when building on older versions of Mac OS X. +#ifndef VM_PROT_IS_MASK +#define VM_PROT_IS_MASK ((vm_prot_t) 0x40) +#endif + namespace WebKit { SharedMemory::Handle::Handle() diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri index 7bac383f2..597e01088 100644 --- a/Source/WebKit2/Target.pri +++ b/Source/WebKit2/Target.pri @@ -937,7 +937,7 @@ enable?(TOUCH_EVENTS) { } -have?(qtlocation):enable?(GEOLOCATION): QT += location +have?(qtpositioning):enable?(GEOLOCATION): QT += positioning use?(3D_GRAPHICS): WEBKIT += angle diff --git a/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.cpp b/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.cpp index 038992143..7d05f043e 100644 --- a/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.cpp +++ b/Source/WebKit2/UIProcess/qt/WebGeolocationProviderQt.cpp @@ -21,8 +21,8 @@ #include "config.h" #include "WebGeolocationProviderQt.h" -#if ENABLE(GEOLOCATION) && HAVE(QTLOCATION) -#include <QtLocation/QGeoPositionInfoSource> +#if ENABLE(GEOLOCATION) && HAVE(QTPOSITIONING) +#include <QtPositioning/QGeoPositionInfoSource> namespace WebKit { diff --git a/Source/WebKit2/WebKit2.pri b/Source/WebKit2/WebKit2.pri index cf1d549dd..cf154cc19 100644 --- a/Source/WebKit2/WebKit2.pri +++ b/Source/WebKit2/WebKit2.pri @@ -82,6 +82,6 @@ linux-*: { have?(QTQUICK): QT += qml quick -have?(qtlocation):enable?(GEOLOCATION): QT += location +have?(qtpositioning):enable?(GEOLOCATION): QT += positioning enable?(SECCOMP_FILTERS): PKGCONFIG += libseccomp diff --git a/Source/sync.profile b/Source/sync.profile index 53063aaa3..801c563b6 100644 --- a/Source/sync.profile +++ b/Source/sync.profile @@ -20,6 +20,7 @@ %dependencies = ( "qtbase" => "", "qtdeclarative" => "", + "qtlocation" => "", "qtmultimedia" => "", "qtsensors" => "", ); |
