| 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 // ResourceErrors that setIsCancellation() but aren't created by ResourceErr
or::cancelledError(). | 1207 // ResourceErrors that setIsCancellation() but aren't created by ResourceErr
or::cancelledError(). |
| 1208 ResourceError c(ResourceError::cancelledError(KURL())); | 1208 ResourceError c(ResourceError::cancelledError(KURL())); |
| 1209 if ((error.errorCode() != c.errorCode() || error.domain() != c.domain()) &&
m_frame->owner()) { | 1209 if ((error.errorCode() != c.errorCode() || error.domain() != c.domain()) &&
m_frame->owner()) { |
| 1210 // FIXME: For now, fallback content doesn't work cross process. | 1210 // FIXME: For now, fallback content doesn't work cross process. |
| 1211 ASSERT(m_frame->owner()->isLocal()); | 1211 ASSERT(m_frame->owner()->isLocal()); |
| 1212 m_frame->deprecatedLocalOwner()->renderFallbackContent(); | 1212 m_frame->deprecatedLocalOwner()->renderFallbackContent(); |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); | 1215 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); |
| 1216 if (loader == m_provisionalDocumentLoader) { | 1216 if (loader == m_provisionalDocumentLoader) { |
| 1217 client()->dispatchDidFailProvisionalLoad(error, historyCommitType); | 1217 client()->dispatchDidFailProvisionalLoad(loader, error, historyCommitTyp
e); |
| 1218 if (loader != m_provisionalDocumentLoader) | 1218 if (loader != m_provisionalDocumentLoader) |
| 1219 return; | 1219 return; |
| 1220 detachDocumentLoader(m_provisionalDocumentLoader); | 1220 detachDocumentLoader(m_provisionalDocumentLoader); |
| 1221 m_progressTracker->progressCompleted(); | 1221 m_progressTracker->progressCompleted(); |
| 1222 } else { | 1222 } else { |
| 1223 ASSERT(loader == m_documentLoader); | 1223 ASSERT(loader == m_documentLoader); |
| 1224 if (m_frame->document()->parser()) | 1224 if (m_frame->document()->parser()) |
| 1225 m_frame->document()->parser()->stopParsing(); | 1225 m_frame->document()->parser()->stopParsing(); |
| 1226 if (!m_provisionalDocumentLoader && m_frame->isLoading()) { | 1226 if (!m_provisionalDocumentLoader && m_frame->isLoading()) { |
| 1227 client()->dispatchDidFailLoad(error, historyCommitType); | 1227 client()->dispatchDidFailLoad(loader, error, historyCommitType); |
| 1228 m_progressTracker->progressCompleted(); | 1228 m_progressTracker->progressCompleted(); |
| 1229 } | 1229 } |
| 1230 } | 1230 } |
| 1231 checkCompleted(); | 1231 checkCompleted(); |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 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) |
| 1235 { | 1235 { |
| 1236 // 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, |
| 1237 // 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. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 return; | 1350 return; |
| 1351 | 1351 |
| 1352 InspectorInstrumentation::didStartProvisionalLoad(m_frame); | 1352 InspectorInstrumentation::didStartProvisionalLoad(m_frame); |
| 1353 | 1353 |
| 1354 m_frame->navigationScheduler().cancel(); | 1354 m_frame->navigationScheduler().cancel(); |
| 1355 | 1355 |
| 1356 m_provisionalDocumentLoader = m_policyDocumentLoader.release(); | 1356 m_provisionalDocumentLoader = m_policyDocumentLoader.release(); |
| 1357 m_loadType = type; | 1357 m_loadType = type; |
| 1358 | 1358 |
| 1359 if (frameLoadRequest.form()) | 1359 if (frameLoadRequest.form()) |
| 1360 client()->dispatchWillSubmitForm(frameLoadRequest.form()); | 1360 client()->dispatchWillSubmitForm(m_provisionalDocumentLoader.get(), fram
eLoadRequest.form()); |
| 1361 | 1361 |
| 1362 m_progressTracker->progressStarted(); | 1362 m_progressTracker->progressStarted(); |
| 1363 if (m_provisionalDocumentLoader->isClientRedirect()) | 1363 if (m_provisionalDocumentLoader->isClientRedirect()) |
| 1364 m_provisionalDocumentLoader->appendRedirect(m_frame->document()->url()); | 1364 m_provisionalDocumentLoader->appendRedirect(m_frame->document()->url()); |
| 1365 m_provisionalDocumentLoader->appendRedirect(m_provisionalDocumentLoader->req
uest().url()); | 1365 m_provisionalDocumentLoader->appendRedirect(m_provisionalDocumentLoader->req
uest().url()); |
| 1366 double triggeringEventTime = frameLoadRequest.triggeringEvent() ? frameLoadR
equest.triggeringEvent()->platformTimeStamp() : 0; | 1366 double triggeringEventTime = frameLoadRequest.triggeringEvent() ? frameLoadR
equest.triggeringEvent()->platformTimeStamp() : 0; |
| 1367 client()->dispatchDidStartProvisionalLoad(triggeringEventTime); | 1367 client()->dispatchDidStartProvisionalLoad(m_provisionalDocumentLoader.get(),
triggeringEventTime); |
| 1368 ASSERT(m_provisionalDocumentLoader); | 1368 ASSERT(m_provisionalDocumentLoader); |
| 1369 m_provisionalDocumentLoader->startLoadingMainResource(); | 1369 m_provisionalDocumentLoader->startLoadingMainResource(); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void FrameLoader::applyUserAgent(ResourceRequest& request) | 1372 void FrameLoader::applyUserAgent(ResourceRequest& request) |
| 1373 { | 1373 { |
| 1374 String userAgent = this->userAgent(request.url()); | 1374 String userAgent = this->userAgent(request.url()); |
| 1375 ASSERT(!userAgent.isNull()); | 1375 ASSERT(!userAgent.isNull()); |
| 1376 request.setHTTPUserAgent(AtomicString(userAgent)); | 1376 request.setHTTPUserAgent(AtomicString(userAgent)); |
| 1377 } | 1377 } |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 // FIXME: We need a way to propagate insecure requests policy flags to | 1522 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1523 // out-of-process frames. For now, we'll always use default behavior. | 1523 // out-of-process frames. For now, we'll always use default behavior. |
| 1524 if (!parentFrame->isLocalFrame()) | 1524 if (!parentFrame->isLocalFrame()) |
| 1525 return nullptr; | 1525 return nullptr; |
| 1526 | 1526 |
| 1527 ASSERT(toLocalFrame(parentFrame)->document()); | 1527 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1528 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1528 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 } // namespace blink | 1531 } // namespace blink |
| OLD | NEW |