| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 visitor->trace(m_currentItem); | 193 visitor->trace(m_currentItem); |
| 194 visitor->trace(m_provisionalItem); | 194 visitor->trace(m_provisionalItem); |
| 195 visitor->trace(m_deferredHistoryLoad); | 195 visitor->trace(m_deferredHistoryLoad); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void FrameLoader::init() | 198 void FrameLoader::init() |
| 199 { | 199 { |
| 200 ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); | 200 ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); |
| 201 initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 201 initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); |
| 202 initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp
eTopLevel : WebURLRequest::FrameTypeNested); | 202 initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp
eTopLevel : WebURLRequest::FrameTypeNested); |
| 203 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia
lRequest, SubstituteData()); | 203 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia
lRequest, SubstituteData(), 0); |
| 204 m_provisionalDocumentLoader->startLoadingMainResource(); | 204 m_provisionalDocumentLoader->startLoadingMainResource(); |
| 205 m_frame->document()->cancelParsing(); | 205 m_frame->document()->cancelParsing(); |
| 206 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocu
ment); | 206 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocu
ment); |
| 207 takeObjectSnapshot(); | 207 takeObjectSnapshot(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 FrameLoaderClient* FrameLoader::client() const | 210 FrameLoaderClient* FrameLoader::client() const |
| 211 { | 211 { |
| 212 return static_cast<FrameLoaderClient*>(m_frame->client()); | 212 return static_cast<FrameLoaderClient*>(m_frame->client()); |
| 213 } | 213 } |
| (...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1405 return; | 1405 return; |
| 1406 | 1406 |
| 1407 m_frame->document()->cancelParsing(); | 1407 m_frame->document()->cancelParsing(); |
| 1408 detachDocumentLoader(m_provisionalDocumentLoader); | 1408 detachDocumentLoader(m_provisionalDocumentLoader); |
| 1409 | 1409 |
| 1410 // beforeunload fired above, and detaching a DocumentLoader can fire | 1410 // beforeunload fired above, and detaching a DocumentLoader can fire |
| 1411 // events, which can detach this frame. | 1411 // events, which can detach this frame. |
| 1412 if (!m_frame->host()) | 1412 if (!m_frame->host()) |
| 1413 return; | 1413 return; |
| 1414 | 1414 |
| 1415 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, reques
t, frameLoadRequest.substituteData().isValid() ? frameLoadRequest.substituteData
() : defaultSubstituteDataForURL(request.url())); | 1415 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, reques
t, frameLoadRequest.substituteData().isValid() ? frameLoadRequest.substituteData
() : defaultSubstituteDataForURL(request.url()), (!!frameLoadRequest.originDocum
ent() ? 1 : 2)); |
| 1416 m_provisionalDocumentLoader->setNavigationType(navigationType); | 1416 m_provisionalDocumentLoader->setNavigationType(navigationType); |
| 1417 m_provisionalDocumentLoader->setReplacesCurrentHistoryItem(type == FrameLoad
TypeReplaceCurrentItem); | 1417 m_provisionalDocumentLoader->setReplacesCurrentHistoryItem(type == FrameLoad
TypeReplaceCurrentItem); |
| 1418 m_provisionalDocumentLoader->setIsClientRedirect(frameLoadRequest.clientRedi
rect() == ClientRedirectPolicy::ClientRedirect); | 1418 m_provisionalDocumentLoader->setIsClientRedirect(frameLoadRequest.clientRedi
rect() == ClientRedirectPolicy::ClientRedirect); |
| 1419 | 1419 |
| 1420 InspectorInstrumentation::didStartProvisionalLoad(m_frame); | 1420 InspectorInstrumentation::didStartProvisionalLoad(m_frame); |
| 1421 | 1421 |
| 1422 m_frame->navigationScheduler().cancel(); | 1422 m_frame->navigationScheduler().cancel(); |
| 1423 m_checkTimer.stop(); | 1423 m_checkTimer.stop(); |
| 1424 | 1424 |
| 1425 m_loadType = type; | 1425 m_loadType = type; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1564 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1564 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1565 return tracedValue; | 1565 return tracedValue; |
| 1566 } | 1566 } |
| 1567 | 1567 |
| 1568 inline void FrameLoader::takeObjectSnapshot() const | 1568 inline void FrameLoader::takeObjectSnapshot() const |
| 1569 { | 1569 { |
| 1570 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1570 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 } // namespace blink | 1573 } // namespace blink |
| OLD | NEW |