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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 frameLoader()->client()->loadURLExternally(request, policy); | 325 frameLoader()->client()->loadURLExternally(request, policy); |
326 return false; | 326 return false; |
327 } | 327 } |
328 | 328 |
329 void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque
st, const ResourceResponse& redirectResponse) | 329 void DocumentLoader::redirectReceived(Resource* resource, ResourceRequest& reque
st, const ResourceResponse& redirectResponse) |
330 { | 330 { |
331 ASSERT_UNUSED(resource, resource == m_mainResource); | 331 ASSERT_UNUSED(resource, resource == m_mainResource); |
332 willSendRequest(request, redirectResponse); | 332 willSendRequest(request, redirectResponse); |
333 } | 333 } |
334 | 334 |
| 335 void DocumentLoader::updateRequest(Resource* resource, const ResourceRequest& re
quest) |
| 336 { |
| 337 ASSERT_UNUSED(resource, resource == m_mainResource); |
| 338 m_request = request; |
| 339 } |
| 340 |
335 static bool isFormSubmission(NavigationType type) | 341 static bool isFormSubmission(NavigationType type) |
336 { | 342 { |
337 return type == NavigationTypeFormSubmitted || type == NavigationTypeFormResu
bmitted; | 343 return type == NavigationTypeFormSubmitted || type == NavigationTypeFormResu
bmitted; |
338 } | 344 } |
339 | 345 |
340 void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
Response& redirectResponse) | 346 void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
Response& redirectResponse) |
341 { | 347 { |
342 // Note that there are no asserts here as there are for the other callbacks.
This is due to the | 348 // Note that there are no asserts here as there are for the other callbacks.
This is due to the |
343 // fact that this "callback" is sent when starting every load, and the state
of callback | 349 // fact that this "callback" is sent when starting every load, and the state
of callback |
344 // deferrals plays less of a part in this function in preventing the bad beh
avior deferring | 350 // deferrals plays less of a part in this function in preventing the bad beh
avior deferring |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 864 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
859 { | 865 { |
860 m_frame->loader().stopAllLoaders(); | 866 m_frame->loader().stopAllLoaders(); |
861 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); | 867 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : emptyAtom, m_writer ? m_writer
->encodingWasChosenByUser() : false, true); |
862 if (!source.isNull()) | 868 if (!source.isNull()) |
863 m_writer->appendReplacingData(source); | 869 m_writer->appendReplacingData(source); |
864 endWriting(m_writer.get()); | 870 endWriting(m_writer.get()); |
865 } | 871 } |
866 | 872 |
867 } // namespace WebCore | 873 } // namespace WebCore |
OLD | NEW |