| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 // therefore now is a good time to report to the embedder the Content | 443 // therefore now is a good time to report to the embedder the Content |
| 444 // Security Policies that have accumulated so far for the new navigation. | 444 // Security Policies that have accumulated so far for the new navigation. |
| 445 m_frame->securityContext()->contentSecurityPolicy()->reportAccumulatedHeader
s(client()); | 445 m_frame->securityContext()->contentSecurityPolicy()->reportAccumulatedHeader
s(client()); |
| 446 | 446 |
| 447 // didObserveLoadingBehavior() must be called after dispatchDidCommitLoad()
is called for the metrics tracking logic to handle it properly. | 447 // didObserveLoadingBehavior() must be called after dispatchDidCommitLoad()
is called for the metrics tracking logic to handle it properly. |
| 448 if (client()->isControlledByServiceWorker(*m_documentLoader)) | 448 if (client()->isControlledByServiceWorker(*m_documentLoader)) |
| 449 client()->didObserveLoadingBehavior(WebLoadingBehaviorServiceWorkerContr
olled); | 449 client()->didObserveLoadingBehavior(WebLoadingBehaviorServiceWorkerContr
olled); |
| 450 | 450 |
| 451 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE
vent::data(m_frame)); | 451 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE
vent::data(m_frame)); |
| 452 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); | 452 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); |
| 453 m_frame->page()->didCommitLoad(m_frame); | 453 m_frame->page()->deprecatedDidCommitFrameLoad(m_frame); |
| 454 dispatchDidClearDocumentOfWindowObject(); | 454 dispatchDidClearDocumentOfWindowObject(); |
| 455 | 455 |
| 456 takeObjectSnapshot(); | 456 takeObjectSnapshot(); |
| 457 } | 457 } |
| 458 | 458 |
| 459 void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) | 459 void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) |
| 460 { | 460 { |
| 461 ASSERT(m_frame); | 461 ASSERT(m_frame); |
| 462 ASSERT(m_frame->document()); | 462 ASSERT(m_frame->document()); |
| 463 | 463 |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 // Check if the destination page is allowed to access the previous page's ti
ming information. | 1135 // Check if the destination page is allowed to access the previous page's ti
ming information. |
| 1136 if (m_frame->document()) { | 1136 if (m_frame->document()) { |
| 1137 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_provisi
onalDocumentLoader->request().url()); | 1137 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_provisi
onalDocumentLoader->request().url()); |
| 1138 m_provisionalDocumentLoader->timing().setHasSameOriginAsPreviousDocument
(securityOrigin->canRequest(m_frame->document()->url())); | 1138 m_provisionalDocumentLoader->timing().setHasSameOriginAsPreviousDocument
(securityOrigin->canRequest(m_frame->document()->url())); |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 if (!prepareForCommit()) | 1141 if (!prepareForCommit()) |
| 1142 return; | 1142 return; |
| 1143 | 1143 |
| 1144 if (isLoadingMainFrame()) { | 1144 if (isLoadingMainFrame()) { |
| 1145 m_frame->page()->didCommitLoad(); |
| 1145 m_frame->page()->chromeClient().setEventListenerProperties(WebEventListe
nerClass::TouchStartOrMove, WebEventListenerProperties::Nothing); | 1146 m_frame->page()->chromeClient().setEventListenerProperties(WebEventListe
nerClass::TouchStartOrMove, WebEventListenerProperties::Nothing); |
| 1146 m_frame->page()->chromeClient().setEventListenerProperties(WebEventListe
nerClass::MouseWheel, WebEventListenerProperties::Nothing); | 1147 m_frame->page()->chromeClient().setEventListenerProperties(WebEventListe
nerClass::MouseWheel, WebEventListenerProperties::Nothing); |
| 1147 m_frame->page()->chromeClient().setEventListenerProperties(WebEventListe
nerClass::TouchEndOrCancel, WebEventListenerProperties::Nothing); | 1148 m_frame->page()->chromeClient().setEventListenerProperties(WebEventListe
nerClass::TouchEndOrCancel, WebEventListenerProperties::Nothing); |
| 1148 } | 1149 } |
| 1149 | 1150 |
| 1150 client()->transitionToCommittedForNewPage(); | 1151 client()->transitionToCommittedForNewPage(); |
| 1151 m_frame->navigationScheduler().cancel(); | 1152 m_frame->navigationScheduler().cancel(); |
| 1152 m_frame->editor().clearLastEditCommand(); | 1153 m_frame->editor().clearLastEditCommand(); |
| 1153 | 1154 |
| 1154 // If we are still in the process of initializing an empty document then | 1155 // If we are still in the process of initializing an empty document then |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1624 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1625 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1625 return tracedValue; | 1626 return tracedValue; |
| 1626 } | 1627 } |
| 1627 | 1628 |
| 1628 inline void FrameLoader::takeObjectSnapshot() const | 1629 inline void FrameLoader::takeObjectSnapshot() const |
| 1629 { | 1630 { |
| 1630 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1631 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1631 } | 1632 } |
| 1632 | 1633 |
| 1633 } // namespace blink | 1634 } // namespace blink |
| OLD | NEW |