[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 11:36:54 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit d895c52b8f1afe25e40454f18f6800687e7c023f
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 30 23:38:26 2010 +0000
Patch for https://bugs.webkit.org/show_bug.cgi?id=43283
Add APIObject template introspection support.
Reviewed by Anders Carlsson.
Add a way to get the type the APIObject::Type from the APIObject subclass typenames
for template fun. Use this to make a type checking version of ImmutableArray::at.
* Shared/ImmutableArray.h:
(WebKit::ImmutableArray::at):
(WebKit::ImmutableArray::type):
* Shared/WebString.h:
(WebKit::WebString::type):
* Shared/WebURL.h:
(WebKit::WebURL::type):
* UIProcess/API/C/WKArray.cpp:
(WKArrayGetTypeID):
* UIProcess/API/C/WKBackForwardList.cpp:
(WKBackForwardListGetTypeID):
* UIProcess/API/C/WKBackForwardListItem.cpp:
(WKBackForwardListItemGetTypeID):
* UIProcess/API/C/WKContext.cpp:
(WKContextGetTypeID):
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetTypeID):
* UIProcess/API/C/WKFramePolicyListener.cpp:
(WKFramePolicyListenerGetTypeID):
* UIProcess/API/C/WKNavigationData.cpp:
(WKNavigationDataGetTypeID):
* UIProcess/API/C/WKPage.cpp:
(WKPageGetTypeID):
* UIProcess/API/C/WKPageNamespace.cpp:
(WKPageNamespaceGetTypeID):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesGetTypeID):
* UIProcess/API/C/WKString.cpp:
(WKStringGetTypeID):
* UIProcess/API/C/WKURL.cpp:
(WKURLGetTypeID):
* UIProcess/WebBackForwardList.h:
(WebKit::WebBackForwardList::type):
* UIProcess/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::type):
* UIProcess/WebContext.h:
(WebKit::WebContext::type):
* UIProcess/WebFramePolicyListenerProxy.h:
(WebKit::WebFramePolicyListenerProxy::type):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::type):
* UIProcess/WebNavigationData.h:
(WebKit::WebNavigationData::type):
* UIProcess/WebPageNamespace.h:
(WebKit::WebPageNamespace::type):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::type):
* UIProcess/WebPreferences.h:
(WebKit::WebPreferences::type):
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleGetTypeID):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetTypeID):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageGetTypeID):
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::type):
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::type):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::type):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 6a3bb51..f87bb12 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,78 @@
Reviewed by Anders Carlsson.
+ Patch for https://bugs.webkit.org/show_bug.cgi?id=43283
+ Add APIObject template introspection support.
+
+ Add a way to get the type the APIObject::Type from the APIObject subclass typenames
+ for template fun. Use this to make a type checking version of ImmutableArray::at.
+
+ * Shared/ImmutableArray.h:
+ (WebKit::ImmutableArray::at):
+ (WebKit::ImmutableArray::type):
+ * Shared/WebString.h:
+ (WebKit::WebString::type):
+ * Shared/WebURL.h:
+ (WebKit::WebURL::type):
+ * UIProcess/API/C/WKArray.cpp:
+ (WKArrayGetTypeID):
+ * UIProcess/API/C/WKBackForwardList.cpp:
+ (WKBackForwardListGetTypeID):
+ * UIProcess/API/C/WKBackForwardListItem.cpp:
+ (WKBackForwardListItemGetTypeID):
+ * UIProcess/API/C/WKContext.cpp:
+ (WKContextGetTypeID):
+ * UIProcess/API/C/WKFrame.cpp:
+ (WKFrameGetTypeID):
+ * UIProcess/API/C/WKFramePolicyListener.cpp:
+ (WKFramePolicyListenerGetTypeID):
+ * UIProcess/API/C/WKNavigationData.cpp:
+ (WKNavigationDataGetTypeID):
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageGetTypeID):
+ * UIProcess/API/C/WKPageNamespace.cpp:
+ (WKPageNamespaceGetTypeID):
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesGetTypeID):
+ * UIProcess/API/C/WKString.cpp:
+ (WKStringGetTypeID):
+ * UIProcess/API/C/WKURL.cpp:
+ (WKURLGetTypeID):
+ * UIProcess/WebBackForwardList.h:
+ (WebKit::WebBackForwardList::type):
+ * UIProcess/WebBackForwardListItem.h:
+ (WebKit::WebBackForwardListItem::type):
+ * UIProcess/WebContext.h:
+ (WebKit::WebContext::type):
+ * UIProcess/WebFramePolicyListenerProxy.h:
+ (WebKit::WebFramePolicyListenerProxy::type):
+ * UIProcess/WebFrameProxy.h:
+ (WebKit::WebFrameProxy::type):
+ * UIProcess/WebNavigationData.h:
+ (WebKit::WebNavigationData::type):
+ * UIProcess/WebPageNamespace.h:
+ (WebKit::WebPageNamespace::type):
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::type):
+ * UIProcess/WebPreferences.h:
+ (WebKit::WebPreferences::type):
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleGetTypeID):
+ * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+ (WKBundleFrameGetTypeID):
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+ (WKBundlePageGetTypeID):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (WebKit::InjectedBundle::type):
+ * WebProcess/WebPage/WebFrame.h:
+ (WebKit::WebFrame::type):
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::type):
+
+2010-07-30 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
Patch for https://bugs.webkit.org/show_bug.cgi?id=43275
Make WKArrayRef more usable.
diff --git a/WebKit2/Shared/ImmutableArray.h b/WebKit2/Shared/ImmutableArray.h
index ec429c7..1f414cf 100644
--- a/WebKit2/Shared/ImmutableArray.h
+++ b/WebKit2/Shared/ImmutableArray.h
@@ -35,6 +35,8 @@ namespace WebKit {
class ImmutableArray : public APIObject {
public:
+ static const Type APIType = TypeArray;
+
static PassRefPtr<ImmutableArray> create()
{
return adoptRef(new ImmutableArray);
@@ -49,6 +51,9 @@ public:
}
~ImmutableArray();
+ template<typename T>
+ T* at(size_t i) { ASSERT(i < m_size); if (m_entries[i]->type() != T::APIType) return 0; return m_entries[i]; }
+
APIObject* at(size_t i) { ASSERT(i < m_size); return m_entries[i]; }
size_t size() { return m_size; }
@@ -58,7 +63,7 @@ private:
enum AdoptTag { Adopt };
ImmutableArray(APIObject** entries, size_t size, AdoptTag);
- virtual Type type() const { return TypeArray; }
+ virtual Type type() const { return APIType; }
APIObject** m_entries;
size_t m_size;
diff --git a/WebKit2/Shared/WebString.h b/WebKit2/Shared/WebString.h
index 92ccd1d..fa3f4d1 100644
--- a/WebKit2/Shared/WebString.h
+++ b/WebKit2/Shared/WebString.h
@@ -36,6 +36,8 @@ namespace WebKit {
class WebString : public APIObject {
public:
+ static const Type APIType = TypeString;
+
static PassRefPtr<WebString> create(const WebCore::String& string)
{
return adoptRef(new WebString(string));
@@ -52,7 +54,7 @@ private:
{
}
- virtual Type type() const { return TypeString; }
+ virtual Type type() const { return APIType; }
WebCore::String m_string;
};
diff --git a/WebKit2/Shared/WebURL.h b/WebKit2/Shared/WebURL.h
index 08dd085..00adca5 100644
--- a/WebKit2/Shared/WebURL.h
+++ b/WebKit2/Shared/WebURL.h
@@ -36,6 +36,8 @@ namespace WebKit {
class WebURL : public APIObject {
public:
+ static const Type APIType = TypeURL;
+
static PassRefPtr<WebURL> create(const WebCore::String& string)
{
return adoptRef(new WebURL(string));
@@ -52,7 +54,7 @@ private:
{
}
- virtual Type type() const { return TypeURL; }
+ virtual Type type() const { return APIType; }
WebCore::String m_string;
};
diff --git a/WebKit2/UIProcess/API/C/WKArray.cpp b/WebKit2/UIProcess/API/C/WKArray.cpp
index 68d121f..21f183e 100644
--- a/WebKit2/UIProcess/API/C/WKArray.cpp
+++ b/WebKit2/UIProcess/API/C/WKArray.cpp
@@ -32,7 +32,7 @@ using namespace WebKit;
WKTypeID WKArrayGetTypeID()
{
- return toRef(APIObject::TypeArray);
+ return toRef(ImmutableArray::APIType);
}
WKArrayRef WKArrayCreate(WKTypeRef* values, size_t numberOfValues)
diff --git a/WebKit2/UIProcess/API/C/WKBackForwardList.cpp b/WebKit2/UIProcess/API/C/WKBackForwardList.cpp
index 9bcb6c1..a55796e 100644
--- a/WebKit2/UIProcess/API/C/WKBackForwardList.cpp
+++ b/WebKit2/UIProcess/API/C/WKBackForwardList.cpp
@@ -32,7 +32,7 @@ using namespace WebKit;
WKTypeID WKBackForwardListGetTypeID()
{
- return toRef(APIObject::TypeBackForwardList);
+ return toRef(WebBackForwardList::APIType);
}
WKBackForwardListItemRef WKBackForwardListGetCurrentItem(WKBackForwardListRef listRef)
diff --git a/WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp b/WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp
index 62e3a41..bd53e78 100644
--- a/WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp
+++ b/WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp
@@ -32,7 +32,7 @@ using namespace WebKit;
WKTypeID WKBackForwardListItemGetTypeID()
{
- return toRef(APIObject::TypeBackForwardListItem);
+ return toRef(WebBackForwardListItem::APIType);
}
WKURLRef WKBackForwardListItemCopyOriginalURL(WKBackForwardListItemRef itemRef)
diff --git a/WebKit2/UIProcess/API/C/WKContext.cpp b/WebKit2/UIProcess/API/C/WKContext.cpp
index 75ded03..0df6326 100644
--- a/WebKit2/UIProcess/API/C/WKContext.cpp
+++ b/WebKit2/UIProcess/API/C/WKContext.cpp
@@ -37,7 +37,7 @@ using namespace WebKit;
WKTypeID WKContextGetTypeID()
{
- return toRef(APIObject::TypeContext);
+ return toRef(WebContext::APIType);
}
WKContextRef WKContextCreate()
diff --git a/WebKit2/UIProcess/API/C/WKFrame.cpp b/WebKit2/UIProcess/API/C/WKFrame.cpp
index 8f83d6a..9924e03 100644
--- a/WebKit2/UIProcess/API/C/WKFrame.cpp
+++ b/WebKit2/UIProcess/API/C/WKFrame.cpp
@@ -32,7 +32,7 @@ using namespace WebKit;
WKTypeID WKFrameGetTypeID()
{
- return toRef(APIObject::TypeFrame);
+ return toRef(WebFrameProxy::APIType);
}
bool WKFrameIsMainFrame(WKFrameRef frameRef)
diff --git a/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp b/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp
index 3630fb4..e3200ce 100644
--- a/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp
+++ b/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp
@@ -33,7 +33,7 @@ using namespace WebKit;
WKTypeID WKFramePolicyListenerGetTypeID()
{
- return toRef(APIObject::TypeFramePolicyListener);
+ return toRef(WebFramePolicyListenerProxy::APIType);
}
void WKFramePolicyListenerUse(WKFramePolicyListenerRef policyListenerRef)
diff --git a/WebKit2/UIProcess/API/C/WKNavigationData.cpp b/WebKit2/UIProcess/API/C/WKNavigationData.cpp
index c16c119..e483d87 100644
--- a/WebKit2/UIProcess/API/C/WKNavigationData.cpp
+++ b/WebKit2/UIProcess/API/C/WKNavigationData.cpp
@@ -32,7 +32,7 @@ using namespace WebKit;
WKTypeID WKNavigationDataGetTypeID()
{
- return toRef(APIObject::TypeNavigationData);
+ return toRef(WebNavigationData::APIType);
}
WKStringRef WKNavigationDataCopyTitle(WKNavigationDataRef navigationDataRef)
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index a27faa3..ff35dd2 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -38,7 +38,7 @@ using namespace WebKit;
WKTypeID WKPageGetTypeID()
{
- return toRef(APIObject::TypePage);
+ return toRef(WebPageProxy::APIType);
}
WKPageNamespaceRef WKPageGetPageNamespace(WKPageRef pageRef)
diff --git a/WebKit2/UIProcess/API/C/WKPageNamespace.cpp b/WebKit2/UIProcess/API/C/WKPageNamespace.cpp
index 008e66d..03f8ddd 100644
--- a/WebKit2/UIProcess/API/C/WKPageNamespace.cpp
+++ b/WebKit2/UIProcess/API/C/WKPageNamespace.cpp
@@ -34,7 +34,7 @@ using namespace WebKit;
WKTypeID WKPageNamespaceGetTypeID()
{
- return toRef(APIObject::TypePageNamespace);
+ return toRef(WebPageNamespace::APIType);
}
WKPageNamespaceRef WKPageNamespaceCreate(WKContextRef ownerContextRef)
diff --git a/WebKit2/UIProcess/API/C/WKPreferences.cpp b/WebKit2/UIProcess/API/C/WKPreferences.cpp
index 1f6e6be..7be3252 100644
--- a/WebKit2/UIProcess/API/C/WKPreferences.cpp
+++ b/WebKit2/UIProcess/API/C/WKPreferences.cpp
@@ -34,7 +34,7 @@ using namespace WebKit;
WKTypeID WKPreferencesGetTypeID()
{
- return toRef(APIObject::TypePreferences);
+ return toRef(WebPreferences::APIType);
}
WKPreferencesRef WKPreferencesCreate()
diff --git a/WebKit2/UIProcess/API/C/WKString.cpp b/WebKit2/UIProcess/API/C/WKString.cpp
index 21bd4b7..de76bb0 100644
--- a/WebKit2/UIProcess/API/C/WKString.cpp
+++ b/WebKit2/UIProcess/API/C/WKString.cpp
@@ -31,7 +31,7 @@ using namespace WebKit;
WKTypeID WKStringGetTypeID()
{
- return toRef(APIObject::TypeString);
+ return toRef(WebString::APIType);
}
WKStringRef WKStringRetain(WKStringRef stringRef)
diff --git a/WebKit2/UIProcess/API/C/WKURL.cpp b/WebKit2/UIProcess/API/C/WKURL.cpp
index 5ca44cc..f3da395 100644
--- a/WebKit2/UIProcess/API/C/WKURL.cpp
+++ b/WebKit2/UIProcess/API/C/WKURL.cpp
@@ -31,7 +31,7 @@ using namespace WebKit;
WKTypeID WKURLGetTypeID()
{
- return toRef(APIObject::TypeURL);
+ return toRef(WebURL::APIType);
}
WKURLRef WKURLRetain(WKURLRef URLRef)
diff --git a/WebKit2/UIProcess/WebBackForwardList.h b/WebKit2/UIProcess/WebBackForwardList.h
index b74e877..5459acf 100644
--- a/WebKit2/UIProcess/WebBackForwardList.h
+++ b/WebKit2/UIProcess/WebBackForwardList.h
@@ -47,6 +47,8 @@ typedef Vector<RefPtr<WebBackForwardListItem> > BackForwardListItemVector;
class WebBackForwardList : public APIObject {
public:
+ static const Type APIType = TypeBackForwardList;
+
static PassRefPtr<WebBackForwardList> create(WebPageProxy* page)
{
return adoptRef(new WebBackForwardList(page));
@@ -73,7 +75,7 @@ public:
private:
WebBackForwardList(WebPageProxy*);
- virtual Type type() const { return TypeBackForwardList; }
+ virtual Type type() const { return APIType; }
WebPageProxy* m_page;
BackForwardListItemVector m_entries;
diff --git a/WebKit2/UIProcess/WebBackForwardListItem.h b/WebKit2/UIProcess/WebBackForwardListItem.h
index 1d59f45..2fec38a 100644
--- a/WebKit2/UIProcess/WebBackForwardListItem.h
+++ b/WebKit2/UIProcess/WebBackForwardListItem.h
@@ -36,6 +36,8 @@ class WebPageProxy;
class WebBackForwardListItem : public APIObject {
public:
+ static const Type APIType = TypeBackForwardListItem;
+
static PassRefPtr<WebBackForwardListItem> create(const WebCore::String& originalURL, const WebCore::String& url, const WebCore::String& title, uint64_t itemID)
{
return adoptRef(new WebBackForwardListItem(originalURL, url, title, itemID));
@@ -56,7 +58,7 @@ public:
private:
WebBackForwardListItem(const WebCore::String& originalURL, const WebCore::String& url, const WebCore::String& title, uint64_t itemID);
- virtual Type type() const { return TypeBackForwardListItem; }
+ virtual Type type() const { return APIType; }
WebCore::String m_originalURL;
WebCore::String m_url;
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index f93a35b..3b1bfc1 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -49,6 +49,8 @@ class WebPreferences;
class WebContext : public APIObject {
public:
+ static const Type APIType = TypeContext;
+
static WebContext* sharedProcessContext();
static WebContext* sharedThreadContext();
@@ -101,7 +103,7 @@ public:
private:
WebContext(ProcessModel, const WebCore::String& injectedBundlePath);
- virtual Type type() const { return TypeContext; }
+ virtual Type type() const { return APIType; }
void ensureWebProcess();
bool hasValidProcess() const { return m_process && m_process->isValid(); }
diff --git a/WebKit2/UIProcess/WebFramePolicyListenerProxy.h b/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
index 341af2e..71708af 100644
--- a/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
+++ b/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
@@ -37,6 +37,8 @@ class WebFrameProxy;
class WebFramePolicyListenerProxy : public APIObject {
public:
+ static const Type APIType = TypeFramePolicyListener;
+
static PassRefPtr<WebFramePolicyListenerProxy> create(WebFrameProxy* frame, uint64_t listenerID)
{
return adoptRef(new WebFramePolicyListenerProxy(frame, listenerID));
@@ -54,7 +56,7 @@ public:
private:
WebFramePolicyListenerProxy(WebFrameProxy*, uint64_t listenerID);
- virtual Type type() const { return TypeFramePolicyListener; }
+ virtual Type type() const { return APIType; }
void receivedPolicyDecision(WebCore::PolicyAction);
diff --git a/WebKit2/UIProcess/WebFrameProxy.h b/WebKit2/UIProcess/WebFrameProxy.h
index 5e8fd32..59d6be6 100644
--- a/WebKit2/UIProcess/WebFrameProxy.h
+++ b/WebKit2/UIProcess/WebFrameProxy.h
@@ -48,6 +48,8 @@ class WebPageProxy;
class WebFrameProxy : public APIObject {
public:
+ static const Type APIType = TypeFrame;
+
static PassRefPtr<WebFrameProxy> create(WebPageProxy* page, uint64_t frameID)
{
return adoptRef(new WebFrameProxy(page, frameID));
@@ -82,7 +84,7 @@ public:
private:
WebFrameProxy(WebPageProxy* page, uint64_t frameID);
- virtual Type type() const { return TypeFrame; }
+ virtual Type type() const { return APIType; }
WebPageProxy* m_page;
LoadState m_loadState;
diff --git a/WebKit2/UIProcess/WebNavigationData.h b/WebKit2/UIProcess/WebNavigationData.h
index 86e1642..f23e7da 100644
--- a/WebKit2/UIProcess/WebNavigationData.h
+++ b/WebKit2/UIProcess/WebNavigationData.h
@@ -34,6 +34,8 @@ namespace WebKit {
class WebNavigationData : public APIObject {
public:
+ static const Type APIType = TypeNavigationData;
+
static PassRefPtr<WebNavigationData> create(const WebNavigationDataStore& store)
{
return adoptRef(new WebNavigationData(store));
@@ -46,7 +48,7 @@ public:
private:
WebNavigationData(const WebNavigationDataStore&);
- virtual Type type() const { return TypeNavigationData; }
+ virtual Type type() const { return APIType; }
WebNavigationDataStore m_store;
};
diff --git a/WebKit2/UIProcess/WebPageNamespace.h b/WebKit2/UIProcess/WebPageNamespace.h
index 27cf715..3eca9d8 100644
--- a/WebKit2/UIProcess/WebPageNamespace.h
+++ b/WebKit2/UIProcess/WebPageNamespace.h
@@ -39,6 +39,8 @@ class WebContext;
class WebPageNamespace : public APIObject {
public:
+ static const Type APIType = TypePageNamespace;
+
static PassRefPtr<WebPageNamespace> create(WebContext* context)
{
return adoptRef(new WebPageNamespace(context));
@@ -59,7 +61,7 @@ public:
private:
WebPageNamespace(WebContext*);
- virtual Type type() const { return TypePageNamespace; }
+ virtual Type type() const { return APIType; }
RefPtr<WebContext> m_context;
};
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index bc7e793..21274c8 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -75,6 +75,8 @@ typedef GenericCallback<WKStringRef, WebCore::StringImpl*> ScriptReturnValueCall
class WebPageProxy : public APIObject {
public:
+ static const Type APIType = TypePage;
+
static PassRefPtr<WebPageProxy> create(WebPageNamespace*, uint64_t pageID);
~WebPageProxy();
@@ -162,7 +164,7 @@ public:
private:
WebPageProxy(WebPageNamespace*, uint64_t pageID);
- virtual Type type() const { return TypePage; }
+ virtual Type type() const { return APIType; }
void didCreateMainFrame(uint64_t frameID);
void didCreateSubFrame(uint64_t frameID);
diff --git a/WebKit2/UIProcess/WebPreferences.h b/WebKit2/UIProcess/WebPreferences.h
index fda8ddf..a8070c6 100644
--- a/WebKit2/UIProcess/WebPreferences.h
+++ b/WebKit2/UIProcess/WebPreferences.h
@@ -38,6 +38,8 @@ class WebContext;
class WebPreferences : public APIObject {
public:
+ static const Type APIType = TypePreferences;
+
static WebPreferences* shared();
static PassRefPtr<WebPreferences> create()
@@ -71,7 +73,7 @@ private:
WebPreferences();
WebPreferences(WebPreferences*);
- virtual Type type() const { return TypePreferences; }
+ virtual Type type() const { return APIType; }
void update();
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index d72de2b..3974b53 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -34,7 +34,7 @@ using namespace WebKit;
WKTypeID WKBundleGetTypeID()
{
- return toRef(APIObject::TypeBundle);
+ return toRef(InjectedBundle::APIType);
}
void WKBundleSetClient(WKBundleRef bundleRef, WKBundleClient * wkClient)
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index d88a965..5da8bae 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -36,7 +36,7 @@ using namespace WebKit;
WKTypeID WKBundleFrameGetTypeID()
{
- return toRef(APIObject::TypeBundleFrame);
+ return toRef(WebFrame::APIType);
}
bool WKBundleFrameIsMainFrame(WKBundleFrameRef frameRef)
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
index 1f25b0a..ade7da4 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
@@ -35,7 +35,7 @@ using namespace WebKit;
WKTypeID WKBundlePageGetTypeID()
{
- return toRef(APIObject::TypeBundlePage);
+ return toRef(WebPage::APIType);
}
void WKBundlePageSetEditorClient(WKBundlePageRef pageRef, WKBundlePageEditorClient* wkClient)
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
index d281269..8f49c65 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
@@ -51,6 +51,8 @@ class WebPage;
class InjectedBundle : public APIObject {
public:
+ static const Type APIType = TypeBundle;
+
static PassRefPtr<InjectedBundle> create(const WebCore::String& path)
{
return adoptRef(new InjectedBundle(path));
@@ -79,7 +81,7 @@ public:
private:
InjectedBundle(const WebCore::String&);
- virtual Type type() const { return TypeBundle; }
+ virtual Type type() const { return APIType; }
WebCore::String m_path;
PlatformBundle m_platformBundle; // This is leaked right now, since we never unload the bundle/module.
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.h b/WebKit2/WebProcess/WebPage/WebFrame.h
index c998231..419bd73 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.h
+++ b/WebKit2/WebProcess/WebPage/WebFrame.h
@@ -48,6 +48,8 @@ class WebPage;
class WebFrame : public APIObject {
public:
+ static const Type APIType = TypeBundleFrame;
+
static PassRefPtr<WebFrame> createMainFrame(WebPage*);
static PassRefPtr<WebFrame> createSubframe(WebPage*, const WebCore::String& frameName, WebCore::HTMLFrameOwnerElement*);
~WebFrame();
@@ -92,7 +94,7 @@ private:
static PassRefPtr<WebFrame> create(WebPage*, const WebCore::String& frameName, WebCore::HTMLFrameOwnerElement*);
WebFrame(WebPage*, const WebCore::String& frameName, WebCore::HTMLFrameOwnerElement*);
- virtual Type type() const { return TypeBundleFrame; }
+ virtual Type type() const { return APIType; }
WebPage* m_page;
WebCore::Frame* m_coreFrame;
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 2c9c754..3b68482 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -63,6 +63,8 @@ struct WebPreferencesStore;
class WebPage : public APIObject {
public:
+ static const Type APIType = TypeBundlePage;
+
static PassRefPtr<WebPage> create(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
~WebPage();
@@ -118,7 +120,7 @@ public:
private:
WebPage(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
- virtual Type type() const { return TypeBundlePage; }
+ virtual Type type() const { return APIType; }
void platformInitialize();
static const char* interpretKeyEvent(const WebCore::KeyboardEvent*);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list