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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 m_frame->editor()->clearUndoRedoOperations(); | 308 m_frame->editor()->clearUndoRedoOperations(); |
309 return true; | 309 return true; |
310 } | 310 } |
311 | 311 |
312 void FrameLoader::didExplicitOpen() | 312 void FrameLoader::didExplicitOpen() |
313 { | 313 { |
314 m_isComplete = false; | 314 m_isComplete = false; |
315 | 315 |
316 // Calling document.open counts as committing the first real document load. | 316 // Calling document.open counts as committing the first real document load. |
317 if (!m_stateMachine.committedFirstRealDocumentLoad()) | 317 if (!m_stateMachine.committedFirstRealDocumentLoad()) |
318 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpty
DocumentPostCommit); | 318 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad
); |
319 | 319 |
320 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing
away results | 320 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing
away results |
321 // from a subsequent window.document.open / window.document.write call. | 321 // from a subsequent window.document.open / window.document.write call. |
322 // Canceling redirection here works for all cases because document.open | 322 // Canceling redirection here works for all cases because document.open |
323 // implicitly precedes document.write. | 323 // implicitly precedes document.write. |
324 m_frame->navigationScheduler()->cancel(); | 324 m_frame->navigationScheduler()->cancel(); |
325 } | 325 } |
326 | 326 |
327 void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, boo
l clearFrameView) | 327 void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, boo
l clearFrameView) |
328 { | 328 { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 if (clearScriptObjects) | 360 if (clearScriptObjects) |
361 m_frame->script()->clearScriptObjects(); | 361 m_frame->script()->clearScriptObjects(); |
362 | 362 |
363 m_frame->script()->enableEval(); | 363 m_frame->script()->enableEval(); |
364 | 364 |
365 m_frame->navigationScheduler()->clear(); | 365 m_frame->navigationScheduler()->clear(); |
366 | 366 |
367 m_checkTimer.stop(); | 367 m_checkTimer.stop(); |
368 m_shouldCallCheckCompleted = false; | 368 m_shouldCallCheckCompleted = false; |
369 | 369 |
370 if (m_stateMachine.isDisplayingInitialEmptyDocument() && m_stateMachine.comm
ittedFirstRealDocumentLoad()) | 370 if (m_stateMachine.isDisplayingInitialEmptyDocument()) |
371 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad
); | 371 m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad
); |
372 } | 372 } |
373 | 373 |
374 void FrameLoader::receivedFirstData() | 374 void FrameLoader::receivedFirstData() |
375 { | 375 { |
376 if (m_stateMachine.creatingInitialEmptyDocument()) | 376 if (m_stateMachine.creatingInitialEmptyDocument()) |
377 return; | 377 return; |
378 m_client->dispatchDidCommitLoad(); | 378 m_client->dispatchDidCommitLoad(); |
379 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); | 379 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); |
380 m_frame->page()->didCommitLoad(m_frame); | 380 m_frame->page()->didCommitLoad(m_frame); |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 m_documentLoader->detachFromFrame(); | 983 m_documentLoader->detachFromFrame(); |
984 m_documentLoader = loaderBeingCommitted; | 984 m_documentLoader = loaderBeingCommitted; |
985 m_state = FrameStateCommittedPage; | 985 m_state = FrameStateCommittedPage; |
986 | 986 |
987 if (isLoadingMainFrame()) | 987 if (isLoadingMainFrame()) |
988 m_frame->page()->chrome().client().needTouchEvents(false); | 988 m_frame->page()->chrome().client().needTouchEvents(false); |
989 | 989 |
990 history()->updateForCommit(); | 990 history()->updateForCommit(); |
991 m_client->transitionToCommittedForNewPage(); | 991 m_client->transitionToCommittedForNewPage(); |
992 | 992 |
993 if (!m_stateMachine.creatingInitialEmptyDocument() && !m_stateMachine.commit
tedFirstRealDocumentLoad()) | |
994 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpty
DocumentPostCommit); | |
995 | |
996 m_frame->navigationScheduler()->cancel(); | 993 m_frame->navigationScheduler()->cancel(); |
997 m_frame->editor()->clearLastEditCommand(); | 994 m_frame->editor()->clearLastEditCommand(); |
998 | 995 |
999 // If we are still in the process of initializing an empty document then | 996 // If we are still in the process of initializing an empty document then |
1000 // its frame is not in a consistent state for rendering, so avoid setJSStatu
sBarText | 997 // its frame is not in a consistent state for rendering, so avoid setJSStatu
sBarText |
1001 // since it may cause clients to attempt to render the frame. | 998 // since it may cause clients to attempt to render the frame. |
1002 if (!m_stateMachine.creatingInitialEmptyDocument()) { | 999 if (!m_stateMachine.creatingInitialEmptyDocument()) { |
1003 DOMWindow* window = m_frame->domWindow(); | 1000 DOMWindow* window = m_frame->domWindow(); |
1004 window->setStatus(String()); | 1001 window->setStatus(String()); |
1005 window->setDefaultStatus(String()); | 1002 window->setDefaultStatus(String()); |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 { | 1793 { |
1797 SandboxFlags flags = m_forcedSandboxFlags; | 1794 SandboxFlags flags = m_forcedSandboxFlags; |
1798 if (Frame* parentFrame = m_frame->tree()->parent()) | 1795 if (Frame* parentFrame = m_frame->tree()->parent()) |
1799 flags |= parentFrame->document()->sandboxFlags(); | 1796 flags |= parentFrame->document()->sandboxFlags(); |
1800 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1797 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
1801 flags |= ownerElement->sandboxFlags(); | 1798 flags |= ownerElement->sandboxFlags(); |
1802 return flags; | 1799 return flags; |
1803 } | 1800 } |
1804 | 1801 |
1805 } // namespace WebCore | 1802 } // namespace WebCore |
OLD | NEW |