2011-04-07 Magnus Danielsson <public@fuzzac.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 04:59:33 +0000 (04:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 04:59:33 +0000 (04:59 +0000)
commit167bd7dcdaa307209de09e38300a316c981339ac
treeffbefb663e9ea7f5cc24deb1656bf624749131b1
parent9e5a3b9566e4c9bf735f60a2110fe307e6db2f90
2011-04-07  Magnus Danielsson  <public@fuzzac.com>

        Reviewed by Darin Fisher.

        [chromium] WebPageSerializerImpl doesn't serialize sub-frames correctly
        https://bugs.webkit.org/show_bug.cgi?id=53897

        When serializing a web page using 'save page as', sub-frames and resources gets
        saved in a sub-directory. However, frame elements didn't get updated to reference
        these saved sub-frames, but were still referencing the original url. So when opening
        a saved web page, any sub-frames would get pulled in from the original url rather than
        what was saved.

        In addition to this, sub-frames in the sub-directory erroneously had the name of the
        sub-directory prepended to the path of resources located in the same sub-directory.

        * src/WebPageSerializerImpl.cpp:
        (WebKit::WebPageSerializerImpl::openTagToStrne: Fixed resource paths in sub-frames.
        Also made sure sub-frames are referenced correctly from parent frame.
        (WebKit::WebPageSerializerImpl::endTagToString): Removed constness from argument.
        (WebKit::WebPageSerializerImpl::buildContentForNode): Ditto.
        * src/WebPageSerializerImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebPageSerializerImpl.cpp
Source/WebKit/chromium/src/WebPageSerializerImpl.h