2009-03-25 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2009 14:36:31 +0000 (14:36 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2009 14:36:31 +0000 (14:36 +0000)
commit987375cc11b6c76b43ff41aaea05454c18612672
tree81db4da44e817017b4a74a4c4d650a628e83221c
parentb27fa814e6e6e28b7bc40d484e26c9132657f40e
2009-03-25  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when
        they are being used only for selections, not an entire document.

        * WebCore.base.exp: Remove exported function that's not used in WebKit.

        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member
        function so it can share private things with other member functions. Added some FIXME
        comments to a branch of code I think is dead. Changed boolean argument into a named
        one. Renamed to match other similar functions.
        (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
        (WebCore::LegacyWebArchive::createResource): Ditto.
        (WebCore::LegacyWebArchive::create): Merged the create and init functions.
        (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because
        we should never fail to write (we can fail to read).
        (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static
        member function as above.
        (WebCore::LegacyWebArchive::createFromSelection): Ditto.
        (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than
        iterators. Only include the favicon if the first node is the document since we don't
        want to include the favicon when copying and pasting.

        * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private.
        Made the Mac-specific functions be static member functions. Made other helpers be
        static member functions. Removed the nit function.

        * loader/archive/cf/LegacyWebArchiveMac.mm:
        (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated
        comment and made this a static member function.
        (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made
        it so we only type cast in one place.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/loader/archive/cf/LegacyWebArchive.cpp
WebCore/loader/archive/cf/LegacyWebArchive.h
WebCore/loader/archive/cf/LegacyWebArchiveMac.mm