Changeset 112252 in webkit


Ignore:
Timestamp:
Mar 27, 2012 4:53:15 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
https://bugs.webkit.org/show_bug.cgi?id=82291

Patch by Chris Guan <chris.guan@torchmobile.com.cn> on 2012-03-27
Reviewed by Rob Buis.

If we have a multiPart reponse with multipart/x-mixed-replace,
the current page should not be cached. I use isMultipartPayload()
API which was supposed to be set in NetworkJob to decide to
cache page or not.

  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::canCachePage):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r112026 r112252  
     12012-03-27  Chris Guan  <chris.guan@torchmobile.com.cn>
     2
     3        A page containing multiparts with "multipart/x-mixed-replace" should not be cached.
     4        https://bugs.webkit.org/show_bug.cgi?id=82291
     5
     6        Reviewed by Rob Buis.
     7
     8        If we have a multiPart reponse with multipart/x-mixed-replace,
     9        the current page should not be cached. I use isMultipartPayload()
     10        API which was supposed to be set in NetworkJob to decide to
     11        cache page or not.
     12
     13        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     14        (WebCore::FrameLoaderClientBlackBerry::canCachePage):
     15
    1162012-03-25  Arvid Nilsson  <anilsson@rim.com>
    217
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r111814 r112252  
    11891189bool FrameLoaderClientBlackBerry::canCachePage() const
    11901190{
    1191     // We won't cache pages containing video or audio.
     1191    // We won't cache pages containing video, audio or multipart with "multipart/x-mixed-replace".
    11921192    ASSERT(m_frame->document());
    11931193    RefPtr<NodeList> nodeList = m_frame->document()->getElementsByTagName(HTMLNames::videoTag.localName());
     
    11981198        return false;
    11991199
     1200    ASSERT(m_frame->loader()->documentLoader());
     1201    const ResponseVector& responses = m_frame->loader()->documentLoader()->responses();
     1202    size_t count = responses.size();
     1203    for (size_t i = 0; i < count; i++) {
     1204        if (responses[i].isMultipartPayload())
     1205            return false;
     1206    }
    12001207    return true;
    12011208}
Note: See TracChangeset for help on using the changeset viewer.