| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 4174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4185 } | 4185 } |
| 4186 } | 4186 } |
| 4187 | 4187 |
| 4188 KURL Document::completeURL(const String& url) const | 4188 KURL Document::completeURL(const String& url) const |
| 4189 { | 4189 { |
| 4190 return completeURLWithOverride(url, m_baseURL); | 4190 return completeURLWithOverride(url, m_baseURL); |
| 4191 } | 4191 } |
| 4192 | 4192 |
| 4193 KURL Document::completeURLWithOverride(const String& url, const KURL& baseURLOve
rride) const | 4193 KURL Document::completeURLWithOverride(const String& url, const KURL& baseURLOve
rride) const |
| 4194 { | 4194 { |
| 4195 ASSERT(baseURLOverride.isEmpty() || baseURLOverride.isValid()); |
| 4196 |
| 4195 // Always return a null URL when passed a null string. | 4197 // Always return a null URL when passed a null string. |
| 4196 // FIXME: Should we change the KURL constructor to have this behavior? | 4198 // FIXME: Should we change the KURL constructor to have this behavior? |
| 4197 // See also [CSS]StyleSheet::completeURL(const String&) | 4199 // See also [CSS]StyleSheet::completeURL(const String&) |
| 4198 if (url.isNull()) | 4200 if (url.isNull()) |
| 4199 return KURL(); | 4201 return KURL(); |
| 4200 // This logic is deliberately spread over many statements in an attempt to t
rack down http://crbug.com/312410. | 4202 // This logic is deliberately spread over many statements in an attempt to t
rack down http://crbug.com/312410. |
| 4201 const KURL* baseURLFromParent = 0; | 4203 const KURL* baseURLFromParent = 0; |
| 4202 bool shouldUseParentBaseURL = baseURLOverride.isEmpty(); | 4204 bool shouldUseParentBaseURL = baseURLOverride.isEmpty(); |
| 4203 if (!shouldUseParentBaseURL) { | 4205 if (!shouldUseParentBaseURL) { |
| 4204 const KURL& aboutBlankURL = blankURL(); | 4206 const KURL& aboutBlankURL = blankURL(); |
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5697 #ifndef NDEBUG | 5699 #ifndef NDEBUG |
| 5698 using namespace blink; | 5700 using namespace blink; |
| 5699 void showLiveDocumentInstances() | 5701 void showLiveDocumentInstances() |
| 5700 { | 5702 { |
| 5701 WeakDocumentSet& set = liveDocumentSet(); | 5703 WeakDocumentSet& set = liveDocumentSet(); |
| 5702 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5704 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5703 for (Document* document : set) | 5705 for (Document* document : set) |
| 5704 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5706 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5705 } | 5707 } |
| 5706 #endif | 5708 #endif |
| OLD | NEW |