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 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1336 if (m_frame->document()) { | 1336 if (m_frame->document()) { |
1337 RefPtr<SecurityOrigin> securityOrigin = | 1337 RefPtr<SecurityOrigin> securityOrigin = |
1338 SecurityOrigin::create(m_provisionalDocumentLoader->getRequest().url()); | 1338 SecurityOrigin::create(m_provisionalDocumentLoader->getRequest().url()); |
1339 m_provisionalDocumentLoader->timing().setHasSameOriginAsPreviousDocument( | 1339 m_provisionalDocumentLoader->timing().setHasSameOriginAsPreviousDocument( |
1340 securityOrigin->canRequest(m_frame->document()->url())); | 1340 securityOrigin->canRequest(m_frame->document()->url())); |
1341 } | 1341 } |
1342 | 1342 |
1343 if (!prepareForCommit()) | 1343 if (!prepareForCommit()) |
1344 return; | 1344 return; |
1345 | 1345 |
1346 if (isLoadingMainFrame()) { | 1346 // If we are loading the mainframe, or a frame that is a local root, it is |
1347 // important to explicitly set the event listenener properties to Nothing as | |
1348 // this triggers notificatins to the client. | |
1349 if ((isLoadingMainFrame() && m_frame->page()->mainFrame()->isLocalFrame()) || | |
dcheng
2017/01/16 11:05:40
This condition can be simplified into m_frame->isL
wjmaclean
2017/01/17 18:23:27
Done.
| |
1350 m_frame->isLocalRoot()) { | |
1347 m_frame->page()->chromeClient().setEventListenerProperties( | 1351 m_frame->page()->chromeClient().setEventListenerProperties( |
1348 WebEventListenerClass::TouchStartOrMove, | 1352 m_frame, WebEventListenerClass::TouchStartOrMove, |
1349 WebEventListenerProperties::Nothing); | 1353 WebEventListenerProperties::Nothing); |
1350 m_frame->page()->chromeClient().setEventListenerProperties( | 1354 m_frame->page()->chromeClient().setEventListenerProperties( |
1351 WebEventListenerClass::MouseWheel, WebEventListenerProperties::Nothing); | 1355 m_frame, WebEventListenerClass::MouseWheel, |
1356 WebEventListenerProperties::Nothing); | |
1352 m_frame->page()->chromeClient().setEventListenerProperties( | 1357 m_frame->page()->chromeClient().setEventListenerProperties( |
1353 WebEventListenerClass::TouchEndOrCancel, | 1358 m_frame, WebEventListenerClass::TouchEndOrCancel, |
1354 WebEventListenerProperties::Nothing); | 1359 WebEventListenerProperties::Nothing); |
1355 } | 1360 } |
1356 | 1361 |
1357 client()->transitionToCommittedForNewPage(); | 1362 client()->transitionToCommittedForNewPage(); |
1358 m_frame->navigationScheduler().cancel(); | 1363 m_frame->navigationScheduler().cancel(); |
1359 m_frame->editor().clearLastEditCommand(); | 1364 m_frame->editor().clearLastEditCommand(); |
1360 | 1365 |
1361 // If we are still in the process of initializing an empty document then its | 1366 // If we are still in the process of initializing an empty document then its |
1362 // frame is not in a consistent state for rendering, so avoid | 1367 // frame is not in a consistent state for rendering, so avoid |
1363 // setJSStatusBarText since it may cause clients to attempt to render the | 1368 // setJSStatusBarText since it may cause clients to attempt to render the |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1906 m_documentLoader ? m_documentLoader->url() : String()); | 1911 m_documentLoader ? m_documentLoader->url() : String()); |
1907 return tracedValue; | 1912 return tracedValue; |
1908 } | 1913 } |
1909 | 1914 |
1910 inline void FrameLoader::takeObjectSnapshot() const { | 1915 inline void FrameLoader::takeObjectSnapshot() const { |
1911 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1916 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1912 toTracedValue()); | 1917 toTracedValue()); |
1913 } | 1918 } |
1914 | 1919 |
1915 } // namespace blink | 1920 } // namespace blink |
OLD | NEW |