| 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 frame()->document()->addConsoleMessage(consoleMessage.release()); | 462 frame()->document()->addConsoleMessage(consoleMessage.release()); |
| 463 | 463 |
| 464 cancelLoadAfterXFrameOptionsOrCSPDenied(response); | 464 cancelLoadAfterXFrameOptionsOrCSPDenied(response); |
| 465 return; | 465 return; |
| 466 } | 466 } |
| 467 } | 467 } |
| 468 | 468 |
| 469 m_contentSecurityPolicy = ContentSecurityPolicy::create(); | 469 m_contentSecurityPolicy = ContentSecurityPolicy::create(); |
| 470 m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); | 470 m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); |
| 471 m_contentSecurityPolicy->didReceiveHeaders(ContentSecurityPolicyResponseHead
ers(response)); | 471 m_contentSecurityPolicy->didReceiveHeaders(ContentSecurityPolicyResponseHead
ers(response)); |
| 472 if (!m_contentSecurityPolicy->allowAncestors(m_frame)) { | 472 if (!m_contentSecurityPolicy->allowAncestors(m_frame, response.url())) { |
| 473 cancelLoadAfterXFrameOptionsOrCSPDenied(response); | 473 cancelLoadAfterXFrameOptionsOrCSPDenied(response); |
| 474 return; | 474 return; |
| 475 } | 475 } |
| 476 | 476 |
| 477 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); | 477 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); |
| 478 | 478 |
| 479 m_response = response; | 479 m_response = response; |
| 480 | 480 |
| 481 if (isArchiveMIMEType(m_response.mimeType()) && m_mainResource->dataBufferin
gPolicy() != BufferData) | 481 if (isArchiveMIMEType(m_response.mimeType()) && m_mainResource->dataBufferin
gPolicy() != BufferData) |
| 482 m_mainResource->setDataBufferingPolicy(BufferData); | 482 m_mainResource->setDataBufferingPolicy(BufferData); |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 829 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 830 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 830 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 831 { | 831 { |
| 832 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); | 832 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true); |
| 833 if (!source.isNull()) | 833 if (!source.isNull()) |
| 834 m_writer->appendReplacingData(source); | 834 m_writer->appendReplacingData(source); |
| 835 endWriting(m_writer.get()); | 835 endWriting(m_writer.get()); |
| 836 } | 836 } |
| 837 | 837 |
| 838 } // namespace blink | 838 } // namespace blink |
| OLD | NEW |