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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 // Don't ask if we are loading an empty URL. | 388 // Don't ask if we are loading an empty URL. |
389 if (request.url().isEmpty()) | 389 if (request.url().isEmpty()) |
390 return true; | 390 return true; |
391 | 391 |
392 // We are always willing to show alternate content for unreachable URLs. | 392 // We are always willing to show alternate content for unreachable URLs. |
393 if (m_substituteData.isValid() && !m_substituteData.failingURL().isEmpty()) | 393 if (m_substituteData.isValid() && !m_substituteData.failingURL().isEmpty()) |
394 return true; | 394 return true; |
395 | 395 |
396 // If we're loading content into a subframe, check against the parent's Cont
ent Security Policy | 396 // If we're loading content into a subframe, check against the parent's Cont
ent Security Policy |
397 // and kill the load if that check fails. | 397 // and kill the load if that check fails. |
398 if (m_frame->ownerElement() && !m_frame->ownerElement()->document()->content
SecurityPolicy()->allowChildFrameFromSource(request.url())) | 398 if (m_frame->ownerElement() && !m_frame->ownerElement()->document().contentS
ecurityPolicy()->allowChildFrameFromSource(request.url())) |
399 return false; | 399 return false; |
400 | 400 |
401 NavigationPolicy policy = NavigationPolicyCurrentTab; | 401 NavigationPolicy policy = NavigationPolicyCurrentTab; |
402 m_triggeringAction.specifiesNavigationPolicy(&policy); | 402 m_triggeringAction.specifiesNavigationPolicy(&policy); |
403 if (policyCheckLoadType != PolicyCheckFragment) | 403 if (policyCheckLoadType != PolicyCheckFragment) |
404 policy = frameLoader()->client()->decidePolicyForNavigation(request, thi
s, policy); | 404 policy = frameLoader()->client()->decidePolicyForNavigation(request, thi
s, policy); |
405 if (policy == NavigationPolicyCurrentTab) | 405 if (policy == NavigationPolicyCurrentTab) |
406 return true; | 406 return true; |
407 if (policy == NavigationPolicyIgnore) | 407 if (policy == NavigationPolicyIgnore) |
408 return false; | 408 return false; |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) | 1009 void DocumentLoader::replaceDocument(const String& source, Document* ownerDocume
nt) |
1010 { | 1010 { |
1011 m_frame->loader()->stopAllLoaders(); | 1011 m_frame->loader()->stopAllLoaders(); |
1012 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); | 1012 m_writer = createWriterFor(m_frame, ownerDocument, m_frame->document()->url(
), mimeType(), m_writer ? m_writer->encoding() : "", m_writer ? m_writer->encod
ingWasChosenByUser() : false, true); |
1013 if (!source.isNull()) | 1013 if (!source.isNull()) |
1014 m_writer->appendReplacingData(source); | 1014 m_writer->appendReplacingData(source); |
1015 endWriting(m_writer.get()); | 1015 endWriting(m_writer.get()); |
1016 } | 1016 } |
1017 | 1017 |
1018 } // namespace WebCore | 1018 } // namespace WebCore |
OLD | NEW |