| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 const ResourceRequest& DocumentLoader::request() const | 124 const ResourceRequest& DocumentLoader::request() const |
| 125 { | 125 { |
| 126 return m_request; | 126 return m_request; |
| 127 } | 127 } |
| 128 | 128 |
| 129 const KURL& DocumentLoader::url() const | 129 const KURL& DocumentLoader::url() const |
| 130 { | 130 { |
| 131 return m_request.url(); | 131 return m_request.url(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL) | 134 void DocumentLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDoc
umentNavigationSource sameDocumentNavigationSource) |
| 135 { | 135 { |
| 136 KURL oldURL = m_request.url(); | 136 KURL oldURL = m_request.url(); |
| 137 m_originalRequest.setURL(newURL); | 137 m_originalRequest.setURL(newURL); |
| 138 m_request.setURL(newURL); | 138 m_request.setURL(newURL); |
| 139 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { |
| 140 m_request.setHTTPMethod("GET"); |
| 141 m_request.setHTTPBody(nullptr); |
| 142 } |
| 139 clearRedirectChain(); | 143 clearRedirectChain(); |
| 140 if (m_isClientRedirect) | 144 if (m_isClientRedirect) |
| 141 appendRedirect(oldURL); | 145 appendRedirect(oldURL); |
| 142 appendRedirect(newURL); | 146 appendRedirect(newURL); |
| 143 } | 147 } |
| 144 | 148 |
| 145 const KURL& DocumentLoader::urlForHistory() const | 149 const KURL& DocumentLoader::urlForHistory() const |
| 146 { | 150 { |
| 147 return unreachableURL().isEmpty() ? url() : unreachableURL(); | 151 return unreachableURL().isEmpty() ? url() : unreachableURL(); |
| 148 } | 152 } |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 821 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
| 818 { | 822 { |
| 819 m_frame->loader().stopAllLoaders(); | 823 m_frame->loader().stopAllLoaders(); |
| 820 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); | 824 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); |
| 821 if (!source.isNull()) | 825 if (!source.isNull()) |
| 822 m_writer->appendReplacingData(source); | 826 m_writer->appendReplacingData(source); |
| 823 endWriting(m_writer.get()); | 827 endWriting(m_writer.get()); |
| 824 } | 828 } |
| 825 | 829 |
| 826 } // namespace WebCore | 830 } // namespace WebCore |
| OLD | NEW |