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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 if (!wasInSamePage && page) | 785 if (!wasInSamePage && page) |
786 page->chrome().focus(); | 786 page->chrome().focus(); |
787 return; | 787 return; |
788 } | 788 } |
789 | 789 |
790 setReferrerForFrameRequest(request.resourceRequest(), request.shouldSendRefe
rrer(), request.originDocument()); | 790 setReferrerForFrameRequest(request.resourceRequest(), request.shouldSendRefe
rrer(), request.originDocument()); |
791 | 791 |
792 FrameLoadType newLoadType = determineFrameLoadType(request); | 792 FrameLoadType newLoadType = determineFrameLoadType(request); |
793 NavigationPolicy policy = navigationPolicyForRequest(request); | 793 NavigationPolicy policy = navigationPolicyForRequest(request); |
794 if (shouldOpenInNewWindow(targetFrame.get(), request, policy)) { | 794 if (shouldOpenInNewWindow(targetFrame.get(), request, policy)) { |
795 if (policy == NavigationPolicyDownload) | 795 if (policy == NavigationPolicyDownload) { |
796 client()->loadURLExternally(request.resourceRequest(), NavigationPol
icyDownload); | 796 client()->loadURLExternally(request.resourceRequest(), NavigationPol
icyDownload); |
797 else | 797 } else { |
| 798 request.resourceRequest().setFrameType(WebURLRequest::FrameTypeAuxil
iary); |
798 createWindowForRequest(request, *m_frame, policy, request.shouldSend
Referrer()); | 799 createWindowForRequest(request, *m_frame, policy, request.shouldSend
Referrer()); |
| 800 } |
799 return; | 801 return; |
800 } | 802 } |
801 | 803 |
802 const KURL& url = request.resourceRequest().url(); | 804 const KURL& url = request.resourceRequest().url(); |
803 if (policy == NavigationPolicyCurrentTab && shouldPerformFragmentNavigation(
request.formState(), request.resourceRequest().httpMethod(), newLoadType, url))
{ | 805 if (policy == NavigationPolicyCurrentTab && shouldPerformFragmentNavigation(
request.formState(), request.resourceRequest().httpMethod(), newLoadType, url))
{ |
804 m_documentLoader->setNavigationType(determineNavigationType(newLoadType,
false, request.triggeringEvent())); | 806 m_documentLoader->setNavigationType(determineNavigationType(newLoadType,
false, request.triggeringEvent())); |
805 if (shouldTreatURLAsSameAsCurrent(url)) | 807 if (shouldTreatURLAsSameAsCurrent(url)) |
806 newLoadType = FrameLoadTypeRedirectWithLockedBackForwardList; | 808 newLoadType = FrameLoadTypeRedirectWithLockedBackForwardList; |
807 loadInSameDocument(url, nullptr, newLoadType, request.clientRedirect()); | 809 loadInSameDocument(url, nullptr, newLoadType, request.clientRedirect()); |
808 return; | 810 return; |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 // FIXME: We need a way to propagate insecure requests policy flags to | 1451 // FIXME: We need a way to propagate insecure requests policy flags to |
1450 // out-of-process frames. For now, we'll always use default behavior. | 1452 // out-of-process frames. For now, we'll always use default behavior. |
1451 if (!parentFrame->isLocalFrame()) | 1453 if (!parentFrame->isLocalFrame()) |
1452 return nullptr; | 1454 return nullptr; |
1453 | 1455 |
1454 ASSERT(toLocalFrame(parentFrame)->document()); | 1456 ASSERT(toLocalFrame(parentFrame)->document()); |
1455 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1457 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1456 } | 1458 } |
1457 | 1459 |
1458 } // namespace blink | 1460 } // namespace blink |
OLD | NEW |