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

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

Issue 22982011: Reland "Fix form resubmissions happening silently." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/core/loader/DocumentLoader.cpp ('k') | Source/core/loader/NavigationAction.cpp » ('j') | 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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 ResourceRequest request(item->url()); 1641 ResourceRequest request(item->url());
1642 request.setHTTPReferrer(item->referrer()); 1642 request.setHTTPReferrer(item->referrer());
1643 if (formData) { 1643 if (formData) {
1644 request.setHTTPMethod("POST"); 1644 request.setHTTPMethod("POST");
1645 request.setHTTPBody(formData); 1645 request.setHTTPBody(formData);
1646 request.setHTTPContentType(item->formContentType()); 1646 request.setHTTPContentType(item->formContentType());
1647 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString (item->referrer()); 1647 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString (item->referrer());
1648 addHTTPOriginIfNeeded(request, securityOrigin->toString()); 1648 addHTTPOriginIfNeeded(request, securityOrigin->toString());
1649 } 1649 }
1650 1650
1651 loadWithNavigationAction(request, NavigationAction(request, FrameLoadTypeBac kForward, false), FrameLoadTypeBackForward, 0, SubstituteData()); 1651 loadWithNavigationAction(request, NavigationAction(request, FrameLoadTypeBac kForward, formData), FrameLoadTypeBackForward, 0, SubstituteData());
1652 } 1652 }
1653 1653
1654 void FrameLoader::insertDummyHistoryItem() 1654 void FrameLoader::insertDummyHistoryItem()
1655 { 1655 {
1656 RefPtr<HistoryItem> currentItem = HistoryItem::create(); 1656 RefPtr<HistoryItem> currentItem = HistoryItem::create();
1657 history()->setCurrentItem(currentItem.get()); 1657 history()->setCurrentItem(currentItem.get());
1658 frame()->page()->backForward().setCurrentItem(currentItem.get()); 1658 frame()->page()->backForward().setCurrentItem(currentItem.get());
1659 } 1659 }
1660 1660
1661 void FrameLoader::dispatchDocumentElementAvailable() 1661 void FrameLoader::dispatchDocumentElementAvailable()
(...skipping 29 matching lines...) Expand all
1691 { 1691 {
1692 SandboxFlags flags = m_forcedSandboxFlags; 1692 SandboxFlags flags = m_forcedSandboxFlags;
1693 if (Frame* parentFrame = m_frame->tree()->parent()) 1693 if (Frame* parentFrame = m_frame->tree()->parent())
1694 flags |= parentFrame->document()->sandboxFlags(); 1694 flags |= parentFrame->document()->sandboxFlags();
1695 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) 1695 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
1696 flags |= ownerElement->sandboxFlags(); 1696 flags |= ownerElement->sandboxFlags();
1697 return flags; 1697 return flags;
1698 } 1698 }
1699 1699
1700 } // namespace WebCore 1700 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.cpp ('k') | Source/core/loader/NavigationAction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698