WebCore:
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Nov 2006 04:53:17 +0000 (04:53 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 12 Nov 2006 04:53:17 +0000 (04:53 +0000)
commit78c1cdc04b192fb6a5098e5e3ca2775762b200e3
tree2b60df11a14c3fa395a843e7aa7350bf47a66ccc
parente0b5fa61f5b3b65055ccd423043f0f0d2e3c0db1
WebCore:

        Reviewed by Maciej Stachowiak.

        - Fixed loader crash by clarifying ownership of WebKit client objects.
        WebCore objects own their WebKit clients, and ref and deref through
        virtual methods, leaving WebKit free to use whatever client / reference-counting
        implementation it likes.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bridge/EditorClient.h: Fixed up function prototypes for style.
        * loader/FrameLoader.cpp: Removed detachFrameLoader, since its real purpose
        was to implement an alternative ownership model.
        (WebCore::FrameLoader::~FrameLoader): Removed empty destructor.
        (WebCore::FrameLoader::setClient): This function now takes ownership
        (WebCore::FrameLoader::client):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
        * page/ChromeClient.h:
        * platform/AbstractShared.h: Added. This is the virtual function-based refcounting
        complement to Shared.
        (WebCore::AbstractShared::~AbstractShared):

WebKit:

        Reviewed by Maciej Stachowiak.

        - Fixed loader crash by clarifying ownership of WebKit client objects.
        WebCore objects own their WebKit clients, and ref and deref through
        virtual methods, leaving WebKit free to use whatever client / reference-counting
        implementation it likes.

        WebKit on Mac just uses the same refcounting class that WebCore uses (Shared),
        but other platforms may choose to do other things.

        * WebCoreSupport/WebChromeClient.h:
        (WebChromeClient::ref):
        (WebChromeClient::deref):
        (WebChromeClient::refCount):
        * WebCoreSupport/WebEditorClient.h: Nixed commented-out function prototypes.
        The ones in WebCore make clear what remains to be implemented. Replaced constructor
        with factory function to avoid leaks.
        * WebCoreSupport/WebEditorClient.mm:
        (WebEditorClient::create):
        (WebEditorClient::WebEditorClient):
        (WebEditorClient::setWebFrame):
        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge initMainFrameWithPage:WebCore::frameName:view:webView:]):
        (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
        * WebCoreSupport/WebFrameLoaderClient.h: Replaced constructor with factory
        function to avoid leaks.
        (WebFrameLoaderClient::ref):
        (WebFrameLoaderClient::deref):
        (WebFrameLoaderClient::refCount):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::create):
        * WebView/WebFrame.mm:
        (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/EditorClient.h
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h
WebCore/loader/FrameLoaderClient.h
WebCore/page/ChromeClient.h
WebCore/platform/AbstractShared.h [new file with mode: 0644]
WebKit/ChangeLog
WebKit/WebCoreSupport/WebChromeClient.h
WebKit/WebCoreSupport/WebChromeClient.mm
WebKit/WebCoreSupport/WebEditorClient.h
WebKit/WebCoreSupport/WebEditorClient.mm
WebKit/WebCoreSupport/WebFrameBridge.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.h
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebView/WebFrame.mm