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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 // handler. See https://bugs.webkit.org/show_bug.cgi?id=31838 | 809 // handler. See https://bugs.webkit.org/show_bug.cgi?id=31838 |
810 // Do not fire the notifications if the frame is concurrently navigating away | 810 // Do not fire the notifications if the frame is concurrently navigating away |
811 // from the document, since a new document is already loading. | 811 // from the document, since a new document is already loading. |
812 if (m_frame->document()->loadEventFinished() && !m_provisionalDocumentLoader) | 812 if (m_frame->document()->loadEventFinished() && !m_provisionalDocumentLoader) |
813 client()->didStartLoading(NavigationWithinSameDocument); | 813 client()->didStartLoading(NavigationWithinSameDocument); |
814 | 814 |
815 HistoryCommitType historyCommitType = loadTypeToCommitType(type); | 815 HistoryCommitType historyCommitType = loadTypeToCommitType(type); |
816 if (!m_currentItem) | 816 if (!m_currentItem) |
817 historyCommitType = HistoryInertCommit; | 817 historyCommitType = HistoryInertCommit; |
818 if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && | 818 if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && |
819 initiatingDocument && !initiatingDocument->hasReceivedUserGesture()) { | 819 initiatingDocument && |
| 820 !initiatingDocument->frame()->hasReceivedUserGesture()) { |
820 historyCommitType = HistoryInertCommit; | 821 historyCommitType = HistoryInertCommit; |
821 } | 822 } |
822 | 823 |
823 setHistoryItemStateForCommit( | 824 setHistoryItemStateForCommit( |
824 type, historyCommitType, | 825 type, historyCommitType, |
825 sameDocumentNavigationSource == SameDocumentNavigationHistoryApi | 826 sameDocumentNavigationSource == SameDocumentNavigationHistoryApi |
826 ? HistoryNavigationType::HistoryApi | 827 ? HistoryNavigationType::HistoryApi |
827 : HistoryNavigationType::Fragment); | 828 : HistoryNavigationType::Fragment); |
828 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { | 829 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { |
829 m_currentItem->setStateObject(std::move(data)); | 830 m_currentItem->setStateObject(std::move(data)); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 : FrameLoadTypeReplaceCurrentItem; | 956 : FrameLoadTypeReplaceCurrentItem; |
956 } | 957 } |
957 | 958 |
958 if (request.substituteData().failingURL() == | 959 if (request.substituteData().failingURL() == |
959 m_documentLoader->urlForHistory() && | 960 m_documentLoader->urlForHistory() && |
960 m_loadType == FrameLoadTypeReload) | 961 m_loadType == FrameLoadTypeReload) |
961 return FrameLoadTypeReload; | 962 return FrameLoadTypeReload; |
962 | 963 |
963 if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && | 964 if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && |
964 request.originDocument() && | 965 request.originDocument() && |
965 !request.originDocument()->hasReceivedUserGesture()) | 966 !request.originDocument()->frame()->hasReceivedUserGesture()) |
966 return FrameLoadTypeReplaceCurrentItem; | 967 return FrameLoadTypeReplaceCurrentItem; |
967 | 968 |
968 return FrameLoadTypeStandard; | 969 return FrameLoadTypeStandard; |
969 } | 970 } |
970 | 971 |
971 bool FrameLoader::prepareRequestForThisFrame(FrameLoadRequest& request) { | 972 bool FrameLoader::prepareRequestForThisFrame(FrameLoadRequest& request) { |
972 // If no origin Document* was specified, skip remaining security checks and | 973 // If no origin Document* was specified, skip remaining security checks and |
973 // assume the caller has fully initialized the FrameLoadRequest. | 974 // assume the caller has fully initialized the FrameLoadRequest. |
974 if (!request.originDocument()) | 975 if (!request.originDocument()) |
975 return true; | 976 return true; |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 m_documentLoader ? m_documentLoader->url() : String()); | 1897 m_documentLoader ? m_documentLoader->url() : String()); |
1897 return tracedValue; | 1898 return tracedValue; |
1898 } | 1899 } |
1899 | 1900 |
1900 inline void FrameLoader::takeObjectSnapshot() const { | 1901 inline void FrameLoader::takeObjectSnapshot() const { |
1901 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1902 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1902 toTracedValue()); | 1903 toTracedValue()); |
1903 } | 1904 } |
1904 | 1905 |
1905 } // namespace blink | 1906 } // namespace blink |
OLD | NEW |