Changeset 18179 in webkit
- Timestamp:
- Dec 12, 2006 9:01:30 AM (17 years ago)
- Location:
- S60/branches/3.1m/WebKit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
S60/branches/3.1m/WebKit/BrowserView/src/WebKitLoader.cpp
r17791 r18179 362 362 } 363 363 urlRequestInfo->SetClientSuppliesData( aDataLoadInfo ); 364 urlRequestInfo->SetSavedPageRequest(iIsSavedPage); 364 365 365 366 CleanupClosePushL( *urlRequestInfo ); -
S60/branches/3.1m/WebKit/ChangeLog
r18159 r18179 1 2006-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 1 19 2006-12-11 w3liu <wei.liu@nokia.com> 2 20 -
S60/branches/3.1m/WebKit/ResourceLoader/inc/UrlRequestInfo.h
r14549 r18179 10 10 * All rights reserved. 11 11 * 12 * 13 * 14 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 15 * 16 16 * * Redistributions of source code must retain the above copyright … … 24 24 * from this software without specific prior written permission. 25 25 * 26 * 27 * 28 * 29 * 30 * 31 * 32 * 33 * 34 * 35 * 36 * 37 * 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. 38 38 * 39 39 * Please see file patentlicense.txt for further grants. … … 291 291 void SetPostDataL( const RArray<TWebCoreFormDataItem>& aPostData ); 292 292 293 293 /** 294 294 * Set the post body buffer 295 295 * @since 3.1 … … 437 437 */ 438 438 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; } 439 457 440 458 private: … … 479 497 HBufC8* iPostContentType; 480 498 // Post body buffer 481 CPostDataParts* 499 CPostDataParts* iPostData; 482 500 // Boundary string on post body 483 501 HBufC8* iPostBoundary; … … 498 516 // 499 517 TInt iPriority; 518 //Is it save page request. 519 TBool iSavedPageRequest; 500 520 }; 501 521 -
S60/branches/3.1m/WebKit/ResourceLoader/src/MultipartContentHandler.cpp
r17339 r18179 243 243 244 244 245 TInt partCount( iBodyPartsArray.Count() ); 245 246 247 if( !aResponseInfo.RequestInfo().IsSavedPageRequest() ) 248 { 249 partCount = ValidateMultipartArrayL(); 250 } 246 251 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 ); 262 265 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 } 271 273 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 ); 279 279 aResponseInfo.ReplaceBodyL( KErrPage ); 280 status = KErrGeneral; 281 282 } 280 status = KErrGeneral; 281 } 283 282 284 iContentDispatcher->HeadersL(aTransaction, aResponseInfo);285 iContentDispatcher->ResponseL(aTransaction, aResponseInfo);283 iContentDispatcher->HeadersL(aTransaction, aResponseInfo); 284 iContentDispatcher->ResponseL(aTransaction, aResponseInfo); 286 285 287 286 return status; -
S60/branches/3.1m/WebKit/ResourceLoader/src/UrlRequestInfo.cpp
r14549 r18179 10 10 * All rights reserved. 11 11 * 12 * 13 * 14 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 15 * 16 16 * * Redistributions of source code must retain the above copyright … … 24 24 * from this software without specific prior written permission. 25 25 * 26 * 27 * 28 * 29 * 30 * 31 * 32 * 33 * 34 * 35 * 36 * 37 * 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. 38 38 * 39 39 * Please see file patentlicense.txt for further grants. … … 76 76 iDefaultHeadersMask( EDefaultHeadersAll ), 77 77 // no priority by default 78 iPriority( -1 ) 78 iPriority( -1 ), 79 iSavedPageRequest ( EFalse ) 79 80 { 80 81 } … … 118 119 delete iRefererUrl; 119 120 delete iPostContentType; 120 121 122 123 124 delete iPostBoundary;125 delete iAcceptHeader;121 if(iPostData) 122 { 123 iPostData->Deref(); 124 } 125 delete iPostBoundary; 126 delete iAcceptHeader; 126 127 } 127 128 … … 181 182 const RArray<TWebCoreFormDataItem>& aPostData ) 182 183 { 183 184 185 186 187 // 188 189 184 if(iPostData) 185 { 186 iPostData->Deref(); 187 } 188 // 189 iPostData = CPostDataParts::NewL(aPostData ) ; 190 iPostData->Ref(); 190 191 } 191 192 … … 198 199 void CUrlRequestInfo::SetPostDataL( CPostDataParts* aPostData ) 199 200 { 200 201 202 203 204 // 205 206 201 if(iPostData) 202 { 203 iPostData->Deref(); 204 } 205 // 206 iPostData = aPostData ; 207 iPostData->Ref(); 207 208 } 208 209
Note: See TracChangeset
for help on using the changeset viewer.