Changeset 17881 in webkit
- Timestamp:
- Nov 26, 2006 12:53:57 PM (17 years ago)
- Location:
- S60/trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
S60/trunk/WebCore/ChangeLog
r17845 r17881 1 2006-11-22 w3liu <wei.liu@nokia.com> 2 3 Reviewed by zbujtas@gmail.com. 4 DESC: 5 http://bugs.webkit.org/show_bug.cgi?id=11665 6 Text decoder regression in S60 browser 7 8 WARNING: NO TEST CASES ADDED OR CHANGED 9 10 * kwq/KWQTextCodec.cpp: 11 (KWQTextDecoder::KWQTextDecoder): 12 (QTextCodec::fromUnicode): 13 (QTextCodec::toUnicode): 14 (KWQTextDecoder::fromUnicode): 15 (KWQTextDecoder::checkRealloc): 16 * kwq/KWQTextCodec.h: 17 1 18 2006-11-16 rathnasa <sornalatha.rathnasamy@nokia.com> 2 19 -
S60/trunk/WebCore/kwq/KWQTextCodec.cpp
r17693 r17881 50 50 friend class QTextCodec; 51 51 public: 52 KWQTextDecoder(TUint aEnc) : iEncoding(aEnc), iRemainderBuf( NULL) {}52 KWQTextDecoder(TUint aEnc) : iEncoding(aEnc), iRemainderBuf( NULL ) {} 53 53 ~KWQTextDecoder() { delete iRemainderBuf; } 54 54 … … 235 235 QCString QTextCodec::fromUnicode(const QString &qcs) const 236 236 { 237 return KWQTextDecoder( iEncoding ).fromUnicode( qcs );237 return makeDecoder()->fromUnicode( qcs ); 238 238 } 239 239 … … 245 245 QString QTextCodec::toUnicode(const QByteArray &qba, int len) const 246 246 { 247 return KWQTextDecoder( iEncoding ).toUnicode(qba.data(), len, true);247 return makeDecoder()->toUnicode(qba.data(), len, true); 248 248 } 249 249 … … 525 525 } 526 526 } 527 527 528 528 ptr.Append( tmpBuf ); 529 529 … … 531 531 inBuf.Set( inBuf.Right( ret ) ); 532 532 } 533 533 534 534 //check if realloc needs for zero terminated string 535 535 if(ptr.MaxLength() == ptr.Length()) … … 546 546 } 547 547 } 548 548 549 549 outStr.append( (const char*)( ptr.PtrZ() ) ); 550 550 delete outBuf; … … 554 554 555 555 HBufC8* KWQTextDecoder::checkRealloc( TPtr8& aPtr, TInt aLen ) 556 { 556 { 557 557 HBufC8* outBuf = HBufC8::NewMax( aLen ); 558 558 if(outBuf) -
S60/trunk/WebCore/kwq/KWQTextCodec.h
r17535 r17881 42 42 static QTextCodec *codecForLocale(); 43 43 44 QTextCodec( TUint aEnc, KWQEncodingFlags f = NoEncodingFlags ) : iEncoding( aEnc ), _flags( f){}44 QTextCodec( TUint aEnc, KWQEncodingFlags f = NoEncodingFlags ) : iEncoding( aEnc ), _flags( f ), iQTextDecoder( NULL ) {} 45 45 ~QTextCodec(); 46 46 const char *name() const; … … 76 76 virtual ~QTextDecoder() {} 77 77 virtual QString toUnicode(const char *, int, bool flush = false) = 0; 78 virtual QCString fromUnicode(const QString &) = 0; 78 79 }; 79 80
Note: See TracChangeset
for help on using the changeset viewer.