Reviewed by Adam.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2008 21:33:27 +0000 (21:33 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2008 21:33:27 +0000 (21:33 +0000)
commit0abd6415f40de65b2937bf077c72cc4ab0ec6806
treef975611ba769e0278936abdc79c3cd8c4300a440
parentf648cfb11ea72a141776d636943fb1012fa77ce4
    Reviewed by Adam.

        - fix <rdar://problem/4527931> showModalDialog calls from onload functions fail (Aspect)

        No automated regression test because showModalDialog doesn't work in DumpRenderTree.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::CallbackGuard::CallbackGuard): Added.
        (WebCore::CallbackGuard::~CallbackGuard): Added.
        (WebCore::ResourceHandle::supportsBufferedData): Simplified to take advantage of how
        static initialization works in C++.
        (WebCore::ResourceHandle::loadsBlocked): Always return false on Leopard. The problem in
        NSURLConnection that created the need to block loads is fixed in Leoaprd. This is the
        bug fix.
        (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
        Use CallbackGuard instead of directly incrementing the count; allows us to omit the code
        entirely on Leopard.
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
        Ditto.
        (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
        Ditto. Fixes a problem where this could leave inNSURLConnectionCallback set
        permanently in one of the code paths; this would break showModalDialog from that
        point on. This problem doesn't affect Safari.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/platform/network/mac/ResourceHandleMac.mm