[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
weinig at apple.com
weinig at apple.com
Wed Dec 22 13:30:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 054b9532c87442204396b0af14999ef0f5e6272c
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 17 19:35:33 2010 +0000
Add bool wrapper for WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=45985
Reviewed by John Sullivan.
* Shared/APIObject.h:
* Shared/WebNumber.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKBase.h:
* UIProcess/API/C/WKNumber.cpp:
(WKBooleanGetTypeID):
(WKBooleanCreate):
(WKBooleanGetValue):
(WKBooleanSetValue):
* UIProcess/API/C/WKNumber.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index bc09419..5b66817 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-17 Sam Weinig <sam at webkit.org>
+
+ Reviewed by John Sullivan.
+
+ Add bool wrapper for WebKit2 API
+ https://bugs.webkit.org/show_bug.cgi?id=45985
+
+ * Shared/APIObject.h:
+ * Shared/WebNumber.h:
+ * UIProcess/API/C/WKAPICast.h:
+ * UIProcess/API/C/WKBase.h:
+ * UIProcess/API/C/WKNumber.cpp:
+ (WKBooleanGetTypeID):
+ (WKBooleanCreate):
+ (WKBooleanGetValue):
+ (WKBooleanSetValue):
+ * UIProcess/API/C/WKNumber.h:
+
2010-09-16 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKit2/Shared/APIObject.h b/WebKit2/Shared/APIObject.h
index 1cba836..38d12d3 100644
--- a/WebKit2/Shared/APIObject.h
+++ b/WebKit2/Shared/APIObject.h
@@ -46,6 +46,7 @@ public:
TypeURLResponse,
// Base numeric types
+ TypeBoolean,
TypeDouble,
TypeUInt64,
diff --git a/WebKit2/Shared/WebNumber.h b/WebKit2/Shared/WebNumber.h
index 38e879b..4459d77 100644
--- a/WebKit2/Shared/WebNumber.h
+++ b/WebKit2/Shared/WebNumber.h
@@ -55,6 +55,7 @@ private:
NumberType m_value;
};
+typedef WebNumber<bool, APIObject::TypeBoolean> WebBoolean;
typedef WebNumber<double, APIObject::TypeDouble> WebDouble;
typedef WebNumber<uint64_t, APIObject::TypeUInt64> WebUInt64;
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index f865d95..f46e314 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -65,6 +65,7 @@ template<typename APIType> struct APITypeInfo { };
template<> struct APITypeInfo<WKArrayRef> { typedef ImmutableArray* ImplType; };
template<> struct APITypeInfo<WKBackForwardListItemRef> { typedef WebBackForwardListItem* ImplType; };
template<> struct APITypeInfo<WKBackForwardListRef> { typedef WebBackForwardList* ImplType; };
+template<> struct APITypeInfo<WKBooleanRef> { typedef WebBoolean* ImplType; };
template<> struct APITypeInfo<WKContextRef> { typedef WebContext* ImplType; };
template<> struct APITypeInfo<WKDataRef> { typedef WebData* ImplType; };
template<> struct APITypeInfo<WKDictionaryRef> { typedef ImmutableDictionary* ImplType; };
@@ -95,6 +96,7 @@ template<> struct ImplTypeInfo<MutableArray*> { typedef WKMuta
template<> struct ImplTypeInfo<MutableDictionary*> { typedef WKMutableDictionaryRef APIType; };
template<> struct ImplTypeInfo<WebBackForwardList*> { typedef WKBackForwardListRef APIType; };
template<> struct ImplTypeInfo<WebBackForwardListItem*> { typedef WKBackForwardListItemRef APIType; };
+template<> struct ImplTypeInfo<WebBoolean*> { typedef WKBooleanRef APIType; };
template<> struct ImplTypeInfo<WebContext*> { typedef WKContextRef APIType; };
template<> struct ImplTypeInfo<WebData*> { typedef WKDataRef APIType; };
template<> struct ImplTypeInfo<WebDouble*> { typedef WKDoubleRef APIType; };
diff --git a/WebKit2/UIProcess/API/C/WKBase.h b/WebKit2/UIProcess/API/C/WKBase.h
index bb39999..7e07403 100644
--- a/WebKit2/UIProcess/API/C/WKBase.h
+++ b/WebKit2/UIProcess/API/C/WKBase.h
@@ -43,6 +43,7 @@ typedef struct OpaqueWKDictionary* WKMutableDictionaryRef;
typedef const struct OpaqueWKBackForwardList* WKBackForwardListRef;
typedef const struct OpaqueWKBackForwardListItem* WKBackForwardListItemRef;
+typedef const struct OpaqueWKBoolean* WKBooleanRef;
typedef const struct OpaqueWKContext* WKContextRef;
typedef const struct OpaqueWKData* WKDataRef;
typedef const struct OpaqueWKDouble* WKDoubleRef;
diff --git a/WebKit2/UIProcess/API/C/WKNumber.cpp b/WebKit2/UIProcess/API/C/WKNumber.cpp
index 8a07fb7..aac0a58 100644
--- a/WebKit2/UIProcess/API/C/WKNumber.cpp
+++ b/WebKit2/UIProcess/API/C/WKNumber.cpp
@@ -30,6 +30,27 @@
using namespace WebKit;
+WKTypeID WKBooleanGetTypeID()
+{
+ return toRef(WebBoolean::APIType);
+}
+
+WKBooleanRef WKBooleanCreate(bool value)
+{
+ RefPtr<WebBoolean> booleanObject = WebBoolean::create(value);
+ return toRef(booleanObject.release().releaseRef());
+}
+
+bool WKBooleanGetValue(WKBooleanRef booleanRef)
+{
+ return toWK(booleanRef)->value();
+}
+
+void WKBooleanSetValue(WKBooleanRef booleanRef, bool value)
+{
+ toWK(booleanRef)->setValue(value);
+}
+
WKTypeID WKDoubleGetTypeID()
{
return toRef(WebDouble::APIType);
diff --git a/WebKit2/UIProcess/API/C/WKNumber.h b/WebKit2/UIProcess/API/C/WKNumber.h
index 952f569..70a9c63 100644
--- a/WebKit2/UIProcess/API/C/WKNumber.h
+++ b/WebKit2/UIProcess/API/C/WKNumber.h
@@ -32,6 +32,12 @@
extern "C" {
#endif
+/* WKBoolean */
+WK_EXPORT WKTypeID WKBooleanGetTypeID();
+WK_EXPORT WKBooleanRef WKBooleanCreate(bool value);
+WK_EXPORT bool WKBooleanGetValue(WKBooleanRef booleanRef);
+WK_EXPORT void WKBooleanSetValue(WKBooleanRef booleanRef, bool value);
+
/* WKDouble */
WK_EXPORT WKTypeID WKDoubleGetTypeID();
WK_EXPORT WKDoubleRef WKDoubleCreate(double value);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list