| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> | 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #if USE(ICU_UNICODE) | 28 #if USE(ICU_UNICODE) |
| 29 #include "core/platform/text/TextCodecICU.h" | 29 #include "core/platform/text/TextCodecICU.h" |
| 30 | 30 |
| 31 #include <unicode/ucnv.h> | 31 #include <unicode/ucnv.h> |
| 32 #include <unicode/ucnv_cb.h> | 32 #include <unicode/ucnv_cb.h> |
| 33 #include "ThreadGlobalData.h" | 33 #include "core/platform/ThreadGlobalData.h" |
| 34 #include <wtf/Assertions.h> | 34 #include <wtf/Assertions.h> |
| 35 #include <wtf/StringExtras.h> | 35 #include <wtf/StringExtras.h> |
| 36 #include <wtf/text/CString.h> | 36 #include <wtf/text/CString.h> |
| 37 #include <wtf/text/StringBuilder.h> | 37 #include <wtf/text/StringBuilder.h> |
| 38 #include <wtf/Threading.h> | 38 #include <wtf/Threading.h> |
| 39 #include <wtf/unicode/CharacterNames.h> | 39 #include <wtf/unicode/CharacterNames.h> |
| 40 | 40 |
| 41 using std::min; | 41 using std::min; |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 memcpy(result.data() + size, buffer, count); | 467 memcpy(result.data() + size, buffer, count); |
| 468 size += count; | 468 size += count; |
| 469 } while (err == U_BUFFER_OVERFLOW_ERROR); | 469 } while (err == U_BUFFER_OVERFLOW_ERROR); |
| 470 | 470 |
| 471 return CString(result.data(), size); | 471 return CString(result.data(), size); |
| 472 } | 472 } |
| 473 | 473 |
| 474 } // namespace WebCore | 474 } // namespace WebCore |
| 475 #endif | 475 #endif |
| 476 | 476 |
| OLD | NEW |