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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 using namespace HTMLNames; | 108 using namespace HTMLNames; |
109 | 109 |
110 bool isBackForwardLoadType(FrameLoadType type) { | 110 bool isBackForwardLoadType(FrameLoadType type) { |
111 return type == FrameLoadTypeBackForward || | 111 return type == FrameLoadTypeBackForward || |
112 type == FrameLoadTypeInitialHistoryLoad; | 112 type == FrameLoadTypeInitialHistoryLoad; |
113 } | 113 } |
114 | 114 |
115 bool isReloadLoadType(FrameLoadType type) { | 115 bool isReloadLoadType(FrameLoadType type) { |
116 return type == FrameLoadTypeReload || | 116 return type == FrameLoadTypeReload || |
117 type == FrameLoadTypeReloadMainResource || | |
118 type == FrameLoadTypeReloadBypassingCache; | 117 type == FrameLoadTypeReloadBypassingCache; |
119 } | 118 } |
120 | 119 |
121 static bool needsHistoryItemRestore(FrameLoadType type) { | 120 static bool needsHistoryItemRestore(FrameLoadType type) { |
122 // FrameLoadtypeInitialHistoryLoad is intentionally excluded. | 121 // FrameLoadtypeInitialHistoryLoad is intentionally excluded. |
123 return type == FrameLoadTypeBackForward || isReloadLoadType(type); | 122 return type == FrameLoadTypeBackForward || isReloadLoadType(type); |
124 } | 123 } |
125 | 124 |
126 static void checkForLegacyProtocolInSubresource( | 125 static void checkForLegacyProtocolInSubresource( |
127 const ResourceRequest& resourceRequest, | 126 const ResourceRequest& resourceRequest, |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 // was created, then the navigation must be done with replacement enabled." | 844 // was created, then the navigation must be done with replacement enabled." |
846 if (request.replacesCurrentItem() || | 845 if (request.replacesCurrentItem() || |
847 (!m_stateMachine.committedMultipleRealLoads() && | 846 (!m_stateMachine.committedMultipleRealLoads() && |
848 equalIgnoringCase(m_frame->document()->url(), blankURL()))) | 847 equalIgnoringCase(m_frame->document()->url(), blankURL()))) |
849 return FrameLoadTypeReplaceCurrentItem; | 848 return FrameLoadTypeReplaceCurrentItem; |
850 | 849 |
851 if (request.resourceRequest().url() == m_documentLoader->urlForHistory()) { | 850 if (request.resourceRequest().url() == m_documentLoader->urlForHistory()) { |
852 if (request.resourceRequest().httpMethod() == HTTPNames::POST) | 851 if (request.resourceRequest().httpMethod() == HTTPNames::POST) |
853 return FrameLoadTypeStandard; | 852 return FrameLoadTypeStandard; |
854 if (!request.originDocument()) | 853 if (!request.originDocument()) |
855 return FrameLoadTypeReloadMainResource; | 854 return FrameLoadTypeReload; |
856 return FrameLoadTypeReplaceCurrentItem; | 855 return FrameLoadTypeReplaceCurrentItem; |
857 } | 856 } |
858 | 857 |
859 if (request.substituteData().failingURL() == | 858 if (request.substituteData().failingURL() == |
860 m_documentLoader->urlForHistory() && | 859 m_documentLoader->urlForHistory() && |
861 m_documentLoader->loadType() == FrameLoadTypeReload) | 860 m_documentLoader->loadType() == FrameLoadTypeReload) |
862 return FrameLoadTypeReload; | 861 return FrameLoadTypeReload; |
863 | 862 |
864 if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && | 863 if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && |
865 request.originDocument() && | 864 request.originDocument() && |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 frameLoadRequest.clientRedirect()); | 1901 frameLoadRequest.clientRedirect()); |
1903 | 1902 |
1904 loader->setLoadType(loadType); | 1903 loader->setLoadType(loadType); |
1905 loader->setNavigationType(navigationType); | 1904 loader->setNavigationType(navigationType); |
1906 loader->setReplacesCurrentHistoryItem(loadType == | 1905 loader->setReplacesCurrentHistoryItem(loadType == |
1907 FrameLoadTypeReplaceCurrentItem); | 1906 FrameLoadTypeReplaceCurrentItem); |
1908 return loader; | 1907 return loader; |
1909 } | 1908 } |
1910 | 1909 |
1911 } // namespace blink | 1910 } // namespace blink |
OLD | NEW |