Changeset 46566 in webkit
- Timestamp:
- Jul 29, 2009 5:08:34 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r46564 r46566 1 2009-07-29 Yong Li <yong.li@torchmobile.com> 2 3 Reviewed by George Staikos. 4 5 WINCE PORT: changes to platform/text files 6 https://bugs.webkit.org/show_bug.cgi?id=27715 7 8 * platform/text/String.cpp: 9 (WebCore::String::format): 10 * platform/text/TextEncoding.cpp: 11 (WebCore::TextEncoding::encode): 12 * platform/text/TextEncodingRegistry.cpp: 13 (WebCore::buildBaseTextCodecMaps): 14 (WebCore::extendTextCodecMaps): 15 1 16 2009-07-29 Yong Li <yong.li@torchmobile.com> 2 17 -
trunk/WebCore/platform/text/String.cpp
r44831 r46566 2 2 * (C) 1999 Lars Knoll (knoll@kde.org) 3 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. 4 5 * 5 6 * This library is free software; you can redistribute it and/or … … 354 355 355 356 return buffer; 357 358 #elif PLATFORM(WINCE) 359 va_list args; 360 va_start(args, format); 361 362 Vector<char, 256> buffer; 363 364 int bufferSize = 256; 365 buffer.resize(bufferSize); 366 for (;;) { 367 int written = vsnprintf(buffer.data(), bufferSize, format, args); 368 va_end(args); 369 370 if (written == 0) 371 return String(""); 372 if (written > 0) 373 return StringImpl::create(buffer.data(), written); 374 375 bufferSize <<= 1; 376 buffer.resize(bufferSize); 377 va_start(args, format); 378 } 379 356 380 #else 357 381 va_list args; -
trunk/WebCore/platform/text/TextEncoding.cpp
r44050 r46566 2 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 114 115 str = str.normalized(QString::NormalizationForm_C); 115 116 return newTextCodec(*this)->encode(reinterpret_cast<const UChar *>(str.utf16()), str.length(), handling); 117 #elif PLATFORM(WINCE) 118 // normalization will be done by Windows CE API 119 OwnPtr<TextCodec> textCodec = newTextCodec(*this); 120 return textCodec.get() ? textCodec->encode(characters, length, handling) : CString(); 116 121 #endif 117 122 } -
trunk/WebCore/platform/text/TextEncodingRegistry.cpp
r44096 r46566 1 1 /* 2 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 48 49 #include "qt/TextCodecQt.h" 49 50 #endif 51 #if PLATFORM(WINCE) 52 #include "TextCodecWince.h" 53 #endif 50 54 51 55 using namespace WTF; … … 190 194 TextCodecICU::registerBaseCodecs(addToTextCodecMap); 191 195 #endif 196 197 #if PLATFORM(WINCE) 198 TextCodecWince::registerBaseEncodingNames(addToTextEncodingNameMap); 199 TextCodecWince::registerBaseCodecs(addToTextCodecMap); 200 #endif 192 201 } 193 202 … … 207 216 TextCodecMac::registerEncodingNames(addToTextEncodingNameMap); 208 217 TextCodecMac::registerCodecs(addToTextCodecMap); 218 #endif 219 220 #if PLATFORM(WINCE) 221 TextCodecWince::registerExtendedEncodingNames(addToTextEncodingNameMap); 222 TextCodecWince::registerExtendedCodecs(addToTextCodecMap); 209 223 #endif 210 224 }
Note: See TracChangeset
for help on using the changeset viewer.