OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1335 if (m_frame->document()) { | 1335 if (m_frame->document()) { |
1336 RefPtr<SecurityOrigin> securityOrigin = | 1336 RefPtr<SecurityOrigin> securityOrigin = |
1337 SecurityOrigin::create(m_provisionalDocumentLoader->getRequest().url()); | 1337 SecurityOrigin::create(m_provisionalDocumentLoader->getRequest().url()); |
1338 m_provisionalDocumentLoader->timing().setHasSameOriginAsPreviousDocument( | 1338 m_provisionalDocumentLoader->timing().setHasSameOriginAsPreviousDocument( |
1339 securityOrigin->canRequest(m_frame->document()->url())); | 1339 securityOrigin->canRequest(m_frame->document()->url())); |
1340 } | 1340 } |
1341 | 1341 |
1342 if (!prepareForCommit()) | 1342 if (!prepareForCommit()) |
1343 return; | 1343 return; |
1344 | 1344 |
1345 if (isLoadingMainFrame()) { | 1345 // If we are loading the mainframe, or a frame that is a local root, it is |
1346 // important to explicitly set the event listenener properties to Nothing as | |
1347 // this triggers notificatins to the client. | |
dcheng
2017/01/18 00:13:03
Nit: elaborate on what sort of notifications to th
wjmaclean
2017/01/18 14:01:23
Done.
| |
1348 if (m_frame->isLocalRoot()) { | |
1346 m_frame->page()->chromeClient().setEventListenerProperties( | 1349 m_frame->page()->chromeClient().setEventListenerProperties( |
1347 WebEventListenerClass::TouchStartOrMove, | 1350 m_frame, WebEventListenerClass::TouchStartOrMove, |
1348 WebEventListenerProperties::Nothing); | 1351 WebEventListenerProperties::Nothing); |
1349 m_frame->page()->chromeClient().setEventListenerProperties( | 1352 m_frame->page()->chromeClient().setEventListenerProperties( |
1350 WebEventListenerClass::MouseWheel, WebEventListenerProperties::Nothing); | 1353 m_frame, WebEventListenerClass::MouseWheel, |
1354 WebEventListenerProperties::Nothing); | |
1351 m_frame->page()->chromeClient().setEventListenerProperties( | 1355 m_frame->page()->chromeClient().setEventListenerProperties( |
1352 WebEventListenerClass::TouchEndOrCancel, | 1356 m_frame, WebEventListenerClass::TouchEndOrCancel, |
1353 WebEventListenerProperties::Nothing); | 1357 WebEventListenerProperties::Nothing); |
1354 } | 1358 } |
1355 | 1359 |
1356 client()->transitionToCommittedForNewPage(); | 1360 client()->transitionToCommittedForNewPage(); |
1357 m_frame->navigationScheduler().cancel(); | 1361 m_frame->navigationScheduler().cancel(); |
1358 m_frame->editor().clearLastEditCommand(); | 1362 m_frame->editor().clearLastEditCommand(); |
1359 | 1363 |
1360 // If we are still in the process of initializing an empty document then its | 1364 // If we are still in the process of initializing an empty document then its |
1361 // frame is not in a consistent state for rendering, so avoid | 1365 // frame is not in a consistent state for rendering, so avoid |
1362 // setJSStatusBarText since it may cause clients to attempt to render the | 1366 // setJSStatusBarText since it may cause clients to attempt to render the |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1905 m_documentLoader ? m_documentLoader->url() : String()); | 1909 m_documentLoader ? m_documentLoader->url() : String()); |
1906 return tracedValue; | 1910 return tracedValue; |
1907 } | 1911 } |
1908 | 1912 |
1909 inline void FrameLoader::takeObjectSnapshot() const { | 1913 inline void FrameLoader::takeObjectSnapshot() const { |
1910 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1914 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1911 toTracedValue()); | 1915 toTracedValue()); |
1912 } | 1916 } |
1913 | 1917 |
1914 } // namespace blink | 1918 } // namespace blink |
OLD | NEW |