| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 if (m_inStopAllLoaders) | 761 if (m_inStopAllLoaders) |
| 762 return; | 762 return; |
| 763 | 763 |
| 764 FrameLoadRequest request(passedRequest); | 764 FrameLoadRequest request(passedRequest); |
| 765 request.resourceRequest().setHasUserGesture(UserGestureIndicator::processing
UserGesture()); | 765 request.resourceRequest().setHasUserGesture(UserGestureIndicator::processing
UserGesture()); |
| 766 | 766 |
| 767 if (!prepareRequestForThisFrame(request)) | 767 if (!prepareRequestForThisFrame(request)) |
| 768 return; | 768 return; |
| 769 | 769 |
| 770 RefPtrWillBeRawPtr<LocalFrame> targetFrame = toLocalFrame(request.formState(
) ? nullptr : m_frame->findFrameForNavigation(AtomicString(request.frameName()),
*m_frame)); | 770 RefPtrWillBeRawPtr<LocalFrame> targetFrame = toLocalFrame(request.formState(
) ? nullptr : m_frame->findFrameForNavigation(AtomicString(request.frameName()),
*m_frame)); |
| 771 if (targetFrame && !m_frame->canNavigate(*targetFrame)) |
| 772 return; |
| 771 if (targetFrame && targetFrame.get() != m_frame) { | 773 if (targetFrame && targetFrame.get() != m_frame) { |
| 772 request.setFrameName("_self"); | 774 request.setFrameName("_self"); |
| 773 targetFrame->loader().load(request); | 775 targetFrame->loader().load(request); |
| 774 if (Page* page = targetFrame->page()) | 776 if (Page* page = targetFrame->page()) |
| 775 page->chrome().focus(); | 777 page->chrome().focus(); |
| 776 return; | 778 return; |
| 777 } | 779 } |
| 778 | 780 |
| 779 setReferrerForFrameRequest(request.resourceRequest(), request.shouldSendRefe
rrer(), request.originDocument()); | 781 setReferrerForFrameRequest(request.resourceRequest(), request.shouldSendRefe
rrer(), request.originDocument()); |
| 780 | 782 |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 | 1411 |
| 1410 // FIXME: We need a way to propagate insecure content policy flags to | 1412 // FIXME: We need a way to propagate insecure content policy flags to |
| 1411 // out-of-process frames. For now, we'll always use default behavior. | 1413 // out-of-process frames. For now, we'll always use default behavior. |
| 1412 if (!parentFrame->isLocalFrame()) | 1414 if (!parentFrame->isLocalFrame()) |
| 1413 return SecurityContext::InsecureContentDoNotUpgrade; | 1415 return SecurityContext::InsecureContentDoNotUpgrade; |
| 1414 | 1416 |
| 1415 return toLocalFrame(parentFrame)->document()->insecureContentPolicy(); | 1417 return toLocalFrame(parentFrame)->document()->insecureContentPolicy(); |
| 1416 } | 1418 } |
| 1417 | 1419 |
| 1418 } // namespace blink | 1420 } // namespace blink |
| OLD | NEW |