OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 ASSERT(m_frame->owner()->isLocal()); | 1207 ASSERT(m_frame->owner()->isLocal()); |
1208 m_frame->deprecatedLocalOwner()->renderFallbackContent(); | 1208 m_frame->deprecatedLocalOwner()->renderFallbackContent(); |
1209 } | 1209 } |
1210 | 1210 |
1211 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); | 1211 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); |
1212 if (loader == m_provisionalDocumentLoader) { | 1212 if (loader == m_provisionalDocumentLoader) { |
1213 client()->dispatchDidFailProvisionalLoad(error, historyCommitType); | 1213 client()->dispatchDidFailProvisionalLoad(error, historyCommitType); |
1214 if (loader != m_provisionalDocumentLoader) | 1214 if (loader != m_provisionalDocumentLoader) |
1215 return; | 1215 return; |
1216 detachDocumentLoader(m_provisionalDocumentLoader); | 1216 detachDocumentLoader(m_provisionalDocumentLoader); |
1217 m_progressTracker->progressCompleted(); | 1217 // If the provisional load failed, and we haven't yet rendered anything |
| 1218 // into the frame, then act as though the non-provisional loader failed |
| 1219 // as well. If we don't do this, the main load will never finish. |
| 1220 if (!stateMachine()->committedFirstRealDocumentLoad()) |
| 1221 m_documentLoader->setSentDidFinishLoad(); |
1218 } else { | 1222 } else { |
1219 ASSERT(loader == m_documentLoader); | 1223 ASSERT(loader == m_documentLoader); |
1220 if (m_frame->document()->parser()) | 1224 if (m_frame->document()->parser()) |
1221 m_frame->document()->parser()->stopParsing(); | 1225 m_frame->document()->parser()->stopParsing(); |
1222 m_documentLoader->setSentDidFinishLoad(); | 1226 if (!m_documentLoader->sentDidFinishLoad()) { |
1223 if (!m_provisionalDocumentLoader && m_frame->isLoading()) { | |
1224 client()->dispatchDidFailLoad(error, historyCommitType); | 1227 client()->dispatchDidFailLoad(error, historyCommitType); |
1225 m_progressTracker->progressCompleted(); | 1228 m_documentLoader->setSentDidFinishLoad(); |
1226 } | 1229 } |
1227 } | 1230 } |
1228 checkCompleted(); | 1231 checkCompleted(); |
1229 } | 1232 } |
1230 | 1233 |
1231 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S
tring& httpMethod, FrameLoadType loadType, const KURL& url) | 1234 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S
tring& httpMethod, FrameLoadType loadType, const KURL& url) |
1232 { | 1235 { |
1233 // We don't do this if we are submitting a form with method other than "GET"
, explicitly reloading, | 1236 // We don't do this if we are submitting a form with method other than "GET"
, explicitly reloading, |
1234 // currently displaying a frameset, or if the URL does not have a fragment. | 1237 // currently displaying a frameset, or if the URL does not have a fragment. |
1235 return (!isFormSubmission || equalIgnoringCase(httpMethod, "GET")) | 1238 return (!isFormSubmission || equalIgnoringCase(httpMethod, "GET")) |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 // FIXME: We need a way to propagate insecure requests policy flags to | 1553 // FIXME: We need a way to propagate insecure requests policy flags to |
1551 // out-of-process frames. For now, we'll always use default behavior. | 1554 // out-of-process frames. For now, we'll always use default behavior. |
1552 if (!parentFrame->isLocalFrame()) | 1555 if (!parentFrame->isLocalFrame()) |
1553 return nullptr; | 1556 return nullptr; |
1554 | 1557 |
1555 ASSERT(toLocalFrame(parentFrame)->document()); | 1558 ASSERT(toLocalFrame(parentFrame)->document()); |
1556 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1559 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1557 } | 1560 } |
1558 | 1561 |
1559 } // namespace blink | 1562 } // namespace blink |
OLD | NEW |