| 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 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 NavigationType navigationType = determineNavigationType(type, frameLoadReque
st.resourceRequest().httpBody() || frameLoadRequest.form(), frameLoadRequest.tri
ggeringEvent()); | 1412 NavigationType navigationType = determineNavigationType(type, frameLoadReque
st.resourceRequest().httpBody() || frameLoadRequest.form(), frameLoadRequest.tri
ggeringEvent()); |
| 1413 frameLoadRequest.resourceRequest().setRequestContext(determineRequestContext
FromNavigationType(navigationType)); | 1413 frameLoadRequest.resourceRequest().setRequestContext(determineRequestContext
FromNavigationType(navigationType)); |
| 1414 frameLoadRequest.resourceRequest().setFrameType(m_frame->isMainFrame() ? Web
URLRequest::FrameTypeTopLevel : WebURLRequest::FrameTypeNested); | 1414 frameLoadRequest.resourceRequest().setFrameType(m_frame->isMainFrame() ? Web
URLRequest::FrameTypeTopLevel : WebURLRequest::FrameTypeNested); |
| 1415 ResourceRequest& request = frameLoadRequest.resourceRequest(); | 1415 ResourceRequest& request = frameLoadRequest.resourceRequest(); |
| 1416 if (!shouldContinueForNavigationPolicy(request, frameLoadRequest.substituteD
ata(), nullptr, frameLoadRequest.shouldCheckMainWorldContentSecurityPolicy(), na
vigationType, navigationPolicy, type == FrameLoadTypeReplaceCurrentItem, frameLo
adRequest.clientRedirect() == ClientRedirectPolicy::ClientRedirect)) | 1416 if (!shouldContinueForNavigationPolicy(request, frameLoadRequest.substituteD
ata(), nullptr, frameLoadRequest.shouldCheckMainWorldContentSecurityPolicy(), na
vigationType, navigationPolicy, type == FrameLoadTypeReplaceCurrentItem, frameLo
adRequest.clientRedirect() == ClientRedirectPolicy::ClientRedirect)) |
| 1417 return; | 1417 return; |
| 1418 if (!shouldClose(navigationType == NavigationTypeReload)) | 1418 if (!shouldClose(navigationType == NavigationTypeReload)) |
| 1419 return; | 1419 return; |
| 1420 | 1420 |
| 1421 m_frame->document()->cancelParsing(); | 1421 m_frame->document()->cancelParsing(); |
| 1422 detachDocumentLoader(m_provisionalDocumentLoader); | 1422 if (m_provisionalDocumentLoader) { |
| 1423 FrameNavigationDisabler navigationDisabler(*m_frame); |
| 1424 detachDocumentLoader(m_provisionalDocumentLoader); |
| 1425 } |
| 1423 | 1426 |
| 1424 // beforeunload fired above, and detaching a DocumentLoader can fire | 1427 // beforeunload fired above, and detaching a DocumentLoader can fire |
| 1425 // events, which can detach this frame. | 1428 // events, which can detach this frame. |
| 1426 if (!m_frame->host()) | 1429 if (!m_frame->host()) |
| 1427 return; | 1430 return; |
| 1428 | 1431 |
| 1429 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, reques
t, frameLoadRequest.substituteData().isValid() ? frameLoadRequest.substituteData
() : defaultSubstituteDataForURL(request.url())); | 1432 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, reques
t, frameLoadRequest.substituteData().isValid() ? frameLoadRequest.substituteData
() : defaultSubstituteDataForURL(request.url())); |
| 1430 m_provisionalDocumentLoader->setNavigationType(navigationType); | 1433 m_provisionalDocumentLoader->setNavigationType(navigationType); |
| 1431 m_provisionalDocumentLoader->setReplacesCurrentHistoryItem(type == FrameLoad
TypeReplaceCurrentItem); | 1434 m_provisionalDocumentLoader->setReplacesCurrentHistoryItem(type == FrameLoad
TypeReplaceCurrentItem); |
| 1432 m_provisionalDocumentLoader->setIsClientRedirect(frameLoadRequest.clientRedi
rect() == ClientRedirectPolicy::ClientRedirect); | 1435 m_provisionalDocumentLoader->setIsClientRedirect(frameLoadRequest.clientRedi
rect() == ClientRedirectPolicy::ClientRedirect); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1623 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1626 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1624 return tracedValue; | 1627 return tracedValue; |
| 1625 } | 1628 } |
| 1626 | 1629 |
| 1627 inline void FrameLoader::takeObjectSnapshot() const | 1630 inline void FrameLoader::takeObjectSnapshot() const |
| 1628 { | 1631 { |
| 1629 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1632 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1630 } | 1633 } |
| 1631 | 1634 |
| 1632 } // namespace blink | 1635 } // namespace blink |
| OLD | NEW |