Reviewed by Mitz.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Dec 2007 19:04:15 +0000 (19:04 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Dec 2007 19:04:15 +0000 (19:04 +0000)
commit04984487a383ce982fd858fc3dcb187206e761e6
tree88e3a07da1bd54d023eadc8da3c39d6984603a18
parentbf5420dd3306266041ea00c2978f1ed93ef1b4e8
    Reviewed by Mitz.

        - fix problem tracked by these bugs:
          http://bugs.webkit.org/show_bug.cgi?id=16097
          <rdar://problem/5619305> Safari crashes during load of LexisNexis search results
          <rdar://problem/5510779> CrashTracer: [USER] 25 crashes in Safari at
          WebCore::DocumentLoader::isLoadingMultipartContent const

        * loader/ImageDocument.cpp:
        (WebCore::ImageDocument::createDocumentStructure): Create an ImageDocumentElement
        instead of an HTMLImageElement.
        (WebCore::ImageDocument::scale): Added a null check for m_imageElement.
        (WebCore::ImageDocument::resizeImageToFit): Ditto.
        (WebCore::ImageDocument::restoreImageSize): Ditto.
        (WebCore::ImageDocument::imageFitsInWindow): Ditto.
        (WebCore::ImageDocument::windowSizeChanged): Ditto.
        (WebCore::ImageDocumentElement::~ImageDocumentElement): Call
        disconnectImageElement so m_imageElement will be set to 0
         if we're still connected to the document.
        (WebCore::ImageDocumentElement::willMoveToNewOwnerDocument): Ditto.

        * loader/ImageDocument.h: Changed image element type to be
        ImageDocumentElement instead of HTMLImageElement. Also added
        a disconnectImageElement function that sets m_imageElement to 0.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/loader/ImageDocument.cpp
WebCore/loader/ImageDocument.h