Changeset 18179 in webkit


Ignore:
Timestamp:
Dec 12, 2006 9:01:30 AM (17 years ago)
Author:
spadma
Message:

2006-12-11 sareen <shyam.sareen@nokia.com>

Reviewed Sachin Padma.
DESC: Saved Pages: Some Images not saved with the page.
http://bugzilla.opendarwin.org/show_bug.cgi?id=11721

  • BrowserView/src/WebKitLoader.cpp: (CWebKitLoader::LoadPageL):
  • ResourceLoader/inc/UrlRequestInfo.h: (CUrlRequestInfo::IsSavedPageRequest): (CUrlRequestInfo::SetSavedPageRequest):
  • ResourceLoader/src/MultipartContentHandler.cpp: (CMultipartContentHandler::HandleMultipartMixedL):
  • ResourceLoader/src/UrlRequestInfo.cpp: (CUrlRequestInfo::CUrlRequestInfo): (CUrlRequestInfo::~CUrlRequestInfo): (CUrlRequestInfo::SetPostDataL):
Location:
S60/branches/3.1m/WebKit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • S60/branches/3.1m/WebKit/BrowserView/src/WebKitLoader.cpp

    r17791 r18179  
    362362        }
    363363    urlRequestInfo->SetClientSuppliesData( aDataLoadInfo );
     364    urlRequestInfo->SetSavedPageRequest(iIsSavedPage);
    364365
    365366    CleanupClosePushL( *urlRequestInfo );
  • S60/branches/3.1m/WebKit/ChangeLog

    r18159 r18179  
     12006-12-11  sareen  <shyam.sareen@nokia.com>
     2
     3        Reviewed Sachin Padma.
     4        DESC: Saved Pages: Some Images not saved with the page.
     5        http://bugzilla.opendarwin.org/show_bug.cgi?id=11721
     6
     7        * BrowserView/src/WebKitLoader.cpp:
     8        (CWebKitLoader::LoadPageL):
     9        * ResourceLoader/inc/UrlRequestInfo.h:
     10        (CUrlRequestInfo::IsSavedPageRequest):
     11        (CUrlRequestInfo::SetSavedPageRequest):
     12        * ResourceLoader/src/MultipartContentHandler.cpp:
     13        (CMultipartContentHandler::HandleMultipartMixedL):
     14        * ResourceLoader/src/UrlRequestInfo.cpp:
     15        (CUrlRequestInfo::CUrlRequestInfo):
     16        (CUrlRequestInfo::~CUrlRequestInfo):
     17        (CUrlRequestInfo::SetPostDataL):
     18
    1192006-12-11  w3liu  <wei.liu@nokia.com>
    220
  • S60/branches/3.1m/WebKit/ResourceLoader/inc/UrlRequestInfo.h

    r14549 r18179  
    1010*    All rights reserved.
    1111
    12      Redistribution and use in source and binary forms, with or without
    13      modification, are permitted provided that the following conditions
    14      are met:
     12  Redistribution and use in source and binary forms, with or without
     13  modification, are permitted provided that the following conditions
     14  are met:
    1515
    1616*      * Redistributions of source code must retain the above copyright
     
    2424*        from this software without specific prior written permission.
    2525
    26      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    27      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    28      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    29      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    30      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    31      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    32      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    33      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    34      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    35      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
    36      USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
    37      DAMAGE.
     26  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     27  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     28  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     29  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     30  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     31  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     32  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     33  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     34  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     35  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
     36  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
     37  DAMAGE.
    3838
    3939*    Please see file patentlicense.txt for further grants.
     
    291291        void SetPostDataL( const RArray<TWebCoreFormDataItem>& aPostData );
    292292
    293                 /**
     293        /**
    294294        * Set the post body buffer
    295295        * @since 3.1
     
    437437        */
    438438        inline TBool CookiesEnabled() const { return iCookiesEnabled; }
     439
     440        /**
     441        * Indicates whether request is from a Saved Page
     442        * @since 3.1
     443        * @param
     444        * @return
     445        */
     446        inline TBool IsSavedPageRequest() { return iSavedPageRequest; }
     447       
     448       
     449        /**
     450        * Sets the  request is from a Saved Page
     451        * @since 3.1
     452        * @param
     453        * @return
     454        */
     455       
     456        inline void SetSavedPageRequest( TBool aIsSavedPage ) { iSavedPageRequest = aIsSavedPage; }
    439457
    440458    private:
     
    479497        HBufC8*               iPostContentType;
    480498        // Post body buffer
    481         CPostDataParts*          iPostData;
     499        CPostDataParts*      iPostData;
    482500        // Boundary string on post body
    483501        HBufC8*               iPostBoundary;
     
    498516        //
    499517        TInt                  iPriority;
     518        //Is it save page request.
     519        TBool                 iSavedPageRequest;
    500520    };
    501521
  • S60/branches/3.1m/WebKit/ResourceLoader/src/MultipartContentHandler.cpp

    r17339 r18179  
    243243   
    244244
     245    TInt  partCount( iBodyPartsArray.Count() );
    245246       
     247    if( !aResponseInfo.RequestInfo().IsSavedPageRequest() )
     248        {
     249        partCount = ValidateMultipartArrayL(); 
     250        }
    246251   
    247     if ( ValidateMultipartArrayL() > 0 )
    248     {
    249    
    250     // handle valid multipart response
    251     CUrlResponseHeaderInfo& headerInfo =
    252       const_cast<CUrlResponseHeaderInfo&>( aResponseInfo.HeaderInfo() );
    253 
    254       headerInfo.SetContentTypeL( iBodyPartsArray[ 0 ] ->ContentType() );
    255       headerInfo.SetCharsetL( iBodyPartsArray[ 0 ] ->Charset() );       
    256 
    257       // set main document as body of the CUrlResponseInfo object
    258       // to be handled by renderer as the top-level document
    259     const TDesC8& bodyPart = iBodyPartsArray[ 0 ] ->Body();
    260     TPtr8 responseBody( (TUint8*)bodyPart.Ptr(), bodyPart.Length(), bodyPart.Length() );
    261       aResponseInfo.SetBodyL( responseBody );
     252    if ( partCount > 0 )
     253        {
     254        // handle valid multipart response
     255        CUrlResponseHeaderInfo& headerInfo =
     256        const_cast<CUrlResponseHeaderInfo&>( aResponseInfo.HeaderInfo() );
     257
     258        headerInfo.SetContentTypeL( iBodyPartsArray[ 0 ] ->ContentType() );
     259        headerInfo.SetCharsetL( iBodyPartsArray[ 0 ] ->Charset() );
     260        // set main document as body of the CUrlResponseInfo object
     261        // to be handled by renderer as the top-level document
     262        const TDesC8& bodyPart = iBodyPartsArray[ 0 ] ->Body();
     263        TPtr8 responseBody( (TUint8*)bodyPart.Ptr(), bodyPart.Length(), bodyPart.Length() );
     264        aResponseInfo.SetBodyL( responseBody );
    262265         
    263       // now push other parts to the two caches
    264       for ( TInt n = 1; n < iBodyPartsArray.Count(); n++ )
    265           {
    266           PushToHttpCacheL( *iBodyPartsArray[ n ] );
    267           delete iBodyPartsArray[ n ];
    268           }
    269 
    270       }
     266        // now push other parts to the two caches
     267        for ( TInt n = 1; n < iBodyPartsArray.Count(); n++ )
     268              {
     269              PushToHttpCacheL( *iBodyPartsArray[ n ] );
     270              delete iBodyPartsArray[ n ];
     271              }
     272       }
    271273    else
    272       {
    273 
    274     // handle invalid/empty multipart response
    275     CUrlResponseHeaderInfo& headerInfo =
    276       const_cast<CUrlResponseHeaderInfo&>( aResponseInfo.HeaderInfo() );
    277 
    278       headerInfo.SetContentTypeL( KContentTypeTextHtml8 );
     274        {
     275        // handle invalid/empty multipart response
     276        CUrlResponseHeaderInfo& headerInfo =
     277        const_cast<CUrlResponseHeaderInfo&>( aResponseInfo.HeaderInfo() );
     278        headerInfo.SetContentTypeL( KContentTypeTextHtml8 );
    279279        aResponseInfo.ReplaceBodyL( KErrPage );
    280         status = KErrGeneral;
    281      
    282       }
     280        status = KErrGeneral;   
     281        }
    283282 
    284   iContentDispatcher->HeadersL(aTransaction, aResponseInfo);
    285   iContentDispatcher->ResponseL(aTransaction, aResponseInfo);
     283    iContentDispatcher->HeadersL(aTransaction, aResponseInfo);
     284    iContentDispatcher->ResponseL(aTransaction, aResponseInfo);
    286285   
    287286    return status;
  • S60/branches/3.1m/WebKit/ResourceLoader/src/UrlRequestInfo.cpp

    r14549 r18179  
    1010*    All rights reserved.
    1111
    12      Redistribution and use in source and binary forms, with or without
    13      modification, are permitted provided that the following conditions
    14      are met:
     12  Redistribution and use in source and binary forms, with or without
     13  modification, are permitted provided that the following conditions
     14  are met:
    1515
    1616*      * Redistributions of source code must retain the above copyright
     
    2424*        from this software without specific prior written permission.
    2525
    26      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    27      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    28      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    29      A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    30      OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    31      SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    32      LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    33      DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    34      THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    35      (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
    36      USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
    37      DAMAGE.
     26  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     27  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     28  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     29  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     30  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     31  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     32  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     33  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     34  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     35  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
     36  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
     37  DAMAGE.
    3838
    3939*    Please see file patentlicense.txt for further grants.
     
    7676      iDefaultHeadersMask( EDefaultHeadersAll ),
    7777      // no priority by default
    78       iPriority( -1 )
     78      iPriority( -1 ),
     79      iSavedPageRequest ( EFalse )
    7980    {
    8081    }
     
    118119    delete iRefererUrl;
    119120    delete iPostContentType;
    120         if(iPostData)
    121                 {
    122                 iPostData->Deref();
    123                 }
    124     delete iPostBoundary;
    125     delete iAcceptHeader;
     121    if(iPostData)
     122       {
     123       iPostData->Deref();
     124       }
     125     delete iPostBoundary;
     126     delete iAcceptHeader;
    126127    }
    127128
     
    181182    const RArray<TWebCoreFormDataItem>& aPostData )
    182183    {
    183         if(iPostData)
    184                 {
    185                 iPostData->Deref();
    186                 }
    187     //
    188         iPostData = CPostDataParts::NewL(aPostData ) ;
    189         iPostData->Ref();
     184    if(iPostData)
     185       {
     186       iPostData->Deref();
     187       }
     188    //
     189    iPostData = CPostDataParts::NewL(aPostData ) ;
     190    iPostData->Ref();
    190191    }
    191192
     
    198199void CUrlRequestInfo::SetPostDataL( CPostDataParts* aPostData )
    199200    {
    200         if(iPostData)
    201                 {
    202                 iPostData->Deref();
    203                 }
    204     //
    205         iPostData = aPostData  ;
    206         iPostData->Ref();
     201    if(iPostData)
     202       {
     203       iPostData->Deref();
     204       }
     205    //
     206    iPostData = aPostData  ;
     207    iPostData->Ref();
    207208    }
    208209
Note: See TracChangeset for help on using the changeset viewer.