| 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 if (frameLoader()->isLoadingMainFrame()) | 479 if (frameLoader()->isLoadingMainFrame()) |
| 480 newRequest.setFirstPartyForCookies(newRequest.url()); | 480 newRequest.setFirstPartyForCookies(newRequest.url()); |
| 481 | 481 |
| 482 // If we're fielding a redirect in response to a POST, force a load from ori
gin, since | 482 // If we're fielding a redirect in response to a POST, force a load from ori
gin, since |
| 483 // this is a common site technique to return to a page viewing some data tha
t the POST | 483 // this is a common site technique to return to a page viewing some data tha
t the POST |
| 484 // just modified. | 484 // just modified. |
| 485 // Also, POST requests always load from origin, but this does not affect sub
resources. | 485 // Also, POST requests always load from origin, but this does not affect sub
resources. |
| 486 if (newRequest.cachePolicy() == UseProtocolCachePolicy && isPostOrRedirectAf
terPost(newRequest, redirectResponse)) | 486 if (newRequest.cachePolicy() == UseProtocolCachePolicy && isPostOrRedirectAf
terPost(newRequest, redirectResponse)) |
| 487 newRequest.setCachePolicy(ReloadIgnoringCacheData); | 487 newRequest.setCachePolicy(ReloadIgnoringCacheData); |
| 488 | 488 |
| 489 Frame* top = m_frame->tree()->top(); | 489 Frame* parent = m_frame->tree()->parent(); |
| 490 if (top) { | 490 if (parent) { |
| 491 if (!top->loader()->mixedContentChecker()->canRunInsecureContent(top->do
cument()->securityOrigin(), newRequest.url())) { | 491 if (!parent->loader()->mixedContentChecker()->canRunInsecureContent(pare
nt->document()->securityOrigin(), newRequest.url())) { |
| 492 cancelMainResourceLoad(frameLoader()->cancelledError(newRequest)); | 492 cancelMainResourceLoad(frameLoader()->cancelledError(newRequest)); |
| 493 return; | 493 return; |
| 494 } | 494 } |
| 495 } | 495 } |
| 496 | 496 |
| 497 setRequest(newRequest); | 497 setRequest(newRequest); |
| 498 | 498 |
| 499 if (redirectResponse.isNull()) | 499 if (redirectResponse.isNull()) |
| 500 return; | 500 return; |
| 501 | 501 |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 1099 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
| 1100 { | 1100 { |
| 1101 m_frame->loader()->stopAllLoaders(); | 1101 m_frame->loader()->stopAllLoaders(); |
| 1102 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); | 1102 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); |
| 1103 if (!source.isNull()) | 1103 if (!source.isNull()) |
| 1104 m_writer->appendReplacingData(source); | 1104 m_writer->appendReplacingData(source); |
| 1105 endWriting(m_writer.get()); | 1105 endWriting(m_writer.get()); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 } // namespace WebCore | 1108 } // namespace WebCore |
| OLD | NEW |