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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 if (m_parsed.username.is_nonempty() || m_parsed.password.is_nonempty() || m_
parsed.ref.is_nonempty()) { | 136 if (m_parsed.username.is_nonempty() || m_parsed.password.is_nonempty() || m_
parsed.ref.is_nonempty()) { |
137 KURL referrer(*this); | 137 KURL referrer(*this); |
138 referrer.setUser(String()); | 138 referrer.setUser(String()); |
139 referrer.setPass(String()); | 139 referrer.setPass(String()); |
140 referrer.removeFragmentIdentifier(); | 140 referrer.removeFragmentIdentifier(); |
141 return referrer.string(); | 141 return referrer.string(); |
142 } | 142 } |
143 return string(); | 143 return string(); |
144 } | 144 } |
145 | 145 |
| 146 String KURL::strippedForUseAsHref() const |
| 147 { |
| 148 if (m_parsed.username.is_nonempty() || m_parsed.password.is_nonempty()) { |
| 149 KURL href(*this); |
| 150 href.setUser(String()); |
| 151 href.setPass(String()); |
| 152 return href.string(); |
| 153 } |
| 154 return string(); |
| 155 } |
| 156 |
146 bool KURL::isLocalFile() const | 157 bool KURL::isLocalFile() const |
147 { | 158 { |
148 // Including feed here might be a bad idea since drag and drop uses this che
ck | 159 // Including feed here might be a bad idea since drag and drop uses this che
ck |
149 // and including feed would allow feeds to potentially let someone's blog | 160 // and including feed would allow feeds to potentially let someone's blog |
150 // read the contents of the clipboard on a drag, even without a drop. | 161 // read the contents of the clipboard on a drag, even without a drop. |
151 // Likewise with using the FrameLoader::shouldTreatURLAsLocal() function. | 162 // Likewise with using the FrameLoader::shouldTreatURLAsLocal() function. |
152 return protocolIs("file"); | 163 return protocolIs("file"); |
153 } | 164 } |
154 | 165 |
155 bool protocolIsJavaScript(const String& url) | 166 bool protocolIsJavaScript(const String& url) |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 m_string = AtomicString::fromUTF8(output.data(), output.length()); | 896 m_string = AtomicString::fromUTF8(output.data(), output.length()); |
886 } | 897 } |
887 | 898 |
888 bool KURL::isSafeToSendToAnotherThread() const | 899 bool KURL::isSafeToSendToAnotherThread() const |
889 { | 900 { |
890 return m_string.isSafeToSendToAnotherThread() | 901 return m_string.isSafeToSendToAnotherThread() |
891 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); | 902 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); |
892 } | 903 } |
893 | 904 |
894 } // namespace blink | 905 } // namespace blink |
OLD | NEW |