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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 { | 179 { |
180 DEFINE_STATIC_LOCAL(KURL, staticBlankURL, (ParsedURLString, "about:blank")); | 180 DEFINE_STATIC_LOCAL(KURL, staticBlankURL, (ParsedURLString, "about:blank")); |
181 return staticBlankURL; | 181 return staticBlankURL; |
182 } | 182 } |
183 | 183 |
184 bool KURL::isAboutBlankURL() const | 184 bool KURL::isAboutBlankURL() const |
185 { | 185 { |
186 return *this == blankURL(); | 186 return *this == blankURL(); |
187 } | 187 } |
188 | 188 |
| 189 const KURL& srcdocURL() |
| 190 { |
| 191 DEFINE_STATIC_LOCAL(KURL, staticSrcdocURL, (ParsedURLString, "about:srcdoc")
); |
| 192 return staticSrcdocURL; |
| 193 } |
| 194 |
| 195 bool KURL::isAboutSrcdocURL() const |
| 196 { |
| 197 return *this == srcdocURL(); |
| 198 } |
| 199 |
189 String KURL::elidedString() const | 200 String KURL::elidedString() const |
190 { | 201 { |
191 if (string().length() <= 1024) | 202 if (string().length() <= 1024) |
192 return string(); | 203 return string(); |
193 | 204 |
194 return string().left(511) + "..." + string().right(510); | 205 return string().left(511) + "..." + string().right(510); |
195 } | 206 } |
196 | 207 |
197 KURL::KURL() | 208 KURL::KURL() |
198 : m_isValid(false) | 209 : m_isValid(false) |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 m_string = AtomicString::fromUTF8(output.data(), output.length()); | 914 m_string = AtomicString::fromUTF8(output.data(), output.length()); |
904 } | 915 } |
905 | 916 |
906 bool KURL::isSafeToSendToAnotherThread() const | 917 bool KURL::isSafeToSendToAnotherThread() const |
907 { | 918 { |
908 return m_string.isSafeToSendToAnotherThread() | 919 return m_string.isSafeToSendToAnotherThread() |
909 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); | 920 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); |
910 } | 921 } |
911 | 922 |
912 } // namespace blink | 923 } // namespace blink |
OLD | NEW |