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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 } | 750 } |
751 | 751 |
752 FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques
t) | 752 FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques
t) |
753 { | 753 { |
754 if (m_frame->tree().parent() && !m_stateMachine.committedFirstRealDocumentLo
ad()) | 754 if (m_frame->tree().parent() && !m_stateMachine.committedFirstRealDocumentLo
ad()) |
755 return FrameLoadTypeInitialInChildFrame; | 755 return FrameLoadTypeInitialInChildFrame; |
756 if (!m_frame->tree().parent() && !client()->backForwardLength()) | 756 if (!m_frame->tree().parent() && !client()->backForwardLength()) |
757 return FrameLoadTypeStandard; | 757 return FrameLoadTypeStandard; |
758 if (m_provisionalDocumentLoader && request.substituteData().failingURL() ==
m_provisionalDocumentLoader->url() && m_loadType == FrameLoadTypeBackForward) | 758 if (m_provisionalDocumentLoader && request.substituteData().failingURL() ==
m_provisionalDocumentLoader->url() && m_loadType == FrameLoadTypeBackForward) |
759 return FrameLoadTypeBackForward; | 759 return FrameLoadTypeBackForward; |
760 if (request.resourceRequest().cachePolicy() == ReloadIgnoringCacheData) | 760 if (request.resourceRequest().getCachePolicy() == ReloadIgnoringCacheData) |
761 return FrameLoadTypeReload; | 761 return FrameLoadTypeReload; |
762 if (request.resourceRequest().cachePolicy() == ReloadBypassingCache) | 762 if (request.resourceRequest().getCachePolicy() == ReloadBypassingCache) |
763 return FrameLoadTypeReloadFromOrigin; | 763 return FrameLoadTypeReloadFromOrigin; |
764 // From the HTML5 spec for location.assign(): | 764 // From the HTML5 spec for location.assign(): |
765 // "If the browsing context's session history contains only one Document, | 765 // "If the browsing context's session history contains only one Document, |
766 // and that was the about:blank Document created when the browsing context | 766 // and that was the about:blank Document created when the browsing context |
767 // was created, then the navigation must be done with replacement enabled.
" | 767 // was created, then the navigation must be done with replacement enabled.
" |
768 if (request.replacesCurrentItem() | 768 if (request.replacesCurrentItem() |
769 || (!m_stateMachine.committedMultipleRealLoads() | 769 || (!m_stateMachine.committedMultipleRealLoads() |
770 && equalIgnoringCase(m_frame->document()->url(), blankURL()))) | 770 && equalIgnoringCase(m_frame->document()->url(), blankURL()))) |
771 return FrameLoadTypeReplaceCurrentItem; | 771 return FrameLoadTypeReplaceCurrentItem; |
772 | 772 |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1561 // FIXME: We need a way to propagate insecure requests policy flags to | 1561 // FIXME: We need a way to propagate insecure requests policy flags to |
1562 // out-of-process frames. For now, we'll always use default behavior. | 1562 // out-of-process frames. For now, we'll always use default behavior. |
1563 if (!parentFrame->isLocalFrame()) | 1563 if (!parentFrame->isLocalFrame()) |
1564 return nullptr; | 1564 return nullptr; |
1565 | 1565 |
1566 ASSERT(toLocalFrame(parentFrame)->document()); | 1566 ASSERT(toLocalFrame(parentFrame)->document()); |
1567 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1567 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1568 } | 1568 } |
1569 | 1569 |
1570 } // namespace blink | 1570 } // namespace blink |
OLD | NEW |