[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:32:32 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 97cb2fd1f41ff20d197dd71db432dad5a9004b80
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 28 21:42:27 2010 +0000

    Patch for https://bugs.webkit.org/show_bug.cgi?id=43097
    Make all objects in the WebKit2 API inherit from a single base class
    
    Reviewed by Anders Carlsson.
    
    - Adds an APIObject base class for all objects which can get vender through
      the C API to inherit from.
    - Adds a WebString class which wraps WebCore::String for now. I am not too fond of
      this solution, so we continue should iterate on it.
    - This is a first step toward make a CF-style base type (eg. CFTypeRef) for the C-API.
    
    * Shared/APIObject.h: Added.
    (WebKit::APIObject::APIObject):
    Base class for API objects.
    
    * Shared/ImmutableArray.h:
    Make inherit from APIObject.
    
    * Shared/WebString.h: Added.
    (WebKit::WebString::create):
    (WebKit::WebString::isNull):
    (WebKit::WebString::isEmpty):
    (WebKit::WebString::string):
    (WebKit::WebString::WebString):
    Wraps a WebCore::String so that it can be passed out to the API
    and still inherit from APIObject.
    
    * UIProcess/API/C/WKAPICast.h:
    (WebKit::WebStringAdaptor::WebStringAdaptor):
    (WebKit::WebStringAdaptor::operator WKStringRef):
    (WebKit::WebStringAdaptor::operator WKURLRef):
    Update conversion methods to deal in terms of WebStrings. Added WebStringAdaptor
    to ease passing strings to client functions.
    
    * UIProcess/API/C/WKContext.cpp:
    (WKContextCreateWithInjectedBundlePath):
    (WKContextPostMessageToInjectedBundle):
    (_WKContextSetAdditionalPluginPath):
    (_WKContextRegisterURLSchemeAsEmptyDocument):
    Get the WebCore::String from the WebString.
    
    * UIProcess/API/C/WKPage.cpp:
    (WKPageLoadURL):
    Ditto.
    
    * UIProcess/API/C/WKString.cpp:
    (WKStringIsEmpty):
    Implement in terms of WebString.
    
    * UIProcess/API/C/WKURL.cpp:
    * UIProcess/API/C/cf/WKStringCF.cpp:
    (WKStringCreateWithCFString):
    (WKStringCopyCFString):
    Ditto.
    
    * UIProcess/API/C/cf/WKURLCF.cpp:
    (WKURLCreateWithCFURL):
    (WKURLCopyCFURL):
    Ditto.
    
    * UIProcess/WebBackForwardList.h:
    Make inherit from APIObject.
    
    * UIProcess/WebBackForwardListItem.h:
    Ditto.
    
    * UIProcess/WebContext.cpp:
    (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
    (WebKit::WebContext::postMessageToInjectedBundle):
    (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
    Use String instead of StringImpl to be consistent.
    
    * UIProcess/WebContext.h:
    Make inherit from APIObject.
    
    * UIProcess/WebFramePolicyListenerProxy.h:
    Ditto.
    
    * UIProcess/WebFrameProxy.h:
    Ditto.
    
    * UIProcess/WebNavigationData.h:
    Ditto.
    
    * UIProcess/WebPageNamespace.h:
    Ditto.
    
    * UIProcess/WebPageProxy.h:
    Ditto.
    
    * UIProcess/WebPreferences.h:
    Ditto.
    
    * UIProcess/WebUIClient.cpp:
    (WebKit::WebUIClient::runJavaScriptPrompt):
    Implement in terms of WebString.
    
    * UIProcess/win/WebView.h:
    Make inherit from APIObject.
    
    * WebKit2.xcodeproj/project.pbxproj:
    Add new files.
    
    * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
    (WKBundlePostMessage):
    Get the WebCore::String from the WebString.
    
    * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
    (WKBundleFramePauseAnimationOnElementWithId):
    Ditto.
    
    * WebProcess/InjectedBundle/InjectedBundle.cpp:
    (WebKit::InjectedBundle::postMessage):
    * WebProcess/InjectedBundle/InjectedBundle.h:
    Use String instead of StringImpl to be consistent.
    
    * WebProcess/WebPage/WebFrame.h:
    Make inherit from APIObject.
    
    * WebProcess/WebPage/WebPage.h:
    Make inherit from APIObject.
    
    * win/WebKit2.vcproj:
    Add new files.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64232 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index fba8ac5..c5bb70f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,130 @@
+2010-07-28  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Patch for https://bugs.webkit.org/show_bug.cgi?id=43097
+        Make all objects in the WebKit2 API inherit from a single base class
+
+        - Adds an APIObject base class for all objects which can get vender through
+          the C API to inherit from.
+        - Adds a WebString class which wraps WebCore::String for now. I am not too fond of
+          this solution, so we continue should iterate on it.
+        - This is a first step toward make a CF-style base type (eg. CFTypeRef) for the C-API.
+
+        * Shared/APIObject.h: Added.
+        (WebKit::APIObject::APIObject):
+        Base class for API objects.
+
+        * Shared/ImmutableArray.h:
+        Make inherit from APIObject.
+
+        * Shared/WebString.h: Added.
+        (WebKit::WebString::create):
+        (WebKit::WebString::isNull):
+        (WebKit::WebString::isEmpty):
+        (WebKit::WebString::string):
+        (WebKit::WebString::WebString):
+        Wraps a WebCore::String so that it can be passed out to the API
+        and still inherit from APIObject.
+
+        * UIProcess/API/C/WKAPICast.h:
+        (WebKit::WebStringAdaptor::WebStringAdaptor):
+        (WebKit::WebStringAdaptor::operator WKStringRef):
+        (WebKit::WebStringAdaptor::operator WKURLRef):
+        Update conversion methods to deal in terms of WebStrings. Added WebStringAdaptor
+        to ease passing strings to client functions.
+
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextCreateWithInjectedBundlePath):
+        (WKContextPostMessageToInjectedBundle):
+        (_WKContextSetAdditionalPluginPath):
+        (_WKContextRegisterURLSchemeAsEmptyDocument): 
+        Get the WebCore::String from the WebString.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageLoadURL):
+        Ditto.
+
+        * UIProcess/API/C/WKString.cpp:
+        (WKStringIsEmpty):
+        Implement in terms of WebString.
+
+        * UIProcess/API/C/WKURL.cpp:
+        * UIProcess/API/C/cf/WKStringCF.cpp:
+        (WKStringCreateWithCFString):
+        (WKStringCopyCFString):
+        Ditto.
+    
+        * UIProcess/API/C/cf/WKURLCF.cpp:
+        (WKURLCreateWithCFURL):
+        (WKURLCopyCFURL):
+        Ditto.
+
+        * UIProcess/WebBackForwardList.h:
+        Make inherit from APIObject.
+
+        * UIProcess/WebBackForwardListItem.h:
+        Ditto.
+
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
+        (WebKit::WebContext::postMessageToInjectedBundle):
+        (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
+        Use String instead of StringImpl to be consistent.
+
+        * UIProcess/WebContext.h:
+        Make inherit from APIObject.
+
+        * UIProcess/WebFramePolicyListenerProxy.h:
+        Ditto.
+
+        * UIProcess/WebFrameProxy.h:
+        Ditto.
+
+        * UIProcess/WebNavigationData.h:
+        Ditto.
+
+        * UIProcess/WebPageNamespace.h:
+        Ditto.
+
+        * UIProcess/WebPageProxy.h:
+        Ditto.
+
+        * UIProcess/WebPreferences.h:
+        Ditto.
+
+        * UIProcess/WebUIClient.cpp:
+        (WebKit::WebUIClient::runJavaScriptPrompt):
+        Implement in terms of WebString.
+
+        * UIProcess/win/WebView.h:
+        Make inherit from APIObject.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new files.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundlePostMessage):
+        Get the WebCore::String from the WebString.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+        (WKBundleFramePauseAnimationOnElementWithId):
+        Ditto.
+
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::postMessage):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+        Use String instead of StringImpl to be consistent.
+
+        * WebProcess/WebPage/WebFrame.h:
+        Make inherit from APIObject.
+
+        * WebProcess/WebPage/WebPage.h:
+        Make inherit from APIObject.
+
+        * win/WebKit2.vcproj:
+        Add new files.
+
 2010-07-28  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebKit2/Shared/APIObject.h b/WebKit2/Shared/APIObject.h
new file mode 100644
index 0000000..cb45b2d
--- /dev/null
+++ b/WebKit2/Shared/APIObject.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APIObject_h
+#define APIObject_h
+
+#include <wtf/RefCounted.h>
+
+namespace WebKit {
+
+class APIObject : public RefCounted<APIObject> {
+protected:
+    APIObject()
+    {
+    }
+};
+
+} // namespace WebKit
+
+#endif // APIObject_h
diff --git a/WebKit2/Shared/ImmutableArray.h b/WebKit2/Shared/ImmutableArray.h
index fbdc40d..3382ec6 100644
--- a/WebKit2/Shared/ImmutableArray.h
+++ b/WebKit2/Shared/ImmutableArray.h
@@ -26,14 +26,14 @@
 #ifndef ImmutableArray_h
 #define ImmutableArray_h
 
+#include "APIObject.h"
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 
 namespace WebKit {
 
 // ImmutableArray - An immutable array type suitable for vending to an API.
 
-class ImmutableArray : public RefCounted<ImmutableArray> {
+class ImmutableArray : public APIObject {
 public:
     struct ImmutableArrayCallbacks {
         typedef void (*ImmutableArrayCallback)(const void*);
diff --git a/WebKit2/Shared/WebString.h b/WebKit2/Shared/WebString.h
new file mode 100644
index 0000000..b6764b6
--- /dev/null
+++ b/WebKit2/Shared/WebString.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebString_h
+#define WebString_h
+
+#include "APIObject.h"
+#include <WebCore/PlatformString.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+// WebString - An string array type suitable for vending to an API.
+
+class WebString : public APIObject {
+public:
+    static PassRefPtr<WebString> create(const WebCore::String& string)
+    {
+        return adoptRef(new WebString(string));
+    }
+
+    bool isNull() const { return m_string.isNull(); }
+    bool isEmpty() const { return m_string.isEmpty(); }
+
+    const WebCore::String& string() const { return m_string; }
+
+private:
+    WebString(const WebCore::String& string)
+        : m_string(string)
+    {
+    }
+
+    WebCore::String m_string;
+};
+
+} // namespace WebKit
+
+#endif // WebString_h
diff --git a/WebKit2/UIProcess/API/C/WKAPICast.h b/WebKit2/UIProcess/API/C/WKAPICast.h
index 7a8fe82..dd591e0 100644
--- a/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -28,8 +28,8 @@
 
 #include "WKBase.h"
 #include "WKPage.h"
+#include "WebString.h"
 #include <WebCore/FrameLoaderTypes.h>
-#include <WebCore/PlatformString.h>
 
 #if defined(WIN32) || defined(_WIN32)
 #include "WKAPICastWin.h"
@@ -47,6 +47,7 @@ class WebNavigationData;
 class WebPageNamespace;
 class WebPageProxy;
 class WebPreferences;
+class WebString;
 
 template<typename APIType> struct APITypeInfo { };
 template<> struct APITypeInfo<WKFrameRef>                       { typedef WebFrameProxy* ImplType; };
@@ -55,8 +56,8 @@ template<> struct APITypeInfo<WKContextRef>                     { typedef WebCon
 template<> struct APITypeInfo<WKPageNamespaceRef>               { typedef WebPageNamespace* ImplType; };
 template<> struct APITypeInfo<WKFramePolicyListenerRef>         { typedef WebFramePolicyListenerProxy* ImplType; };
 template<> struct APITypeInfo<WKPreferencesRef>                 { typedef WebPreferences* ImplType; };
-template<> struct APITypeInfo<WKStringRef>                      { typedef WebCore::StringImpl* ImplType; };
-template<> struct APITypeInfo<WKURLRef>                         { typedef WebCore::StringImpl* ImplType; };
+template<> struct APITypeInfo<WKStringRef>                      { typedef WebKit::WebString* ImplType; };
+template<> struct APITypeInfo<WKURLRef>                         { typedef WebKit::WebString* ImplType; };
 template<> struct APITypeInfo<WKNavigationDataRef>              { typedef WebNavigationData* ImplType; };
 template<> struct APITypeInfo<WKArrayRef>                       { typedef ImmutableArray* ImplType; };
 template<> struct APITypeInfo<WKBackForwardListItemRef>         { typedef WebBackForwardListItem* ImplType; };
@@ -69,12 +70,26 @@ template<> struct ImplTypeInfo<WebContext*>                     { typedef WKCont
 template<> struct ImplTypeInfo<WebPageNamespace*>               { typedef WKPageNamespaceRef APIType; };
 template<> struct ImplTypeInfo<WebFramePolicyListenerProxy*>    { typedef WKFramePolicyListenerRef APIType; };
 template<> struct ImplTypeInfo<WebPreferences*>                 { typedef WKPreferencesRef APIType; };
-template<> struct ImplTypeInfo<WebCore::StringImpl*>            { typedef WKStringRef APIType; };
+template<> struct ImplTypeInfo<WebString*>                      { typedef WKStringRef APIType; };
 template<> struct ImplTypeInfo<WebNavigationData*>              { typedef WKNavigationDataRef APIType; };
 template<> struct ImplTypeInfo<ImmutableArray*>                 { typedef WKArrayRef APIType; };
 template<> struct ImplTypeInfo<WebBackForwardListItem*>         { typedef WKBackForwardListItemRef APIType; };
 template<> struct ImplTypeInfo<WebBackForwardList*>             { typedef WKBackForwardListRef APIType; };
 
+class WebStringAdaptor {
+public:
+    WebStringAdaptor(PassRefPtr<WebString> impl)
+        : m_impl(impl)
+    {
+    }
+
+    operator WKStringRef() { return reinterpret_cast<WKStringRef>(m_impl.get()); }
+    operator WKURLRef() { return reinterpret_cast<WKURLRef>(m_impl.get()); }
+
+private:
+    RefPtr<WebString> m_impl;
+};
+
 } // namespace WebKit
 
 /* Opaque typing convenience methods */
@@ -93,30 +108,30 @@ inline typename WebKit::ImplTypeInfo<T>::APIType toRef(T t)
 
 /* Special cases. */
 
-inline WKStringRef toRef(WebCore::StringImpl* string)
+inline WebKit::WebStringAdaptor toRef(WebCore::StringImpl* string)
 {
     WebCore::StringImpl* impl = string ? string : WebCore::StringImpl::empty();
-    return reinterpret_cast<WKStringRef>(impl);
+    return WebKit::WebStringAdaptor(WebKit::WebString::create(WebCore::String(impl)));
 }
 
-inline WKURLRef toURLRef(WebCore::StringImpl* string)
+inline WebKit::WebStringAdaptor toURLRef(WebCore::StringImpl* string)
 {
     WebCore::StringImpl* impl = string ? string : WebCore::StringImpl::empty();
-    return reinterpret_cast<WKURLRef>(impl);
+    return WebKit::WebStringAdaptor(WebKit::WebString::create(WebCore::String(impl)))   ;
 }
 
 inline WKStringRef toCopiedRef(const WebCore::String& string)
 {
     WebCore::StringImpl* impl = string.impl() ? string.impl() : WebCore::StringImpl::empty();
-    impl->ref();
-    return reinterpret_cast<WKStringRef>(impl);
+    RefPtr<WebKit::WebString> webString = WebKit::WebString::create(WebCore::String(impl));
+    return reinterpret_cast<WKStringRef>(webString.release().releaseRef());
 }
 
 inline WKURLRef toCopiedURLRef(const WebCore::String& string)
 {
     WebCore::StringImpl* impl = string.impl() ? string.impl() : WebCore::StringImpl::empty();
-    impl->ref();
-    return reinterpret_cast<WKURLRef>(impl);
+    RefPtr<WebKit::WebString> webString = WebKit::WebString::create(WebCore::String(impl));
+    return reinterpret_cast<WKURLRef>(webString.release().releaseRef());
 }
 
 inline WKFrameNavigationType toWK(WebCore::NavigationType type)
diff --git a/WebKit2/UIProcess/API/C/WKContext.cpp b/WebKit2/UIProcess/API/C/WKContext.cpp
index 2a67000..d9b358f 100644
--- a/WebKit2/UIProcess/API/C/WKContext.cpp
+++ b/WebKit2/UIProcess/API/C/WKContext.cpp
@@ -43,7 +43,7 @@ WKContextRef WKContextCreate()
 
 WKContextRef WKContextCreateWithInjectedBundlePath(WKStringRef pathRef)
 {
-    RefPtr<WebContext> context = WebContext::create(toWK(pathRef));
+    RefPtr<WebContext> context = WebContext::create(toWK(pathRef)->string());
     return toRef(context.release().releaseRef());
 }
 
@@ -75,7 +75,7 @@ void WKContextSetInjectedBundleClient(WKContextRef contextRef, WKContextInjected
 
 void WKContextPostMessageToInjectedBundle(WKContextRef contextRef, WKStringRef messageRef)
 {
-    toWK(contextRef)->postMessageToInjectedBundle(toWK(messageRef));
+    toWK(contextRef)->postMessageToInjectedBundle(toWK(messageRef)->string());
 }
 
 void WKContextGetStatistics(WKContextRef contextRef, WKContextStatistics* statistics)
@@ -96,10 +96,10 @@ void WKContextRelease(WKContextRef contextRef)
 
 void _WKContextSetAdditionalPluginPath(WKContextRef contextRef, WKStringRef pluginPath)
 {
-    toWK(contextRef)->setAdditionalPluginPath(toWK(pluginPath));
+    toWK(contextRef)->setAdditionalPluginPath(toWK(pluginPath)->string());
 }
 
 void _WKContextRegisterURLSchemeAsEmptyDocument(WKContextRef contextRef, WKStringRef urlScheme)
 {
-    toWK(contextRef)->registerURLSchemeAsEmptyDocument(toWK(urlScheme));
+    toWK(contextRef)->registerURLSchemeAsEmptyDocument(toWK(urlScheme)->string());
 }
diff --git a/WebKit2/UIProcess/API/C/WKPage.cpp b/WebKit2/UIProcess/API/C/WKPage.cpp
index e718e0e..a338d26 100644
--- a/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -43,7 +43,7 @@ WKPageNamespaceRef WKPageGetPageNamespace(WKPageRef pageRef)
 
 void WKPageLoadURL(WKPageRef pageRef, WKURLRef URLRef)
 {
-    toWK(pageRef)->loadURL(toWK(URLRef));
+    toWK(pageRef)->loadURL(toWK(URLRef)->string());
 }
 
 void WKPageStopLoading(WKPageRef pageRef)
@@ -152,7 +152,7 @@ void WKPageSetPageHistoryClient(WKPageRef pageRef, WKPageHistoryClient * wkClien
 
 void WKPageRunJavaScriptInMainFrame(WKPageRef pageRef, WKStringRef scriptRef, void* context, WKPageRunJavaScriptFunction callback, WKPageRunJavaScriptDisposeFunction disposeFunction)
 {
-    toWK(pageRef)->runJavaScriptInMainFrame(toWK(scriptRef), ScriptReturnValueCallback::create(context, callback, disposeFunction));
+    toWK(pageRef)->runJavaScriptInMainFrame(toWK(scriptRef)->string(), ScriptReturnValueCallback::create(context, callback, disposeFunction));
 }
 
 #ifdef __BLOCKS__
@@ -175,7 +175,7 @@ void WKPageRunJavaScriptInMainFrame_b(WKPageRef pageRef, WKStringRef scriptRef,
 }
 #endif
 
-void WKPageRenderTreeExternalRepresentation(WKPageRef pageRef, void *context, WKPageRenderTreeExternalRepresentationFunction callback, WKPageRenderTreeExternalRepresentationDisposeFunction disposeFunction)
+void WKPageRenderTreeExternalRepresentation(WKPageRef pageRef, void* context, WKPageRenderTreeExternalRepresentationFunction callback, WKPageRenderTreeExternalRepresentationDisposeFunction disposeFunction)
 {
     toWK(pageRef)->getRenderTreeExternalRepresentation(RenderTreeExternalRepresentationCallback::create(context, callback, disposeFunction));
 }
diff --git a/WebKit2/UIProcess/API/C/WKString.cpp b/WebKit2/UIProcess/API/C/WKString.cpp
index b12021c..cc53d36 100644
--- a/WebKit2/UIProcess/API/C/WKString.cpp
+++ b/WebKit2/UIProcess/API/C/WKString.cpp
@@ -26,7 +26,6 @@
 #include "WKString.h"
 
 #include "WKAPICast.h"
-#include <WebCore/StringImpl.h>
 
 WKStringRef WKStringRetain(WKStringRef stringRef)
 {
@@ -41,5 +40,5 @@ void WKStringRelease(WKStringRef stringRef)
 
 bool WKStringIsEmpty(WKStringRef stringRef)
 {
-    return !toWK(stringRef)->length();
+    return toWK(stringRef)->isEmpty();
 }
diff --git a/WebKit2/UIProcess/API/C/WKURL.cpp b/WebKit2/UIProcess/API/C/WKURL.cpp
index 2efc8ca..bb4b47d 100644
--- a/WebKit2/UIProcess/API/C/WKURL.cpp
+++ b/WebKit2/UIProcess/API/C/WKURL.cpp
@@ -26,7 +26,6 @@
 #include "WKURL.h"
 
 #include "WKAPICast.h"
-#include <WebCore/StringImpl.h>
 
 WKURLRef WKURLRetain(WKURLRef URLRef)
 {
diff --git a/WebKit2/UIProcess/API/C/cf/WKStringCF.cpp b/WebKit2/UIProcess/API/C/cf/WKStringCF.cpp
index 86c0615..531f561 100644
--- a/WebKit2/UIProcess/API/C/cf/WKStringCF.cpp
+++ b/WebKit2/UIProcess/API/C/cf/WKStringCF.cpp
@@ -33,13 +33,14 @@ using namespace WebCore;
 WKStringRef WKStringCreateWithCFString(CFStringRef cfString)
 {
     String string(cfString);
-    RefPtr<StringImpl> stringImpl = string.impl();
-    return toRef(stringImpl.release().releaseRef());
+    return toCopiedRef(string);
 }
 
 CFStringRef WKStringCopyCFString(CFAllocatorRef allocatorRef, WKStringRef stringRef)
 {
+    ASSERT(!toWK(stringRef)->string().isNull());
+
     // NOTE: This does not use StringImpl::createCFString() since that function
     // expects to be called on the thread running WebCore.
-    return CFStringCreateWithCharacters(allocatorRef, reinterpret_cast<const UniChar*>(toWK(stringRef)->characters()), toWK(stringRef)->length());
+    return CFStringCreateWithCharacters(allocatorRef, reinterpret_cast<const UniChar*>(toWK(stringRef)->string().characters()), toWK(stringRef)->string().length());
 }
diff --git a/WebKit2/UIProcess/API/C/cf/WKURLCF.cpp b/WebKit2/UIProcess/API/C/cf/WKURLCF.cpp
index 84a7824..83ba0eb 100644
--- a/WebKit2/UIProcess/API/C/cf/WKURLCF.cpp
+++ b/WebKit2/UIProcess/API/C/cf/WKURLCF.cpp
@@ -37,16 +37,17 @@ using namespace WebKit;
 WKURLRef WKURLCreateWithCFURL(CFURLRef cfURL)
 {
     String urlString(CFURLGetString(cfURL));
-    RefPtr<StringImpl> urlStringImpl = urlString.impl();
-    return toURLRef(urlStringImpl.release().releaseRef());
+    return toCopiedURLRef(urlString);
 }
 
 CFURLRef WKURLCopyCFURL(CFAllocatorRef allocatorRef, WKURLRef URLRef)
 {
+    ASSERT(!toWK(URLRef)->string().isNull());
+
     // We first create a CFString and then create the CFURL from it. This will ensure that the CFURL is stored in 
     // UTF-8 which uses less memory and is what WebKit clients might expect.
-    RetainPtr<CFStringRef> urlString(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, reinterpret_cast<const UniChar*>(toWK(URLRef)->characters()), 
-                                                                                toWK(URLRef)->length(), kCFAllocatorNull));
+    RetainPtr<CFStringRef> urlString(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, reinterpret_cast<const UniChar*>(toWK(URLRef)->string().characters()), 
+                                                                                toWK(URLRef)->string().length(), kCFAllocatorNull));
 
     return CFURLCreateWithString(allocatorRef, urlString.get(), 0);
 }
diff --git a/WebKit2/UIProcess/WebBackForwardList.h b/WebKit2/UIProcess/WebBackForwardList.h
index d1348e1..6530410 100644
--- a/WebKit2/UIProcess/WebBackForwardList.h
+++ b/WebKit2/UIProcess/WebBackForwardList.h
@@ -26,12 +26,12 @@
 #ifndef WebBackForwardList_h
 #define WebBackForwardList_h
 
+#include "APIObject.h"
 #include "ImmutableArray.h"
 #include "WebBackForwardListItem.h"
-#include <wtf/Vector.h>
-#include <wtf/RefPtr.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
 
 namespace WebKit {
 
@@ -45,7 +45,7 @@ typedef Vector<RefPtr<WebBackForwardListItem> > BackForwardListItemVector;
  *      Back        Forward
  */
 
-class WebBackForwardList : public RefCounted<WebBackForwardList> {
+class WebBackForwardList : public APIObject {
 public:
     static PassRefPtr<WebBackForwardList> create(WebPageProxy* page)
     {
diff --git a/WebKit2/UIProcess/WebBackForwardListItem.h b/WebKit2/UIProcess/WebBackForwardListItem.h
index 99bb95f..5d422a4 100644
--- a/WebKit2/UIProcess/WebBackForwardListItem.h
+++ b/WebKit2/UIProcess/WebBackForwardListItem.h
@@ -26,15 +26,15 @@
 #ifndef WebBackForwardListItem_h
 #define WebBackForwardListItem_h
 
+#include "APIObject.h"
 #include <WebCore/PlatformString.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 
 namespace WebKit {
 
 class WebPageProxy;
 
-class WebBackForwardListItem : public RefCounted<WebBackForwardListItem> {
+class WebBackForwardListItem : public APIObject {
 public:
     static PassRefPtr<WebBackForwardListItem> create(const WebCore::String& originalURL, const WebCore::String& url, const WebCore::String& title, uint64_t itemID)
     {
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 6ea31f6..4d4a1d6 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -152,17 +152,17 @@ void WebContext::preferencesDidChange()
 
 // InjectedBundle client
 
-void WebContext::didReceiveMessageFromInjectedBundle(const WebCore::String& message)
+void WebContext::didReceiveMessageFromInjectedBundle(const String& message)
 {
     m_injectedBundleClient.didReceiveMessageFromInjectedBundle(this, message);
 }
 
-void WebContext::postMessageToInjectedBundle(WebCore::StringImpl* message)
+void WebContext::postMessageToInjectedBundle(const String& message)
 {
     if (!m_process)
         return;
 
-    m_process->send(WebProcessMessage::PostMessage, 0, CoreIPC::In(String(message)));
+    m_process->send(WebProcessMessage::PostMessage, 0, CoreIPC::In(message));
 }
 
 void WebContext::getStatistics(WKContextStatistics* statistics)
@@ -183,11 +183,11 @@ void WebContext::setAdditionalPluginPath(const WebCore::String& pluginPath)
     m_pluginInfoStore.setAdditionalPluginPaths(pluginPaths);
 }
 
-void WebContext::registerURLSchemeAsEmptyDocument(WebCore::StringImpl* urlScheme)
+void WebContext::registerURLSchemeAsEmptyDocument(const String& urlScheme)
 {
     ensureWebProcess();
 
-    m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(String(urlScheme)));
+    m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(urlScheme));
 }
 
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 521ab1c..2951bde 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -26,6 +26,7 @@
 #ifndef WebContext_h
 #define WebContext_h
 
+#include "APIObject.h"
 #include "PluginInfoStore.h"
 #include "ProcessModel.h"
 #include "WebContextInjectedBundleClient.h"
@@ -33,7 +34,6 @@
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 struct WKContextStatistics;
@@ -45,7 +45,7 @@ class WebPageProxy;
 class WebPreferences;
 class WebProcessProxy;
 
-class WebContext : public RefCounted<WebContext> {
+class WebContext : public APIObject {
 public:
     static WebContext* sharedProcessContext();
     static WebContext* sharedThreadContext();
@@ -78,7 +78,7 @@ public:
     // InjectedBundle client
     void didReceiveMessageFromInjectedBundle(const WebCore::String&);
 
-    void postMessageToInjectedBundle(WebCore::StringImpl*);
+    void postMessageToInjectedBundle(const WebCore::String&);
 
     void getStatistics(WKContextStatistics* statistics);
     void setAdditionalPluginPath(const WebCore::String&);
@@ -86,7 +86,7 @@ public:
     PluginInfoStore* pluginInfoStore() { return &m_pluginInfoStore; }
     WebCore::String applicationCacheDirectory();
     
-    void registerURLSchemeAsEmptyDocument(WebCore::StringImpl*);
+    void registerURLSchemeAsEmptyDocument(const WebCore::String&);
 
 private:
     WebContext(ProcessModel, const WebCore::String& injectedBundlePath);
diff --git a/WebKit2/UIProcess/WebFramePolicyListenerProxy.h b/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
index 1efb3c4..9419d75 100644
--- a/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
+++ b/WebKit2/UIProcess/WebFramePolicyListenerProxy.h
@@ -26,16 +26,16 @@
 #ifndef WebFramePolicyListenerProxy_h
 #define WebFramePolicyListenerProxy_h
 
+#include "APIObject.h"
 #include <WebCore/FrameLoaderTypes.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace WebKit {
 
 class WebFrameProxy;
 
-class WebFramePolicyListenerProxy : public RefCounted<WebFramePolicyListenerProxy> {
+class WebFramePolicyListenerProxy : public APIObject {
 public:
     static PassRefPtr<WebFramePolicyListenerProxy> create(WebFrameProxy* frame, uint64_t listenerID)
     {
diff --git a/WebKit2/UIProcess/WebFrameProxy.h b/WebKit2/UIProcess/WebFrameProxy.h
index 625e39c..d0b5bf1 100644
--- a/WebKit2/UIProcess/WebFrameProxy.h
+++ b/WebKit2/UIProcess/WebFrameProxy.h
@@ -26,11 +26,11 @@
 #ifndef WebFrameProxy_h
 #define WebFrameProxy_h
 
+#include "APIObject.h"
 #include "WebFramePolicyListenerProxy.h"
 #include <WebCore/FrameLoaderTypes.h>
 #include <WebCore/PlatformString.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 
 namespace CoreIPC {
     class ArgumentDecoder;
@@ -46,7 +46,7 @@ namespace WebKit {
 
 class WebPageProxy;
 
-class WebFrameProxy : public RefCounted<WebFrameProxy> {
+class WebFrameProxy : public APIObject {
 public:
     static PassRefPtr<WebFrameProxy> create(WebPageProxy* page, uint64_t frameID)
     {
diff --git a/WebKit2/UIProcess/WebNavigationData.h b/WebKit2/UIProcess/WebNavigationData.h
index 6e376b4..a425ba6 100644
--- a/WebKit2/UIProcess/WebNavigationData.h
+++ b/WebKit2/UIProcess/WebNavigationData.h
@@ -26,13 +26,13 @@
 #ifndef WebNavigationData_h
 #define WebNavigationData_h
 
+#include "APIObject.h"
 #include "WebNavigationDataStore.h"
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 
 namespace WebKit {
 
-class WebNavigationData : public RefCounted<WebNavigationData> {
+class WebNavigationData : public APIObject {
 public:
     static PassRefPtr<WebNavigationData> create(const WebNavigationDataStore& store)
     {
diff --git a/WebKit2/UIProcess/WebPageNamespace.h b/WebKit2/UIProcess/WebPageNamespace.h
index 0299a50..6cba399 100644
--- a/WebKit2/UIProcess/WebPageNamespace.h
+++ b/WebKit2/UIProcess/WebPageNamespace.h
@@ -26,9 +26,9 @@
 #ifndef WebPageNamespace_h
 #define WebPageNamespace_h
 
+#include "APIObject.h"
 #include "WebContext.h"
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 struct WKContextStatistics;
@@ -37,7 +37,7 @@ namespace WebKit {
 
 class WebContext;
 
-class WebPageNamespace : public RefCounted<WebPageNamespace> {
+class WebPageNamespace : public APIObject {
 public:
     static PassRefPtr<WebPageNamespace> create(WebContext* context)
     {
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 69d5227..731e710 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -26,6 +26,7 @@
 #ifndef WebPageProxy_h
 #define WebPageProxy_h
 
+#include "APIObject.h"
 #include "DrawingAreaProxy.h"
 #include "GenericCallback.h"
 #include "WKBase.h"
@@ -41,7 +42,6 @@
 #include <wtf/OwnPtr.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace CoreIPC {
@@ -70,10 +70,10 @@ class WebProcessProxy;
 class WebWheelEvent;
 struct WebNavigationDataStore;
 
-typedef GenericCallback<WKStringRef> RenderTreeExternalRepresentationCallback;
-typedef GenericCallback<WKStringRef> ScriptReturnValueCallback;
+typedef GenericCallback<WKStringRef, WebCore::StringImpl*> RenderTreeExternalRepresentationCallback;
+typedef GenericCallback<WKStringRef, WebCore::StringImpl*> ScriptReturnValueCallback;
 
-class WebPageProxy : public RefCounted<WebPageProxy> {
+class WebPageProxy : public APIObject {
 public:
     static PassRefPtr<WebPageProxy> create(WebPageNamespace*, uint64_t pageID);
     ~WebPageProxy();
diff --git a/WebKit2/UIProcess/WebPreferences.h b/WebKit2/UIProcess/WebPreferences.h
index c93a754..1ce5b14 100644
--- a/WebKit2/UIProcess/WebPreferences.h
+++ b/WebKit2/UIProcess/WebPreferences.h
@@ -26,17 +26,17 @@
 #ifndef WebPreferences_h
 #define WebPreferences_h
 
+#include "APIObject.h"
 #include "WebPreferencesStore.h"
 #include <wtf/HashSet.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace WebKit {
 
 class WebContext;
 
-class WebPreferences : public RefCounted<WebPreferences> {
+class WebPreferences : public APIObject {
 public:
     static WebPreferences* shared();
 
diff --git a/WebKit2/UIProcess/WebUIClient.cpp b/WebKit2/UIProcess/WebUIClient.cpp
index bc3ea1a..95f3ce5 100644
--- a/WebKit2/UIProcess/WebUIClient.cpp
+++ b/WebKit2/UIProcess/WebUIClient.cpp
@@ -91,12 +91,12 @@ String WebUIClient::runJavaScriptPrompt(WebPageProxy* page, const String& messag
     if (!m_pageUIClient.runJavaScriptPrompt)
         return String();
 
-    StringImpl* impl = toWK(m_pageUIClient.runJavaScriptPrompt(toRef(page), toRef(message.impl()), toRef(defaultValue.impl()), toRef(frame), m_pageUIClient.clientInfo));
-    if (!impl)
+    WebString* string = toWK(m_pageUIClient.runJavaScriptPrompt(toRef(page), toRef(message.impl()), toRef(defaultValue.impl()), toRef(frame), m_pageUIClient.clientInfo));
+    if (!string)
         return String();
 
-    String result = impl;
-    impl->deref();
+    String result = string->string();
+    string->deref();
 
     return result;
 }
diff --git a/WebKit2/UIProcess/win/WebView.h b/WebKit2/UIProcess/win/WebView.h
index 1e2ef4f..64d7c5d 100644
--- a/WebKit2/UIProcess/win/WebView.h
+++ b/WebKit2/UIProcess/win/WebView.h
@@ -26,11 +26,11 @@
 #ifndef WebView_h
 #define WebView_h
 
+#include "APIObject.h"
 #include "PageClient.h"
 #include "WebPageProxy.h"
 #include <WebCore/WindowMessageListener.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
@@ -42,7 +42,7 @@ namespace WebKit {
 class DrawingAreaProxy;
 class WebPageNamespace;
 
-class WebView : public RefCounted<WebView>, public PageClient, WebCore::WindowMessageListener {
+class WebView : public APIObject, public PageClient, WebCore::WindowMessageListener {
 public:
     static PassRefPtr<WebView> create(RECT rect, WebPageNamespace* pageNamespace, HWND hostWindow)
     {
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 9b6afb6..d715ad7 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -547,6 +547,8 @@
 		BCEE98CB1133174C006BCC24 /* WKPageNamespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageNamespace.h; sourceTree = "<group>"; };
 		BCF049E411FE20F600F86A58 /* WKBundleFramePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleFramePrivate.h; sourceTree = "<group>"; };
 		BCF049E511FE20F600F86A58 /* WKBundlePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePrivate.h; sourceTree = "<group>"; };
+		BCF04C8C11FF9B7D00F86A58 /* APIObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIObject.h; sourceTree = "<group>"; };
+		BCF04C8E11FF9F6E00F86A58 /* WebString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebString.h; sourceTree = "<group>"; };
 		BCF69F841176CD6F00471A52 /* WebHistoryClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebHistoryClient.cpp; sourceTree = "<group>"; };
 		BCF69F851176CD6F00471A52 /* WebHistoryClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryClient.h; sourceTree = "<group>"; };
 		BCF69F981176CED600471A52 /* WebNavigationDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNavigationDataStore.h; sourceTree = "<group>"; };
@@ -745,6 +747,8 @@
 			children = (
 				BC111B5F112F635E00337BAB /* CoreIPCSupport */,
 				BC111B5A112F628200337BAB /* mac */,
+				BCF04C8C11FF9B7D00F86A58 /* APIObject.h */,
+				BCF04C8E11FF9F6E00F86A58 /* WebString.h */,
 				1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */,
 				BC64696D11DBE603006455B0 /* ImmutableArray.cpp */,
 				BC64696E11DBE603006455B0 /* ImmutableArray.h */,
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index 1e1c314..435b905 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -40,7 +40,7 @@ void WKBundleSetClient(WKBundleRef bundleRef, WKBundleClient * wkClient)
 
 void WKBundlePostMessage(WKBundleRef bundleRef, WKStringRef messageRef)
 {
-    toWK(bundleRef)->postMessage(toWK(messageRef));
+    toWK(bundleRef)->postMessage(toWK(messageRef)->string());
 }
 
 void WKBundleSetShouldTrackVisitedLinks(WKBundleRef bundleRef, bool shouldTrackVisitedLinks)
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index ddad52e..98aa147 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -56,7 +56,7 @@ unsigned WKBundleFrameGetNumberOfActiveAnimations(WKBundleFrameRef frameRef)
 
 bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frameRef, WKStringRef name, WKStringRef elementID, double time)
 {
-    return toWK(frameRef)->pauseAnimationOnElementWithId(toWK(name), toWK(elementID), time);
+    return toWK(frameRef)->pauseAnimationOnElementWithId(toWK(name)->string(), toWK(elementID)->string(), time);
 }
 
 JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frameRef)
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
index cd15c3c..7f78f4b 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
@@ -55,9 +55,9 @@ void InjectedBundle::initializeClient(WKBundleClient* client)
         memset(&m_client, 0, sizeof(m_client));
 }
 
-void InjectedBundle::postMessage(StringImpl* message)
+void InjectedBundle::postMessage(const String& message)
 {
-    WebProcess::shared().connection()->send(WebProcessProxyMessage::PostMessage, 0, CoreIPC::In(String(message)));
+    WebProcess::shared().connection()->send(WebProcessProxyMessage::PostMessage, 0, CoreIPC::In(message));
 }
 
 void InjectedBundle::setShouldTrackVisitedLinks(bool shouldTrackVisitedLinks)
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
index 2d1c67e..6f5ecca 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
@@ -59,7 +59,7 @@ public:
 
     // API
     void initializeClient(WKBundleClient*);
-    void postMessage(WebCore::StringImpl*);
+    void postMessage(const WebCore::String&);
     void setShouldTrackVisitedLinks(bool);
     void removeAllVisitedLinks();
 
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.h b/WebKit2/WebProcess/WebPage/WebFrame.h
index f3f3a7b..1468095 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.h
+++ b/WebKit2/WebProcess/WebPage/WebFrame.h
@@ -26,6 +26,7 @@
 #ifndef WebFrame_h
 #define WebFrame_h
 
+#include "APIObject.h"
 #include "ImmutableArray.h"
 #include "WebFrameLoaderClient.h"
 #include <JavaScriptCore/JSBase.h>
@@ -33,7 +34,6 @@
 #include <WebCore/FrameLoaderTypes.h>
 #include <WebCore/PolicyChecker.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
@@ -46,7 +46,7 @@ namespace WebKit {
 
 class WebPage;
 
-class WebFrame : public RefCounted<WebFrame> {
+class WebFrame : public APIObject {
 public:
     static PassRefPtr<WebFrame> createMainFrame(WebPage*);
     static PassRefPtr<WebFrame> createSubframe(WebPage*, const WebCore::String& frameName, WebCore::HTMLFrameOwnerElement*);
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 042304f..172bce6 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -26,6 +26,7 @@
 #ifndef WebPage_h
 #define WebPage_h
 
+#include "APIObject.h"
 #include "DrawingArea.h"
 #include "InjectedBundlePageEditorClient.h"
 #include "InjectedBundlePageLoaderClient.h"
@@ -35,7 +36,6 @@
 #include <wtf/HashMap.h>
 #include <wtf/OwnPtr.h>
 #include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 
 namespace CoreIPC {
@@ -61,7 +61,7 @@ class WebMouseEvent;
 class WebWheelEvent;
 struct WebPreferencesStore;
 
-class WebPage : public RefCounted<WebPage> {
+class WebPage : public APIObject {
 public:
     static PassRefPtr<WebPage> create(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
     ~WebPage();
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index c156d45..edd9128 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -393,6 +393,10 @@
 			Name="Shared"
 			>
 			<File
+				RelativePath="..\Shared\APIObject.h"
+				>
+			</File>
+			<File
 				RelativePath="..\Shared\ImmutableArray.cpp"
 				>
 			</File>
@@ -432,6 +436,10 @@
 				RelativePath="..\Shared\WebPreferencesStore.h"
 				>
 			</File>
+			<File
+				RelativePath="..\Shared\WebString.h"
+				>
+			</File>
 			<Filter
 				Name="CoreIPCSupport"
 				>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list