| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 namespace WTF { | 34 namespace WTF { |
| 35 | 35 |
| 36 class WTF_EXPORT TextEncoding { | 36 class WTF_EXPORT TextEncoding { |
| 37 public: | 37 public: |
| 38 TextEncoding() : m_name(0) { } | 38 TextEncoding() : m_name(0) { } |
| 39 TextEncoding(const char* name); | 39 TextEncoding(const char* name); |
| 40 TextEncoding(const String& name); | 40 TextEncoding(const String& name); |
| 41 | 41 |
| 42 bool isValid() const { return m_name; } | 42 bool isValid() const { return m_name; } |
| 43 const char* name() const { return m_name; } | 43 const char* name() const { return m_name; } |
| 44 const char* domName() const; // name exposed via DOM |
| 44 bool usesVisualOrdering() const; | 45 bool usesVisualOrdering() const; |
| 45 bool isJapanese() const; | 46 bool isJapanese() const; |
| 46 | 47 |
| 47 bool hasTrivialDisplayString() const { return m_backslashAsCurrencySymbol ==
'\\'; } | 48 bool hasTrivialDisplayString() const { return m_backslashAsCurrencySymbol ==
'\\'; } |
| 48 | 49 |
| 49 PassRefPtr<StringImpl> displayString(PassRefPtr<StringImpl> str) const | 50 PassRefPtr<StringImpl> displayString(PassRefPtr<StringImpl> str) const |
| 50 { | 51 { |
| 51 if (hasTrivialDisplayString() || !str) | 52 if (hasTrivialDisplayString() || !str) |
| 52 return str; | 53 return str; |
| 53 return str->replace('\\', m_backslashAsCurrencySymbol); | 54 return str->replace('\\', m_backslashAsCurrencySymbol); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 using WTF::ASCIIEncoding; | 107 using WTF::ASCIIEncoding; |
| 107 using WTF::Latin1Encoding; | 108 using WTF::Latin1Encoding; |
| 108 using WTF::UTF16BigEndianEncoding; | 109 using WTF::UTF16BigEndianEncoding; |
| 109 using WTF::UTF16LittleEndianEncoding; | 110 using WTF::UTF16LittleEndianEncoding; |
| 110 using WTF::UTF32BigEndianEncoding; | 111 using WTF::UTF32BigEndianEncoding; |
| 111 using WTF::UTF32LittleEndianEncoding; | 112 using WTF::UTF32LittleEndianEncoding; |
| 112 using WTF::UTF8Encoding; | 113 using WTF::UTF8Encoding; |
| 113 using WTF::WindowsLatin1Encoding; | 114 using WTF::WindowsLatin1Encoding; |
| 114 | 115 |
| 115 #endif // TextEncoding_h | 116 #endif // TextEncoding_h |
| OLD | NEW |