| 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 2915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2926 const KURL& newURL = url.isEmpty() ? blankURL() : url; | 2926 const KURL& newURL = url.isEmpty() ? blankURL() : url; |
| 2927 if (newURL == m_url) | 2927 if (newURL == m_url) |
| 2928 return; | 2928 return; |
| 2929 | 2929 |
| 2930 m_url = newURL; | 2930 m_url = newURL; |
| 2931 m_accessEntryFromURL = nullptr; | 2931 m_accessEntryFromURL = nullptr; |
| 2932 updateBaseURL(); | 2932 updateBaseURL(); |
| 2933 contextFeatures().urlDidChange(this); | 2933 contextFeatures().urlDidChange(this); |
| 2934 } | 2934 } |
| 2935 | 2935 |
| 2936 KURL Document::validBaseElementURL() const |
| 2937 { |
| 2938 if (m_baseElementURL.isValid()) |
| 2939 return m_baseElementURL; |
| 2940 |
| 2941 return KURL(); |
| 2942 } |
| 2943 |
| 2936 void Document::updateBaseURL() | 2944 void Document::updateBaseURL() |
| 2937 { | 2945 { |
| 2938 KURL oldBaseURL = m_baseURL; | 2946 KURL oldBaseURL = m_baseURL; |
| 2939 // DOM 3 Core: When the Document supports the feature "HTML" [DOM Level 2 HT
ML], the base URI is computed using | 2947 // DOM 3 Core: When the Document supports the feature "HTML" [DOM Level 2 HT
ML], the base URI is computed using |
| 2940 // first the value of the href attribute of the HTML BASE element if any, an
d the value of the documentURI attribute | 2948 // first the value of the href attribute of the HTML BASE element if any, an
d the value of the documentURI attribute |
| 2941 // from the Document interface otherwise (which we store, preparsed, in m_ur
l). | 2949 // from the Document interface otherwise (which we store, preparsed, in m_ur
l). |
| 2942 if (!m_baseElementURL.isEmpty()) | 2950 if (!m_baseElementURL.isEmpty()) |
| 2943 m_baseURL = m_baseElementURL; | 2951 m_baseURL = m_baseElementURL; |
| 2944 else if (!m_baseURLOverride.isEmpty()) | 2952 else if (!m_baseURLOverride.isEmpty()) |
| 2945 m_baseURL = m_baseURLOverride; | 2953 m_baseURL = m_baseURLOverride; |
| (...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6010 #ifndef NDEBUG | 6018 #ifndef NDEBUG |
| 6011 using namespace blink; | 6019 using namespace blink; |
| 6012 void showLiveDocumentInstances() | 6020 void showLiveDocumentInstances() |
| 6013 { | 6021 { |
| 6014 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6022 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 6015 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6023 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6016 for (Document* document : set) | 6024 for (Document* document : set) |
| 6017 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6025 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6018 } | 6026 } |
| 6019 #endif | 6027 #endif |
| OLD | NEW |