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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 | 947 |
948 void FrameLoader::commitProvisionalLoad() | 948 void FrameLoader::commitProvisionalLoad() |
949 { | 949 { |
950 ASSERT(client()->hasWebView()); | 950 ASSERT(client()->hasWebView()); |
951 RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader; | 951 RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader; |
952 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); | 952 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); |
953 | 953 |
954 // Check if the destination page is allowed to access the previous page's ti
ming information. | 954 // Check if the destination page is allowed to access the previous page's ti
ming information. |
955 if (m_frame->document()) { | 955 if (m_frame->document()) { |
956 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(pdl->requ
est().url()); | 956 RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(pdl->requ
est().url()); |
957 pdl->timing()->setHasSameOriginAsPreviousDocument(securityOrigin->canReq
uest(m_frame->document()->url())); | 957 pdl->timing().setHasSameOriginAsPreviousDocument(securityOrigin->canRequ
est(m_frame->document()->url())); |
958 } | 958 } |
959 | 959 |
960 // The call to dispatchUnloadEvent() can execute arbitrary JavaScript. | 960 // The call to dispatchUnloadEvent() can execute arbitrary JavaScript. |
961 // If the script initiates a new load, we need to abandon the current load, | 961 // If the script initiates a new load, we need to abandon the current load, |
962 // or the two will stomp each other. | 962 // or the two will stomp each other. |
963 // detachChildren will similarly trigger child frame unload event handlers. | 963 // detachChildren will similarly trigger child frame unload event handlers. |
964 if (m_documentLoader) { | 964 if (m_documentLoader) { |
965 client()->dispatchWillClose(); | 965 client()->dispatchWillClose(); |
966 dispatchUnloadEvent(); | 966 dispatchUnloadEvent(); |
967 } | 967 } |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 | 1412 |
1413 // FIXME: We need a way to propagate insecure content policy flags to | 1413 // FIXME: We need a way to propagate insecure content policy flags to |
1414 // out-of-process frames. For now, we'll always use default behavior. | 1414 // out-of-process frames. For now, we'll always use default behavior. |
1415 if (!parentFrame->isLocalFrame()) | 1415 if (!parentFrame->isLocalFrame()) |
1416 return SecurityContext::InsecureContentDoNotUpgrade; | 1416 return SecurityContext::InsecureContentDoNotUpgrade; |
1417 | 1417 |
1418 return toLocalFrame(parentFrame)->document()->insecureContentPolicy(); | 1418 return toLocalFrame(parentFrame)->document()->insecureContentPolicy(); |
1419 } | 1419 } |
1420 | 1420 |
1421 } // namespace blink | 1421 } // namespace blink |
OLD | NEW |