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