| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 | 326 |
| 327 // If the redirecting url is not allowed to display content from the target
origin, | 327 // If the redirecting url is not allowed to display content from the target
origin, |
| 328 // then block the redirect. | 328 // then block the redirect. |
| 329 const KURL& requestURL = m_request.url(); | 329 const KURL& requestURL = m_request.url(); |
| 330 RefPtr<SecurityOrigin> redirectingOrigin = SecurityOrigin::create(redirectRe
sponse.url()); | 330 RefPtr<SecurityOrigin> redirectingOrigin = SecurityOrigin::create(redirectRe
sponse.url()); |
| 331 if (!redirectingOrigin->canDisplay(requestURL)) { | 331 if (!redirectingOrigin->canDisplay(requestURL)) { |
| 332 FrameLoader::reportLocalLoadFailed(m_frame, requestURL.string()); | 332 FrameLoader::reportLocalLoadFailed(m_frame, requestURL.string()); |
| 333 cancelMainResourceLoad(ResourceError::cancelledError(requestURL)); | 333 cancelMainResourceLoad(ResourceError::cancelledError(requestURL)); |
| 334 return; | 334 return; |
| 335 } | 335 } |
| 336 if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteD
ata(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurre
ntTab, replacesCurrentHistoryItem(), isClientRedirect())) { | 336 if (!frameLoader()->shouldContinueForNavigationPolicy(m_request, SubstituteD
ata(), this, CheckContentSecurityPolicy, m_navigationType, NavigationPolicyCurre
ntTab, replacesCurrentHistoryItem(), isClientRedirect(), nullptr)) { |
| 337 cancelMainResourceLoad(ResourceError::cancelledError(requestURL)); | 337 cancelMainResourceLoad(ResourceError::cancelledError(requestURL)); |
| 338 return; | 338 return; |
| 339 } | 339 } |
| 340 | 340 |
| 341 ASSERT(timing().fetchStart()); | 341 ASSERT(timing().fetchStart()); |
| 342 timing().addRedirect(redirectResponse.url(), requestURL); | 342 timing().addRedirect(redirectResponse.url(), requestURL); |
| 343 appendRedirect(requestURL); | 343 appendRedirect(requestURL); |
| 344 frameLoader()->receivedMainResourceRedirect(requestURL); | 344 frameLoader()->receivedMainResourceRedirect(requestURL); |
| 345 } | 345 } |
| 346 | 346 |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 { | 765 { |
| 766 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 766 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 767 if (!source.isNull()) | 767 if (!source.isNull()) |
| 768 m_writer->appendReplacingData(source); | 768 m_writer->appendReplacingData(source); |
| 769 endWriting(m_writer.get()); | 769 endWriting(m_writer.get()); |
| 770 } | 770 } |
| 771 | 771 |
| 772 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 772 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 773 | 773 |
| 774 } // namespace blink | 774 } // namespace blink |
| OLD | NEW |