OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 169 } |
170 | 170 |
171 String KURL::elidedString() const | 171 String KURL::elidedString() const |
172 { | 172 { |
173 if (string().length() <= 1024) | 173 if (string().length() <= 1024) |
174 return string(); | 174 return string(); |
175 | 175 |
176 return string().left(511) + "..." + string().right(510); | 176 return string().left(511) + "..." + string().right(510); |
177 } | 177 } |
178 | 178 |
| 179 KURL::KURL() |
| 180 : m_isValid(false) |
| 181 , m_protocolIsInHTTPFamily(false) |
| 182 { |
| 183 } |
| 184 |
179 // Initializes with a string representing an absolute URL. No encoding | 185 // Initializes with a string representing an absolute URL. No encoding |
180 // information is specified. This generally happens when a KURL is converted | 186 // information is specified. This generally happens when a KURL is converted |
181 // to a string and then converted back. In this case, the URL is already | 187 // to a string and then converted back. In this case, the URL is already |
182 // canonical and in proper escaped form so needs no encoding. We treat it as | 188 // canonical and in proper escaped form so needs no encoding. We treat it as |
183 // UTF-8 just in case. | 189 // UTF-8 just in case. |
184 KURL::KURL(ParsedURLStringTag, const String& url) | 190 KURL::KURL(ParsedURLStringTag, const String& url) |
185 { | 191 { |
186 if (!url.isNull()) | 192 if (!url.isNull()) |
187 init(KURL(), url, 0); | 193 init(KURL(), url, 0); |
188 else { | 194 else { |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 m_string = AtomicString::fromUTF8(output.data(), output.length()); | 913 m_string = AtomicString::fromUTF8(output.data(), output.length()); |
908 } | 914 } |
909 | 915 |
910 bool KURL::isSafeToSendToAnotherThread() const | 916 bool KURL::isSafeToSendToAnotherThread() const |
911 { | 917 { |
912 return m_string.isSafeToSendToAnotherThread() | 918 return m_string.isSafeToSendToAnotherThread() |
913 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); | 919 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); |
914 } | 920 } |
915 | 921 |
916 } // namespace WebCore | 922 } // namespace WebCore |
OLD | NEW |