Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1481063002: WIP: DO NOT COMMIT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1218 // If the provisional load failed, and we haven't yet rendered anything into the frame,
1219 // then act as though the non-provisional loader failed as well. If we d on't do this, the
1220 // main load will never finish.
1221 if (!stateMachine()->committedFirstRealDocumentLoad())
1222 m_documentLoader->setSentDidFinishLoad();
1218 } else { 1223 } else {
1219 ASSERT(loader == m_documentLoader); 1224 ASSERT(loader == m_documentLoader);
1220 if (m_frame->document()->parser()) 1225 if (m_frame->document()->parser())
1221 m_frame->document()->parser()->stopParsing(); 1226 m_frame->document()->parser()->stopParsing();
1222 m_documentLoader->setSentDidFinishLoad(); 1227 if (!m_documentLoader->sentDidFinishLoad()) {
1223 if (!m_provisionalDocumentLoader && m_frame->isLoading()) {
1224 client()->dispatchDidFailLoad(error, historyCommitType); 1228 client()->dispatchDidFailLoad(error, historyCommitType);
1225 m_progressTracker->progressCompleted(); 1229 m_documentLoader->setSentDidFinishLoad();
1226 } 1230 }
1227 } 1231 }
1228 checkCompleted(); 1232 checkCompleted();
1229 } 1233 }
1230 1234
1231 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S tring& httpMethod, FrameLoadType loadType, const KURL& url) 1235 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S tring& httpMethod, FrameLoadType loadType, const KURL& url)
1232 { 1236 {
1233 // We don't do this if we are submitting a form with method other than "GET" , explicitly reloading, 1237 // 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. 1238 // currently displaying a frameset, or if the URL does not have a fragment.
1235 return (!isFormSubmission || equalIgnoringCase(httpMethod, "GET")) 1239 return (!isFormSubmission || equalIgnoringCase(httpMethod, "GET"))
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 // FIXME: We need a way to propagate insecure requests policy flags to 1550 // FIXME: We need a way to propagate insecure requests policy flags to
1547 // out-of-process frames. For now, we'll always use default behavior. 1551 // out-of-process frames. For now, we'll always use default behavior.
1548 if (!parentFrame->isLocalFrame()) 1552 if (!parentFrame->isLocalFrame())
1549 return nullptr; 1553 return nullptr;
1550 1554
1551 ASSERT(toLocalFrame(parentFrame)->document()); 1555 ASSERT(toLocalFrame(parentFrame)->document());
1552 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1556 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1553 } 1557 }
1554 1558
1555 } // namespace blink 1559 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698