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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 | 1075 |
1076 // FIXME: We really ought to be able to just check for isCancellation() here
, but there are some | 1076 // FIXME: We really ought to be able to just check for isCancellation() here
, but there are some |
1077 // ResourceErrors that setIsCancellation() but aren't created by ResourceErr
or::cancelledError(). | 1077 // ResourceErrors that setIsCancellation() but aren't created by ResourceErr
or::cancelledError(). |
1078 ResourceError c(ResourceError::cancelledError(KURL())); | 1078 ResourceError c(ResourceError::cancelledError(KURL())); |
1079 if ((error.errorCode() != c.errorCode() || error.domain() != c.domain()) &&
m_frame->owner()) { | 1079 if ((error.errorCode() != c.errorCode() || error.domain() != c.domain()) &&
m_frame->owner()) { |
1080 // FIXME: For now, fallback content doesn't work cross process. | 1080 // FIXME: For now, fallback content doesn't work cross process. |
1081 ASSERT(m_frame->owner()->isLocal()); | 1081 ASSERT(m_frame->owner()->isLocal()); |
1082 m_frame->deprecatedLocalOwner()->renderFallbackContent(); | 1082 m_frame->deprecatedLocalOwner()->renderFallbackContent(); |
1083 } | 1083 } |
1084 | 1084 |
| 1085 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); |
1085 if (loader == m_provisionalDocumentLoader) { | 1086 if (loader == m_provisionalDocumentLoader) { |
1086 client()->dispatchDidFailProvisionalLoad(error); | 1087 client()->dispatchDidFailProvisionalLoad(error, historyCommitType); |
1087 if (loader != m_provisionalDocumentLoader) | 1088 if (loader != m_provisionalDocumentLoader) |
1088 return; | 1089 return; |
1089 m_provisionalDocumentLoader->detachFromFrame(); | 1090 m_provisionalDocumentLoader->detachFromFrame(); |
1090 m_provisionalDocumentLoader = nullptr; | 1091 m_provisionalDocumentLoader = nullptr; |
1091 m_progressTracker->progressCompleted(); | 1092 m_progressTracker->progressCompleted(); |
1092 } else { | 1093 } else { |
1093 ASSERT(loader == m_documentLoader); | 1094 ASSERT(loader == m_documentLoader); |
1094 if (m_frame->document()->parser()) | 1095 if (m_frame->document()->parser()) |
1095 m_frame->document()->parser()->stopParsing(); | 1096 m_frame->document()->parser()->stopParsing(); |
1096 if (!m_provisionalDocumentLoader && m_frame->isLoading()) { | 1097 if (!m_provisionalDocumentLoader && m_frame->isLoading()) { |
1097 client()->dispatchDidFailLoad(error); | 1098 client()->dispatchDidFailLoad(error, historyCommitType); |
1098 m_progressTracker->progressCompleted(); | 1099 m_progressTracker->progressCompleted(); |
1099 } | 1100 } |
1100 } | 1101 } |
1101 checkCompleted(); | 1102 checkCompleted(); |
1102 } | 1103 } |
1103 | 1104 |
1104 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S
tring& httpMethod, FrameLoadType loadType, const KURL& url) | 1105 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S
tring& httpMethod, FrameLoadType loadType, const KURL& url) |
1105 { | 1106 { |
1106 ASSERT(loadType != FrameLoadTypeReloadFromOrigin); | 1107 ASSERT(loadType != FrameLoadTypeReloadFromOrigin); |
1107 // We don't do this if we are submitting a form with method other than "GET"
, explicitly reloading, | 1108 // We don't do this if we are submitting a form with method other than "GET"
, explicitly reloading, |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 // FIXME: We need a way to propagate insecure requests policy flags to | 1427 // FIXME: We need a way to propagate insecure requests policy flags to |
1427 // out-of-process frames. For now, we'll always use default behavior. | 1428 // out-of-process frames. For now, we'll always use default behavior. |
1428 if (!parentFrame->isLocalFrame()) | 1429 if (!parentFrame->isLocalFrame()) |
1429 return nullptr; | 1430 return nullptr; |
1430 | 1431 |
1431 ASSERT(toLocalFrame(parentFrame)->document()); | 1432 ASSERT(toLocalFrame(parentFrame)->document()); |
1432 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1433 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1433 } | 1434 } |
1434 | 1435 |
1435 } // namespace blink | 1436 } // namespace blink |
OLD | NEW |