WebCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Dec 2006 23:40:47 +0000 (23:40 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Dec 2006 23:40:47 +0000 (23:40 +0000)
commit6aebecd090f4670a91ee7755904e454eefd4c387
treee66308a2a9f6cc1941e60b8ad8303707eeb349eb
parent423f45121dfb4097af2d0f530662d9707ef841ff
WebCore:

        Reviewed by Brady.

        - http://bugs.webkit.org/show_bug.cgi?id=11794
          fix lifetime problems affecting Frame's ownerElement pointer

        * CMakeLists.txt:
        * WebCore.vcproj/WebCore/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        Updated for new source files.

        * WebCore.exp: Updated for changes to entry point names.

        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac):
        * bridge/win/FrameWin.h:
        * bridge/win/FrameWin.cpp: (WebCore::FrameWin::FrameWin):
        * platform/qt/FrameQt.h:
        * platform/qt/FrameQt.cpp: (WebCore::FrameQt::FrameQt):
        Updated owner element type to HTMLFrameOwnerElement.

        * bridge/mac/WebCoreFrameBridge.h: Removed non-C++ case since we don't
        use that any more. Updated owner element type to HTMLFrameOwnerElement.

        * dom/Document.cpp: Added include so that the ownerElement function can
        compile (since it downcasts an HTMLFrameOwnerElement to an Element).

        * html/HTMLFrameElement.cpp:
        (WebCore::containingFrameSetElement): Moved this function in here; it
        doesn't need to be a member function.
        (WebCore::HTMLFrameElement::attach): Updated to call this.

        * html/HTMLFrameElementBase.h:
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Inherit from
        HTMLFrameOwnerElement. Removed contentFrame, contentDocument, and
        containingFrameSetElement. Removed friend classes.

        * html/HTMLFrameOwnerElement.h: Added.
        * html/HTMLFrameOwnerElement.cpp: Added.

        * html/HTMLEmbedElement.h:
        * html/HTMLEmbedElement.cpp:
        * html/HTMLObjectElement.h:
        * html/HTMLObjectElement.cpp:
        Remove now-unneeded contentDocument functions.

        * html/HTMLPlugInElement.h:
        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::HTMLPlugInElement): Inherit from
        HTMLFrameOwnerElement.

        * loader/FormState.h:
        * loader/FormState.cpp: Use HTMLFormElement instead of just Element.

        * loader/FrameLoader.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::requestFrame): Use HTMLFormElement.
        (WebCore::FrameLoader::loadSubframe): Ditto.
        (WebCore::FrameLoader::requestObject): Don't pass an element parameter
        to shouldUsePlugin, and remove now-unneeded type casts.
        (WebCore::FrameLoader::shouldUsePlugin): Removed unneeded element parameter.
        (WebCore::FrameLoader::handleFallbackContent): Use HTMLFrameOwnerElement.
        (WebCore::FrameLoader::updateBaseURLForEmptyDocument): Ditto.
        (WebCore::FrameLoader::isHostedByObjectElement): Ditto.
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::load): Use HTMLFormElement.
        (WebCore::FrameLoader::post): Ditto.
        (WebCore::FrameLoader::createFrame): Use HTMLFrameOwnerElement.

        * page/Frame.h:
        * page/FramePrivate.h:
        * page/Frame.cpp:
        (WebCore::parentFromOwnerElement): Use HTMLFrameOwnerElement.
        (WebCore::Frame::Frame): Ditto. Also set m_contentFrame on the owner element.
        (WebCore::Frame::ownerElement): Ditto.
        (WebCore::Frame::ownerRenderer): Ditto.
        (WebCore::Frame::disconnectOwnerElement): Clear m_contentFrame on the owner
        element before disconnecting it.
        (WebCore::FramePrivate::FramePrivate): Use HTMLFrameOwnerElement.

        * page/mac/EventHandlerMac.mm: Include HTMLFrameOwnerElement.h so that
        the code here will compile (no code changes needed).

        * rendering/RenderFrame.cpp: (WebCore::RenderFrame::viewCleared):
        Updated so that RenderFrame doesn't need to be a friend of HTMLFrameElementBase.

        * rendering/RenderPart.h:
        * rendering/RenderPart.cpp: (WebCore::RenderPart::RenderPart):
        Use HTMLFrameOwnerElement.

        * rendering/RenderPartObject.h:
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::RenderPartObject): Use HTMLFrameOwnerElement.
        (WebCore::RenderPartObject::viewCleared): Updated so that RenderFrame doesn't
        need to be a friend of HTMLFrameElementBase.

        - other changes

        * platform/network/ResourceHandleInternal.h: Added Noncopyable and
        fixed indentation.

WebKit:

        Reviewed by Brady.

        - http://bugs.webkit.org/show_bug.cgi?id=11794
          fix lifetime problems affecting Frame's ownerElement pointer

        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge finishInitializingWithPage:WebCore::frameName:frameView:ownerElement:]):
        (-[WebFrameBridge initSubframeWithOwnerElement:frameName:frameView:]):
        (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
        Use HTMLFrameOwnerElement.

        * WebCoreSupport/WebFrameLoaderClient.mm: Include the relevant headers for the
        HTMLFormElement class.

        * WebKit.xcodeproj/project.pbxproj: Let Xcode have its way.

        * WebView/WebFrame.mm: (-[WebFrame frameElement]): Update includes and types for the
        change in return type of ownerElement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
45 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/win/FrameWin.cpp
WebCore/bridge/win/FrameWin.h
WebCore/dom/Document.cpp
WebCore/html/HTMLEmbedElement.cpp
WebCore/html/HTMLEmbedElement.h
WebCore/html/HTMLFrameElement.cpp
WebCore/html/HTMLFrameElementBase.cpp
WebCore/html/HTMLFrameElementBase.h
WebCore/html/HTMLFrameOwnerElement.cpp [new file with mode: 0644]
WebCore/html/HTMLFrameOwnerElement.h [new file with mode: 0644]
WebCore/html/HTMLObjectElement.cpp
WebCore/html/HTMLObjectElement.h
WebCore/html/HTMLPlugInElement.cpp
WebCore/html/HTMLPlugInElement.h
WebCore/loader/FormState.cpp
WebCore/loader/FormState.h
WebCore/loader/FrameLoader.cpp
WebCore/loader/FrameLoader.h
WebCore/loader/mac/FrameLoaderMac.mm
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/page/mac/EventHandlerMac.mm
WebCore/platform/network/ResourceHandleInternal.h
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQt.h
WebCore/rendering/RenderFrame.cpp
WebCore/rendering/RenderPart.cpp
WebCore/rendering/RenderPart.h
WebCore/rendering/RenderPartObject.cpp
WebCore/rendering/RenderPartObject.h
WebKit/ChangeLog
WebKit/WebCoreSupport/WebFrameBridge.mm
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebKit.xcodeproj/project.pbxproj
WebKit/WebView/WebFrame.mm