| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 | 763 |
| 764 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url) | 764 void FrameLoader::reportLocalLoadFailed(LocalFrame* frame, const String& url) |
| 765 { | 765 { |
| 766 ASSERT(!url.isEmpty()); | 766 ASSERT(!url.isEmpty()); |
| 767 if (!frame) | 767 if (!frame) |
| 768 return; | 768 return; |
| 769 | 769 |
| 770 frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLeve
l, "Not allowed to load local resource: " + url); | 770 frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLeve
l, "Not allowed to load local resource: " + url); |
| 771 } | 771 } |
| 772 | 772 |
| 773 static ResourceRequest requestFromHistoryItem(HistoryItem* item, ResourceRequest
CachePolicy cachePolicy) | 773 // static |
| 774 ResourceRequest FrameLoader::requestFromHistoryItem(HistoryItem* item, ResourceR
equestCachePolicy cachePolicy) |
| 774 { | 775 { |
| 775 RefPtr<FormData> formData = item->formData(); | 776 RefPtr<FormData> formData = item->formData(); |
| 776 ResourceRequest request(item->url(), item->referrer()); | 777 ResourceRequest request(item->url(), item->referrer()); |
| 777 request.setCachePolicy(cachePolicy); | 778 request.setCachePolicy(cachePolicy); |
| 778 if (formData) { | 779 if (formData) { |
| 779 request.setHTTPMethod("POST"); | 780 request.setHTTPMethod("POST"); |
| 780 request.setHTTPBody(formData); | 781 request.setHTTPBody(formData); |
| 781 request.setHTTPContentType(item->formContentType()); | 782 request.setHTTPContentType(item->formContentType()); |
| 782 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString
(item->referrer().referrer); | 783 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::createFromString
(item->referrer().referrer); |
| 783 request.addHTTPOriginIfNeeded(securityOrigin->toAtomicString()); | 784 request.addHTTPOriginIfNeeded(securityOrigin->toAtomicString()); |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1447 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1448 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
| 1448 Frame* parentFrame = m_frame->tree().parent(); | 1449 Frame* parentFrame = m_frame->tree().parent(); |
| 1449 if (parentFrame && parentFrame->isLocalFrame()) | 1450 if (parentFrame && parentFrame->isLocalFrame()) |
| 1450 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1451 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
| 1451 if (FrameOwner* frameOwner = m_frame->owner()) | 1452 if (FrameOwner* frameOwner = m_frame->owner()) |
| 1452 flags |= frameOwner->sandboxFlags(); | 1453 flags |= frameOwner->sandboxFlags(); |
| 1453 return flags; | 1454 return flags; |
| 1454 } | 1455 } |
| 1455 | 1456 |
| 1456 } // namespace WebCore | 1457 } // namespace WebCore |
| OLD | NEW |