| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 void InspectorFrontendHost::copyText(const String& text) | 158 void InspectorFrontendHost::copyText(const String& text) |
| 159 { | 159 { |
| 160 Pasteboard::generalPasteboard()->writePlainText(text, Pasteboard::CannotSmar
tReplace); | 160 Pasteboard::generalPasteboard()->writePlainText(text, Pasteboard::CannotSmar
tReplace); |
| 161 } | 161 } |
| 162 | 162 |
| 163 static String escapeUnicodeNonCharacters(const String& str) | 163 static String escapeUnicodeNonCharacters(const String& str) |
| 164 { | 164 { |
| 165 StringBuilder dst; | 165 StringBuilder dst; |
| 166 for (unsigned i = 0; i < str.length(); ++i) { | 166 for (unsigned i = 0; i < str.length(); ++i) { |
| 167 UChar c = str[i]; | 167 UChar c = str[i]; |
| 168 if (c > 126) { | 168 if (c >= 0xD800) { |
| 169 unsigned symbol = static_cast<unsigned>(c); | 169 unsigned symbol = static_cast<unsigned>(c); |
| 170 String symbolCode = String::format("\\u%04X", symbol); | 170 String symbolCode = String::format("\\u%04X", symbol); |
| 171 dst.append(symbolCode); | 171 dst.append(symbolCode); |
| 172 } else { | 172 } else { |
| 173 dst.append(c); | 173 dst.append(c); |
| 174 } | 174 } |
| 175 | 175 |
| 176 } | 176 } |
| 177 return dst.toString(); | 177 return dst.toString(); |
| 178 } | 178 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 { | 215 { |
| 216 return RenderTheme::theme().activeSelectionForegroundColor().serialized(); | 216 return RenderTheme::theme().activeSelectionForegroundColor().serialized(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 bool InspectorFrontendHost::isUnderTest() | 219 bool InspectorFrontendHost::isUnderTest() |
| 220 { | 220 { |
| 221 return m_client && m_client->isUnderTest(); | 221 return m_client && m_client->isUnderTest(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace WebCore | 224 } // namespace WebCore |
| OLD | NEW |