| 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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 // invocation for this frame. Leave the loader that is being committed in a
temporarily | 978 // invocation for this frame. Leave the loader that is being committed in a
temporarily |
| 979 // detached state, such that it can't be found and cancelled. | 979 // detached state, such that it can't be found and cancelled. |
| 980 RefPtr<DocumentLoader> loaderBeingCommitted = m_provisionalDocumentLoader.re
lease(); | 980 RefPtr<DocumentLoader> loaderBeingCommitted = m_provisionalDocumentLoader.re
lease(); |
| 981 detachChildren(); | 981 detachChildren(); |
| 982 if (m_documentLoader) | 982 if (m_documentLoader) |
| 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()) | 993 if (!m_stateMachine.creatingInitialEmptyDocument() && !m_stateMachine.commit
tedFirstRealDocumentLoad()) |
| 994 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpty
DocumentPostCommit); | 994 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpty
DocumentPostCommit); |
| 995 | 995 |
| 996 m_frame->navigationScheduler()->cancel(); | 996 m_frame->navigationScheduler()->cancel(); |
| 997 m_frame->editor()->clearLastEditCommand(); | 997 m_frame->editor()->clearLastEditCommand(); |
| 998 | 998 |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 if (navigationPolicy == NavigationPolicyDownload) { | 1528 if (navigationPolicy == NavigationPolicyDownload) { |
| 1529 m_client->loadURLExternally(action.resourceRequest(), navigationPolicy); | 1529 m_client->loadURLExternally(action.resourceRequest(), navigationPolicy); |
| 1530 return; | 1530 return; |
| 1531 } | 1531 } |
| 1532 | 1532 |
| 1533 RefPtr<Frame> frame = m_frame; | 1533 RefPtr<Frame> frame = m_frame; |
| 1534 RefPtr<Frame> mainFrame = m_frame; | 1534 RefPtr<Frame> mainFrame = m_frame; |
| 1535 | 1535 |
| 1536 if (!m_frame->settings() || m_frame->settings()->supportsMultipleWindows())
{ | 1536 if (!m_frame->settings() || m_frame->settings()->supportsMultipleWindows())
{ |
| 1537 struct WindowFeatures features; | 1537 struct WindowFeatures features; |
| 1538 Page* newPage = m_frame->page()->chrome().client()->createWindow(m_frame
, FrameLoadRequest(m_frame->document()->securityOrigin(), action.resourceRequest
()), | 1538 Page* newPage = m_frame->page()->chrome().client().createWindow(m_frame,
FrameLoadRequest(m_frame->document()->securityOrigin(), action.resourceRequest(
)), |
| 1539 features, navigationPolicy); | 1539 features, navigationPolicy); |
| 1540 | 1540 |
| 1541 // createWindow can return null (e.g., popup blocker denies the window). | 1541 // createWindow can return null (e.g., popup blocker denies the window). |
| 1542 if (!newPage) | 1542 if (!newPage) |
| 1543 return; | 1543 return; |
| 1544 mainFrame = newPage->mainFrame(); | 1544 mainFrame = newPage->mainFrame(); |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 if (frameName != "_blank") | 1547 if (frameName != "_blank") |
| 1548 mainFrame->tree()->setName(frameName); | 1548 mainFrame->tree()->setName(frameName); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 { | 1801 { |
| 1802 SandboxFlags flags = m_forcedSandboxFlags; | 1802 SandboxFlags flags = m_forcedSandboxFlags; |
| 1803 if (Frame* parentFrame = m_frame->tree()->parent()) | 1803 if (Frame* parentFrame = m_frame->tree()->parent()) |
| 1804 flags |= parentFrame->document()->sandboxFlags(); | 1804 flags |= parentFrame->document()->sandboxFlags(); |
| 1805 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1805 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1806 flags |= ownerElement->sandboxFlags(); | 1806 flags |= ownerElement->sandboxFlags(); |
| 1807 return flags; | 1807 return flags; |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 } // namespace WebCore | 1810 } // namespace WebCore |
| OLD | NEW |