Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 17391004: Reland "Fix reload after back/forward navigation setting the wrong cache policy."" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With fix Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebKit/chromium/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 { 1163 {
1164 DocumentLoader* documentLoader = activeDocumentLoader(); 1164 DocumentLoader* documentLoader = activeDocumentLoader();
1165 if (!documentLoader) 1165 if (!documentLoader)
1166 return; 1166 return;
1167 1167
1168 if (m_state == FrameStateProvisional) 1168 if (m_state == FrameStateProvisional)
1169 insertDummyHistoryItem(); 1169 insertDummyHistoryItem();
1170 frame()->loader()->history()->saveDocumentAndScrollState(); 1170 frame()->loader()->history()->saveDocumentAndScrollState();
1171 1171
1172 ResourceRequest request = documentLoader->request(); 1172 ResourceRequest request = documentLoader->request();
1173 // FIXME: We need to reset cache policy to prevent it from being incorrectly propagted to the reload.
1174 // Do we need to propagate anything other than the url?
1175 request.setCachePolicy(UseProtocolCachePolicy);
1173 if (!overrideURL.isEmpty()) 1176 if (!overrideURL.isEmpty())
1174 request.setURL(overrideURL); 1177 request.setURL(overrideURL);
1175 else if (!documentLoader->unreachableURL().isEmpty()) 1178 else if (!documentLoader->unreachableURL().isEmpty())
1176 request.setURL(documentLoader->unreachableURL()); 1179 request.setURL(documentLoader->unreachableURL());
1177 1180
1178 FrameLoadType type = endToEndReload ? FrameLoadTypeReloadFromOrigin : FrameL oadTypeReload; 1181 FrameLoadType type = endToEndReload ? FrameLoadTypeReloadFromOrigin : FrameL oadTypeReload;
1179 NavigationAction action(request, type, request.httpMethod() == "POST"); 1182 NavigationAction action(request, type, request.httpMethod() == "POST");
1180 loadWithNavigationAction(request, action, type, 0, defaultSubstituteDataForU RL(request.url()), overrideEncoding); 1183 loadWithNavigationAction(request, action, type, 0, defaultSubstituteDataForU RL(request.url()), overrideEncoding);
1181 } 1184 }
1182 1185
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect); 2542 FloatRect newWindowRect = DOMWindow::adjustWindowRect(page, windowRect);
2540 2543
2541 page->chrome().setWindowRect(newWindowRect); 2544 page->chrome().setWindowRect(newWindowRect);
2542 page->chrome().show(); 2545 page->chrome().show();
2543 2546
2544 created = true; 2547 created = true;
2545 return frame; 2548 return frame;
2546 } 2549 }
2547 2550
2548 } // namespace WebCore 2551 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698