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

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

Issue 1530183004: Revert 3 CLs for shouldOverrideUrlLoading implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (simple conflict in AwContentsClientShouldOverrideUrlLoadingTest). Created 4 years, 11 months 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 | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | 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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 ASSERT(m_frame->owner()->isLocal()); 1213 ASSERT(m_frame->owner()->isLocal());
1214 m_frame->deprecatedLocalOwner()->renderFallbackContent(); 1214 m_frame->deprecatedLocalOwner()->renderFallbackContent();
1215 } 1215 }
1216 1216
1217 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType); 1217 HistoryCommitType historyCommitType = loadTypeToCommitType(m_loadType);
1218 if (loader == m_provisionalDocumentLoader) { 1218 if (loader == m_provisionalDocumentLoader) {
1219 client()->dispatchDidFailProvisionalLoad(error, historyCommitType); 1219 client()->dispatchDidFailProvisionalLoad(error, historyCommitType);
1220 if (loader != m_provisionalDocumentLoader) 1220 if (loader != m_provisionalDocumentLoader)
1221 return; 1221 return;
1222 detachDocumentLoader(m_provisionalDocumentLoader); 1222 detachDocumentLoader(m_provisionalDocumentLoader);
1223 // If the provisional load failed, and we haven't yet rendered anything 1223 m_progressTracker->progressCompleted();
1224 // into the frame, then act as though the non-provisional loader failed
1225 // as well. If we don't do this, the main load will never finish.
1226 if (!stateMachine()->committedFirstRealDocumentLoad())
1227 m_documentLoader->setSentDidFinishLoad();
1228 } else { 1224 } else {
1229 ASSERT(loader == m_documentLoader); 1225 ASSERT(loader == m_documentLoader);
1230 if (m_frame->document()->parser()) 1226 if (m_frame->document()->parser())
1231 m_frame->document()->parser()->stopParsing(); 1227 m_frame->document()->parser()->stopParsing();
1232 if (!m_documentLoader->sentDidFinishLoad()) { 1228 m_documentLoader->setSentDidFinishLoad();
1229 if (!m_provisionalDocumentLoader && m_frame->isLoading()) {
1233 client()->dispatchDidFailLoad(error, historyCommitType); 1230 client()->dispatchDidFailLoad(error, historyCommitType);
1234 m_documentLoader->setSentDidFinishLoad(); 1231 m_progressTracker->progressCompleted();
1235 } 1232 }
1236 } 1233 }
1237 checkCompleted(); 1234 checkCompleted();
1238 } 1235 }
1239 1236
1240 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S tring& httpMethod, FrameLoadType loadType, const KURL& url) 1237 bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S tring& httpMethod, FrameLoadType loadType, const KURL& url)
1241 { 1238 {
1242 // We don't do this if we are submitting a form with method other than "GET" , explicitly reloading, 1239 // We don't do this if we are submitting a form with method other than "GET" , explicitly reloading,
1243 // currently displaying a frameset, or if the URL does not have a fragment. 1240 // currently displaying a frameset, or if the URL does not have a fragment.
1244 return (!isFormSubmission || equalIgnoringCase(httpMethod, HTTPNames::GET)) 1241 return (!isFormSubmission || equalIgnoringCase(httpMethod, HTTPNames::GET))
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 // FIXME: We need a way to propagate insecure requests policy flags to 1546 // FIXME: We need a way to propagate insecure requests policy flags to
1550 // out-of-process frames. For now, we'll always use default behavior. 1547 // out-of-process frames. For now, we'll always use default behavior.
1551 if (!parentFrame->isLocalFrame()) 1548 if (!parentFrame->isLocalFrame())
1552 return nullptr; 1549 return nullptr;
1553 1550
1554 ASSERT(toLocalFrame(parentFrame)->document()); 1551 ASSERT(toLocalFrame(parentFrame)->document());
1555 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1552 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1556 } 1553 }
1557 1554
1558 } // namespace blink 1555 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698