2007-03-28 Oliver Hunt <oliver@apple.com>
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2007 04:59:45 +0000 (04:59 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2007 04:59:45 +0000 (04:59 +0000)
commit30e5abfc1d07f4bb062fc14e1e68a57152b0b34a
treee887a61398e381de4df79f509fa3d2f460307629
parent652a0fc415145ceb5d445b5b4386824a9320de10
2007-03-28  Oliver Hunt  <oliver@apple.com>

        Reviewed by Anders and Steve.

        Add a flag to DocLoader to prevent it from reloading
        when performing a paste or drop operation.

        Remove m_cachePolicy from CachedResource as it is never used

        Fixes rdar://problem/5044366 : REGRESSION: Repro ASSERT failures
        dragging image into GMail message in _web_writeImage and
        documentFragmentFromDragData

        * editing/Editor.cpp:
        (WebCore::Editor::paste):
          prevent the docloader from reloading resources on paste
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::updateFromElement):
        * loader/Cache.cpp:
        (WebCore::createResource):
        * loader/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
        * loader/CachedCSSStyleSheet.h:
        * loader/CachedImage.cpp:
        (WebCore::CachedImage::CachedImage):
        * loader/CachedImage.h:
        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        * loader/CachedResource.h:
        * loader/CachedScript.cpp:
        (WebCore::CachedScript::CachedScript):
        * loader/CachedScript.h:
        * loader/CachedXBLDocument.cpp:
        (WebCore::CachedXBLDocument::CachedXBLDocument):
        * loader/CachedXBLDocument.h:
        * loader/CachedXSLStyleSheet.cpp:
        (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
        * loader/CachedXSLStyleSheet.h:
        * loader/DocLoader.cpp:
        (WebCore::DocLoader::DocLoader):
           Tidy up constructor initialise new field
        (WebCore::DocLoader::checkForReload):
           Prevent reload when pasting
        * loader/DocLoader.h:
        (WebCore::DocLoader::setPasteInProgress):
          new field and setter
        * page/DragController.cpp:
        (WebCore::DragController::concludeDrag):
          prevent the docloader from reloading resources on drop

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
WebCore/ChangeLog
WebCore/editing/Editor.cpp
WebCore/html/HTMLImageLoader.cpp
WebCore/loader/Cache.cpp
WebCore/loader/CachedCSSStyleSheet.cpp
WebCore/loader/CachedCSSStyleSheet.h
WebCore/loader/CachedImage.cpp
WebCore/loader/CachedImage.h
WebCore/loader/CachedResource.cpp
WebCore/loader/CachedResource.h
WebCore/loader/CachedScript.cpp
WebCore/loader/CachedScript.h
WebCore/loader/CachedXBLDocument.cpp
WebCore/loader/CachedXBLDocument.h
WebCore/loader/CachedXSLStyleSheet.cpp
WebCore/loader/CachedXSLStyleSheet.h
WebCore/loader/DocLoader.cpp
WebCore/loader/DocLoader.h
WebCore/page/DragController.cpp