WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Mar 2008 05:27:19 +0000 (05:27 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Mar 2008 05:27:19 +0000 (05:27 +0000)
commita3ae26a4d10699dd104dc0a06a102741962e7408
treef6a4e4ed4693aa1e527e17e08cf6b8c8d7edf2ee
parent91f49718c0dbbb4c15d4859eca44b5296e746ef8
WebCore:

        Reviewed by Sam.

        - remove all bridge-related things from WebCore except the bridge itself

        * WebCore.base.exp: Removed the bridge and setBridge functions.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
        close method.

        * page/Frame.cpp:
        (WebCore::Frame::~Frame): Removed call to setBridge(0).
        (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
        * page/Frame.h: Removed setBridge and bridge functions.
        * page/FramePrivate.h: Removed m_bridge pointer.
        * page/mac/FrameMac.mm: Removed setBridge and bridge functions.

        * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
        Removed bridgeForDOMDocument: and clearFrame methods.
        * page/mac/WebCoreFrameBridge.mm: Ditto.
        (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
        (-[WebCoreFrameBridge setWebCoreFrame:]): Added.

WebKit/mac:

        Reviewed by Sam.

        - remove all bridge-related things from WebCore except the bridge itself

        * DOM/WebDOMOperations.mm:
        (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method.

        * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include.

        * Plugins/WebPluginController.mm: Ditto.

        * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the
        init and close methods. Added a setWebFrame: method.

        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge setWebFrame:]): Added.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion.
        (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the
        bridge here. Soon we will be able to remove this entirely!
        (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved
        into WebFrame from the bridge.

        * WebView/WebFrame.mm:
        (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's
        now owned by the frame.
        (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script
        debugger under GC without this!
        (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to
        use WebFrameLoaderClient instead of the bridge.
        (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added.
        This is code that used to live in the bridge's init function.
        (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto.
        (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto.
        (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since
        the WebView is now the bridge's owner.
        (-[WebFrame _updateBackground]): Changed this one call site that was calling the
        WebCore::Frame::bridge function directly to use the kit function instead.
        (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge.
        This code won't last long -- we're eliminating the bridge soon.
        (-[WebFrame finalize]): Ditto.

        * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods
        for creating frames.

        * WebView/WebView.mm:
        (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use
        the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom
        where we have to allocate a WebFrameBridge and then immediately release it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/loader/FrameLoader.cpp
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/page/mac/FrameMac.mm
WebCore/page/mac/WebCoreFrameBridge.h
WebCore/page/mac/WebCoreFrameBridge.mm
WebKit/mac/ChangeLog
WebKit/mac/DOM/WebDOMOperations.mm
WebKit/mac/DefaultDelegates/WebDefaultContextMenuDelegate.mm
WebKit/mac/Plugins/WebPluginController.mm
WebKit/mac/WebCoreSupport/WebFrameBridge.h
WebKit/mac/WebCoreSupport/WebFrameBridge.mm
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/mac/WebView/WebFrame.mm
WebKit/mac/WebView/WebFrameInternal.h
WebKit/mac/WebView/WebView.mm