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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 NavigationType navigationType = determineNavigationType(type, frameLoadReque
st.resourceRequest().httpBody() || frameLoadRequest.form(), frameLoadRequest.tri
ggeringEvent()); | 1371 NavigationType navigationType = determineNavigationType(type, frameLoadReque
st.resourceRequest().httpBody() || frameLoadRequest.form(), frameLoadRequest.tri
ggeringEvent()); |
1372 frameLoadRequest.resourceRequest().setRequestContext(determineRequestContext
FromNavigationType(navigationType)); | 1372 frameLoadRequest.resourceRequest().setRequestContext(determineRequestContext
FromNavigationType(navigationType)); |
1373 frameLoadRequest.resourceRequest().setFrameType(m_frame->isMainFrame() ? Web
URLRequest::FrameTypeTopLevel : WebURLRequest::FrameTypeNested); | 1373 frameLoadRequest.resourceRequest().setFrameType(m_frame->isMainFrame() ? Web
URLRequest::FrameTypeTopLevel : WebURLRequest::FrameTypeNested); |
1374 ResourceRequest& request = frameLoadRequest.resourceRequest(); | 1374 ResourceRequest& request = frameLoadRequest.resourceRequest(); |
1375 if (!shouldContinueForNavigationPolicy(request, frameLoadRequest.substituteD
ata(), nullptr, frameLoadRequest.shouldCheckMainWorldContentSecurityPolicy(), na
vigationType, navigationPolicy, type == FrameLoadTypeReplaceCurrentItem, frameLo
adRequest.clientRedirect() == ClientRedirectPolicy::ClientRedirect)) | 1375 if (!shouldContinueForNavigationPolicy(request, frameLoadRequest.substituteD
ata(), nullptr, frameLoadRequest.shouldCheckMainWorldContentSecurityPolicy(), na
vigationType, navigationPolicy, type == FrameLoadTypeReplaceCurrentItem, frameLo
adRequest.clientRedirect() == ClientRedirectPolicy::ClientRedirect)) |
1376 return; | 1376 return; |
1377 if (!shouldClose(navigationType == NavigationTypeReload)) | 1377 if (!shouldClose(navigationType == NavigationTypeReload)) |
1378 return; | 1378 return; |
1379 | 1379 |
1380 m_frame->document()->cancelParsing(); | 1380 m_frame->document()->cancelParsing(); |
1381 detachDocumentLoader(m_provisionalDocumentLoader); | 1381 if (m_provisionalDocumentLoader) { |
| 1382 FrameNavigationDisabler navigationDisabler(*m_frame); |
| 1383 detachDocumentLoader(m_provisionalDocumentLoader); |
| 1384 } |
1382 | 1385 |
1383 // beforeunload fired above, and detaching a DocumentLoader can fire | 1386 // beforeunload fired above, and detaching a DocumentLoader can fire |
1384 // events, which can detach this frame. | 1387 // events, which can detach this frame. |
1385 if (!m_frame->host()) | 1388 if (!m_frame->host()) |
1386 return; | 1389 return; |
1387 | 1390 |
1388 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, reques
t, frameLoadRequest.substituteData().isValid() ? frameLoadRequest.substituteData
() : defaultSubstituteDataForURL(request.url())); | 1391 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, reques
t, frameLoadRequest.substituteData().isValid() ? frameLoadRequest.substituteData
() : defaultSubstituteDataForURL(request.url())); |
1389 m_provisionalDocumentLoader->setNavigationType(navigationType); | 1392 m_provisionalDocumentLoader->setNavigationType(navigationType); |
1390 m_provisionalDocumentLoader->setReplacesCurrentHistoryItem(type == FrameLoad
TypeReplaceCurrentItem); | 1393 m_provisionalDocumentLoader->setReplacesCurrentHistoryItem(type == FrameLoad
TypeReplaceCurrentItem); |
1391 m_provisionalDocumentLoader->setIsClientRedirect(frameLoadRequest.clientRedi
rect() == ClientRedirectPolicy::ClientRedirect); | 1394 m_provisionalDocumentLoader->setIsClientRedirect(frameLoadRequest.clientRedi
rect() == ClientRedirectPolicy::ClientRedirect); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 // FIXME: We need a way to propagate insecure requests policy flags to | 1567 // FIXME: We need a way to propagate insecure requests policy flags to |
1565 // out-of-process frames. For now, we'll always use default behavior. | 1568 // out-of-process frames. For now, we'll always use default behavior. |
1566 if (!parentFrame->isLocalFrame()) | 1569 if (!parentFrame->isLocalFrame()) |
1567 return nullptr; | 1570 return nullptr; |
1568 | 1571 |
1569 ASSERT(toLocalFrame(parentFrame)->document()); | 1572 ASSERT(toLocalFrame(parentFrame)->document()); |
1570 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1573 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1571 } | 1574 } |
1572 | 1575 |
1573 } // namespace blink | 1576 } // namespace blink |
OLD | NEW |