summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebKit2/Shared
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebKit2/Shared')
-rw-r--r--Source/WebKit2/Shared/API/c/WKBase.h1
-rw-r--r--Source/WebKit2/Shared/API/c/WKImage.h3
-rw-r--r--Source/WebKit2/Shared/API/c/WKSharedAPICast.h2
-rw-r--r--Source/WebKit2/Shared/API/c/WKURL.cpp5
-rw-r--r--Source/WebKit2/Shared/API/c/WKURL.h1
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLRequest.cpp10
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLRequest.h4
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLResponse.cpp5
-rw-r--r--Source/WebKit2/Shared/API/c/WKURLResponse.h2
-rw-r--r--Source/WebKit2/Shared/APIObject.h1
-rw-r--r--Source/WebKit2/Shared/CommandLine.h2
-rw-r--r--Source/WebKit2/Shared/ImageOptions.h3
-rw-r--r--Source/WebKit2/Shared/IntentData.cpp12
-rw-r--r--Source/WebKit2/Shared/IntentData.h4
-rw-r--r--Source/WebKit2/Shared/ShareableSurface.h2
-rw-r--r--Source/WebKit2/Shared/UserMessageCoders.h1
-rw-r--r--Source/WebKit2/Shared/WebCoreArgumentCoders.cpp7
-rw-r--r--Source/WebKit2/Shared/WebOpenPanelParameters.cpp9
-rw-r--r--Source/WebKit2/Shared/WebOpenPanelParameters.h4
-rw-r--r--Source/WebKit2/Shared/WebPreferencesStore.cpp2
-rw-r--r--Source/WebKit2/Shared/WebURL.h6
21 files changed, 79 insertions, 7 deletions
diff --git a/Source/WebKit2/Shared/API/c/WKBase.h b/Source/WebKit2/Shared/API/c/WKBase.h
index 6854ecc27..a6a8bd66f 100644
--- a/Source/WebKit2/Shared/API/c/WKBase.h
+++ b/Source/WebKit2/Shared/API/c/WKBase.h
@@ -135,6 +135,7 @@ typedef const struct OpaqueWKBundleDOMWindowExtension* WKBundleDOMWindowExtensio
typedef const struct OpaqueWKBundleFrame* WKBundleFrameRef;
typedef const struct OpaqueWKBundleHitTestResult* WKBundleHitTestResultRef;
typedef const struct OpaqueWKBundleInspector* WKBundleInspectorRef;
+typedef const struct OpaqueWKBundleIntent* WKBundleIntentRef;
typedef const struct OpaqueWKBundleIntentRequest* WKBundleIntentRequestRef;
typedef const struct OpaqueWKBundleNavigationAction* WKBundleNavigationActionRef;
typedef const struct OpaqueWKBundleNodeHandle* WKBundleNodeHandleRef;
diff --git a/Source/WebKit2/Shared/API/c/WKImage.h b/Source/WebKit2/Shared/API/c/WKImage.h
index 8dec00a9d..1f23b134a 100644
--- a/Source/WebKit2/Shared/API/c/WKImage.h
+++ b/Source/WebKit2/Shared/API/c/WKImage.h
@@ -40,7 +40,8 @@ typedef uint32_t WKImageOptions;
enum {
kWKSnapshotOptionsShareable = 1 << 0,
- kWKSnapshotOptionsExcludeSelectionHighlighting = 1 << 1
+ kWKSnapshotOptionsExcludeSelectionHighlighting = 1 << 1,
+ kWKSnapshotOptionsInViewCoordinates = 1 << 2
};
typedef uint32_t WKSnapshotOptions;
diff --git a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
index cc605d1f8..8a73a01fa 100644
--- a/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/Source/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -776,6 +776,8 @@ inline SnapshotOptions toSnapshotOptions(WKSnapshotOptions wkSnapshotOptions)
snapshotOptions |= SnapshotOptionsShareable;
if (wkSnapshotOptions & kWKSnapshotOptionsExcludeSelectionHighlighting)
snapshotOptions |= SnapshotOptionsExcludeSelectionHighlighting;
+ if (wkSnapshotOptions & kWKSnapshotOptionsInViewCoordinates)
+ snapshotOptions |= SnapshotOptionsInViewCoordinates;
return snapshotOptions;
}
diff --git a/Source/WebKit2/Shared/API/c/WKURL.cpp b/Source/WebKit2/Shared/API/c/WKURL.cpp
index 99cde89ef..2268413a0 100644
--- a/Source/WebKit2/Shared/API/c/WKURL.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURL.cpp
@@ -60,6 +60,11 @@ WKStringRef WKURLCopyScheme(WKURLRef url)
return toCopiedAPI(toImpl(url)->protocol());
}
+WK_EXPORT WKStringRef WKURLCopyPath(WKURLRef url)
+{
+ return toCopiedAPI(toImpl(url)->path());
+}
+
WKStringRef WKURLCopyLastPathComponent(WKURLRef url)
{
return toCopiedAPI(toImpl(url)->lastPathComponent());
diff --git a/Source/WebKit2/Shared/API/c/WKURL.h b/Source/WebKit2/Shared/API/c/WKURL.h
index 2cda6c192..4e9867246 100644
--- a/Source/WebKit2/Shared/API/c/WKURL.h
+++ b/Source/WebKit2/Shared/API/c/WKURL.h
@@ -39,6 +39,7 @@ WK_EXPORT WKURLRef WKURLCreateWithUTF8CString(const char* string);
WK_EXPORT WKStringRef WKURLCopyString(WKURLRef url);
WK_EXPORT WKStringRef WKURLCopyHostName(WKURLRef url);
WK_EXPORT WKStringRef WKURLCopyScheme(WKURLRef url);
+WK_EXPORT WKStringRef WKURLCopyPath(WKURLRef url);
WK_EXPORT WKStringRef WKURLCopyLastPathComponent(WKURLRef url);
WK_EXPORT bool WKURLIsEqual(WKURLRef a, WKURLRef b);
diff --git a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp b/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
index 776367b75..114c74190 100644
--- a/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLRequest.cpp
@@ -48,6 +48,16 @@ WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
return toCopiedURLAPI(toImpl(requestRef)->url());
}
+WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef requestRef)
+{
+ return toCopiedURLAPI(toImpl(requestRef)->resourceRequest().firstPartyForCookies());
+}
+
+WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef requestRef)
+{
+ return toCopiedAPI(toImpl(requestRef)->resourceRequest().httpMethod());
+}
+
void WKURLRequestSetDefaultTimeoutInterval(double timeoutInterval)
{
WebURLRequest::setDefaultTimeoutInterval(timeoutInterval);
diff --git a/Source/WebKit2/Shared/API/c/WKURLRequest.h b/Source/WebKit2/Shared/API/c/WKURLRequest.h
index a53ce1635..85df3d389 100644
--- a/Source/WebKit2/Shared/API/c/WKURLRequest.h
+++ b/Source/WebKit2/Shared/API/c/WKURLRequest.h
@@ -38,6 +38,10 @@ WK_EXPORT WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef);
WK_EXPORT WKURLRef WKURLRequestCopyURL(WKURLRequestRef);
+WK_EXPORT WKURLRef WKURLRequestCopyFirstPartyForCookies(WKURLRequestRef);
+
+WK_EXPORT WKStringRef WKURLRequestCopyHTTPMethod(WKURLRequestRef);
+
WK_EXPORT void WKURLRequestSetDefaultTimeoutInterval(double);
#ifdef __cplusplus
diff --git a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
index cefd07d31..2d25f282a 100644
--- a/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
+++ b/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
@@ -46,3 +46,8 @@ WKStringRef WKURLResponseCopyMIMEType(WKURLResponseRef responseRef)
{
return toCopiedAPI(toImpl(responseRef)->resourceResponse().mimeType());
}
+
+int32_t WKURLResponseHTTPStatusCode(WKURLResponseRef responseRef)
+{
+ return toImpl(responseRef)->resourceResponse().httpStatusCode();
+}
diff --git a/Source/WebKit2/Shared/API/c/WKURLResponse.h b/Source/WebKit2/Shared/API/c/WKURLResponse.h
index 8988dff08..d4c269340 100644
--- a/Source/WebKit2/Shared/API/c/WKURLResponse.h
+++ b/Source/WebKit2/Shared/API/c/WKURLResponse.h
@@ -38,6 +38,8 @@ WK_EXPORT WKURLRef WKURLResponseCopyURL(WKURLResponseRef);
WK_EXPORT WKStringRef WKURLResponseCopyMIMEType(WKURLResponseRef);
+WK_EXPORT int32_t WKURLResponseHTTPStatusCode(WKURLResponseRef);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit2/Shared/APIObject.h b/Source/WebKit2/Shared/APIObject.h
index 8e4d29342..708effe5d 100644
--- a/Source/WebKit2/Shared/APIObject.h
+++ b/Source/WebKit2/Shared/APIObject.h
@@ -117,6 +117,7 @@ public:
TypeBundleFrame,
TypeBundleHitTestResult,
TypeBundleInspector,
+ TypeBundleIntent,
TypeBundleIntentRequest,
TypeBundleNavigationAction,
TypeBundleNodeHandle,
diff --git a/Source/WebKit2/Shared/CommandLine.h b/Source/WebKit2/Shared/CommandLine.h
index f70601ce2..2d7951067 100644
--- a/Source/WebKit2/Shared/CommandLine.h
+++ b/Source/WebKit2/Shared/CommandLine.h
@@ -48,8 +48,6 @@ public:
}
private:
- bool m_parsedSuccessfully;
-
HashMap<String, String> m_args;
};
diff --git a/Source/WebKit2/Shared/ImageOptions.h b/Source/WebKit2/Shared/ImageOptions.h
index 534cd2332..304ecf86b 100644
--- a/Source/WebKit2/Shared/ImageOptions.h
+++ b/Source/WebKit2/Shared/ImageOptions.h
@@ -34,7 +34,8 @@ enum ImageOptions {
enum {
SnapshotOptionsShareable = 1 << 0,
- SnapshotOptionsExcludeSelectionHighlighting = 1 << 1
+ SnapshotOptionsExcludeSelectionHighlighting = 1 << 1,
+ SnapshotOptionsInViewCoordinates = 1 << 2
};
typedef uint32_t SnapshotOptions;
diff --git a/Source/WebKit2/Shared/IntentData.cpp b/Source/WebKit2/Shared/IntentData.cpp
index 4995b2ef5..41078747c 100644
--- a/Source/WebKit2/Shared/IntentData.cpp
+++ b/Source/WebKit2/Shared/IntentData.cpp
@@ -31,7 +31,10 @@
#include "APIObject.h"
#include "DataReference.h"
#include "WebCoreArgumentCoders.h"
+#include "WebProcess.h"
#include <WebCore/Intent.h>
+#include <WebCore/MessagePortChannel.h>
+#include <WebCore/PlatformMessagePortChannel.h>
using namespace WebCore;
@@ -45,6 +48,12 @@ IntentData::IntentData(Intent* coreIntent)
, extras(coreIntent->extras())
, suggestions(coreIntent->suggestions())
{
+ MessagePortChannelArray* coreMessagePorts = coreIntent->messagePorts();
+ if (coreMessagePorts) {
+ size_t numMessagePorts = coreMessagePorts->size();
+ for (size_t i = 0; i < numMessagePorts; ++i)
+ messagePorts.append(WebProcess::shared().addMessagePortChannel((*coreMessagePorts)[i]->channel()));
+ }
}
void IntentData::encode(CoreIPC::ArgumentEncoder* encoder) const
@@ -55,6 +64,7 @@ void IntentData::encode(CoreIPC::ArgumentEncoder* encoder) const
encoder->encode(CoreIPC::DataReference(data));
encoder->encode(extras);
encoder->encode(suggestions);
+ encoder->encode(messagePorts);
}
bool IntentData::decode(CoreIPC::ArgumentDecoder* decoder, IntentData& intentData)
@@ -73,6 +83,8 @@ bool IntentData::decode(CoreIPC::ArgumentDecoder* decoder, IntentData& intentDat
return false;
if (!decoder->decode(intentData.suggestions))
return false;
+ if (!decoder->decode(intentData.messagePorts))
+ return false;
return true;
}
diff --git a/Source/WebKit2/Shared/IntentData.h b/Source/WebKit2/Shared/IntentData.h
index 96e2d9f99..e8435c284 100644
--- a/Source/WebKit2/Shared/IntentData.h
+++ b/Source/WebKit2/Shared/IntentData.h
@@ -29,7 +29,8 @@
#if ENABLE(WEB_INTENTS)
#include "APIObject.h"
-#include "GenericCallback.h"
+#include <WebCore/KURL.h>
+#include <wtf/HashMap.h>
#include <wtf/text/WTFString.h>
namespace CoreIPC {
@@ -56,6 +57,7 @@ struct IntentData {
Vector<uint8_t> data;
HashMap<String, String> extras;
Vector<WebCore::KURL> suggestions;
+ Vector<uint64_t> messagePorts;
};
} // namespace WebKit
diff --git a/Source/WebKit2/Shared/ShareableSurface.h b/Source/WebKit2/Shared/ShareableSurface.h
index fb74b61be..6cd7369a1 100644
--- a/Source/WebKit2/Shared/ShareableSurface.h
+++ b/Source/WebKit2/Shared/ShareableSurface.h
@@ -62,7 +62,7 @@ public:
friend class ShareableSurface;
mutable ShareableBitmap::Handle m_bitmapHandle;
#if USE(GRAPHICS_SURFACE)
- uint32_t m_graphicsSurfaceToken;
+ uint64_t m_graphicsSurfaceToken;
#endif
WebCore::IntSize m_size;
ShareableBitmap::Flags m_flags;
diff --git a/Source/WebKit2/Shared/UserMessageCoders.h b/Source/WebKit2/Shared/UserMessageCoders.h
index 85ed57b57..ee4ab64ff 100644
--- a/Source/WebKit2/Shared/UserMessageCoders.h
+++ b/Source/WebKit2/Shared/UserMessageCoders.h
@@ -186,6 +186,7 @@ public:
WebImage* image = static_cast<WebImage*>(m_root);
ShareableBitmap::Handle handle;
+ ASSERT(!image->bitmap() || image->bitmap()->isBackedBySharedMemory());
if (!image->bitmap() || !image->bitmap()->isBackedBySharedMemory() || !image->bitmap()->createHandle(handle)) {
// Initial false indicates no allocated bitmap or is not shareable.
encoder->encode(false);
diff --git a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
index 7d40bc866..cbf624926 100644
--- a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
+++ b/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
@@ -555,6 +555,9 @@ void ArgumentCoder<FileChooserSettings>::encode(ArgumentEncoder* encoder, const
#endif
encoder->encode(settings.acceptMIMETypes);
encoder->encode(settings.selectedFiles);
+#if ENABLE(MEDIA_CAPTURE)
+ encoder->encode(settings.capture);
+#endif
}
bool ArgumentCoder<FileChooserSettings>::decode(ArgumentDecoder* decoder, FileChooserSettings& settings)
@@ -569,6 +572,10 @@ bool ArgumentCoder<FileChooserSettings>::decode(ArgumentDecoder* decoder, FileCh
return false;
if (!decoder->decode(settings.selectedFiles))
return false;
+#if ENABLE(MEDIA_CAPTURE)
+ if (!decoder->decode(settings.capture))
+ return false;
+#endif
return true;
}
diff --git a/Source/WebKit2/Shared/WebOpenPanelParameters.cpp b/Source/WebKit2/Shared/WebOpenPanelParameters.cpp
index f6722bba0..772504066 100644
--- a/Source/WebKit2/Shared/WebOpenPanelParameters.cpp
+++ b/Source/WebKit2/Shared/WebOpenPanelParameters.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -60,4 +61,12 @@ PassRefPtr<ImmutableArray> WebOpenPanelParameters::acceptMIMETypes() const
return ImmutableArray::adopt(vector);
}
+#if ENABLE(MEDIA_CAPTURE)
+String WebOpenPanelParameters::capture() const
+{
+ return m_settings.capture;
+}
+#endif
+
+
} // namespace WebCore
diff --git a/Source/WebKit2/Shared/WebOpenPanelParameters.h b/Source/WebKit2/Shared/WebOpenPanelParameters.h
index eca44e1e3..ab12c0fc1 100644
--- a/Source/WebKit2/Shared/WebOpenPanelParameters.h
+++ b/Source/WebKit2/Shared/WebOpenPanelParameters.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,6 +46,9 @@ public:
bool allowMultipleFiles() const { return m_settings.allowsMultipleFiles; }
PassRefPtr<ImmutableArray> acceptMIMETypes() const;
Vector<String> selectedFileNames() const { return m_settings.selectedFiles; }
+#if ENABLE(MEDIA_CAPTURE)
+ String capture() const;
+#endif
private:
explicit WebOpenPanelParameters(const WebCore::FileChooserSettings&);
diff --git a/Source/WebKit2/Shared/WebPreferencesStore.cpp b/Source/WebKit2/Shared/WebPreferencesStore.cpp
index 8668bec0c..89734bf0e 100644
--- a/Source/WebKit2/Shared/WebPreferencesStore.cpp
+++ b/Source/WebKit2/Shared/WebPreferencesStore.cpp
@@ -184,7 +184,7 @@ bool WebPreferencesStore::setBoolValueForKey(const String& key, bool value)
bool WebPreferencesStore::getBoolValueForKey(const String& key) const
{
- // FIXME: Extend overriding to other key types used from LayoutTestController.
+ // FIXME: Extend overriding to other key types used from TestRunner.
BoolOverridesMap::const_iterator it = boolTestRunnerOverridesMap().find(key);
if (it != boolTestRunnerOverridesMap().end())
return it->second;
diff --git a/Source/WebKit2/Shared/WebURL.h b/Source/WebKit2/Shared/WebURL.h
index f0cce8d02..b2961277b 100644
--- a/Source/WebKit2/Shared/WebURL.h
+++ b/Source/WebKit2/Shared/WebURL.h
@@ -63,6 +63,12 @@ public:
return m_parsedURL->isValid() ? m_parsedURL->protocol() : String();
}
+ String path() const
+ {
+ parseURLIfNecessary();
+ return m_parsedURL->isValid() ? m_parsedURL->path() : String();
+ }
+
String lastPathComponent() const
{
parseURLIfNecessary();