| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 } | 369 } |
| 370 timing()->addRedirect(redirectResponse.url(), newRequest.url()); | 370 timing()->addRedirect(redirectResponse.url(), newRequest.url()); |
| 371 } | 371 } |
| 372 | 372 |
| 373 // If we're fielding a redirect in response to a POST, force a load from ori
gin, since | 373 // If we're fielding a redirect in response to a POST, force a load from ori
gin, since |
| 374 // this is a common site technique to return to a page viewing some data tha
t the POST | 374 // this is a common site technique to return to a page viewing some data tha
t the POST |
| 375 // just modified. | 375 // just modified. |
| 376 if (newRequest.cachePolicy() == UseProtocolCachePolicy && isRedirectAfterPos
t(newRequest, redirectResponse)) | 376 if (newRequest.cachePolicy() == UseProtocolCachePolicy && isRedirectAfterPos
t(newRequest, redirectResponse)) |
| 377 newRequest.setCachePolicy(ReloadBypassingCache); | 377 newRequest.setCachePolicy(ReloadBypassingCache); |
| 378 | 378 |
| 379 // If this is a sub-frame, check for mixed content blocking against the pare
nt frame. |
| 380 if (Frame* parent = m_frame->tree().parent()) { |
| 381 if (parent->isLocalFrame() && !toLocalFrame(parent)->loader().mixedConte
ntChecker()->canFrameInsecureContent(toLocalFrame(parent)->document()->securityO
rigin(), newRequest.url())) { |
| 382 cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url(
))); |
| 383 return; |
| 384 } |
| 385 } |
| 386 |
| 379 m_request = newRequest; | 387 m_request = newRequest; |
| 380 | 388 |
| 381 if (redirectResponse.isNull()) | 389 if (redirectResponse.isNull()) |
| 382 return; | 390 return; |
| 383 | 391 |
| 384 appendRedirect(newRequest.url()); | 392 appendRedirect(newRequest.url()); |
| 385 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(
); | 393 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(
); |
| 386 if (!shouldContinueForNavigationPolicy(newRequest, CheckContentSecurityPolic
y)) | 394 if (!shouldContinueForNavigationPolicy(newRequest, CheckContentSecurityPolic
y)) |
| 387 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); | 395 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); |
| 388 } | 396 } |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 823 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 816 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 824 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 817 { | 825 { |
| 818 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); | 826 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); |
| 819 if (!source.isNull()) | 827 if (!source.isNull()) |
| 820 m_writer->appendReplacingData(source); | 828 m_writer->appendReplacingData(source); |
| 821 endWriting(m_writer.get()); | 829 endWriting(m_writer.get()); |
| 822 } | 830 } |
| 823 | 831 |
| 824 } // namespace blink | 832 } // namespace blink |
| OLD | NEW |