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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #include "core/loader/DocumentLoadTiming.h" | 64 #include "core/loader/DocumentLoadTiming.h" |
65 #include "core/loader/DocumentLoader.h" | 65 #include "core/loader/DocumentLoader.h" |
66 #include "core/loader/FormState.h" | 66 #include "core/loader/FormState.h" |
67 #include "core/loader/FormSubmission.h" | 67 #include "core/loader/FormSubmission.h" |
68 #include "core/loader/FrameFetchContext.h" | 68 #include "core/loader/FrameFetchContext.h" |
69 #include "core/loader/FrameLoadRequest.h" | 69 #include "core/loader/FrameLoadRequest.h" |
70 #include "core/loader/FrameLoaderClient.h" | 70 #include "core/loader/FrameLoaderClient.h" |
71 #include "core/loader/ProgressTracker.h" | 71 #include "core/loader/ProgressTracker.h" |
72 #include "core/loader/UniqueIdentifier.h" | 72 #include "core/loader/UniqueIdentifier.h" |
73 #include "core/loader/appcache/ApplicationCacheHost.h" | 73 #include "core/loader/appcache/ApplicationCacheHost.h" |
74 #include "core/page/BackForwardClient.h" | |
75 #include "core/page/Chrome.h" | 74 #include "core/page/Chrome.h" |
76 #include "core/page/ChromeClient.h" | 75 #include "core/page/ChromeClient.h" |
77 #include "core/page/CreateWindow.h" | 76 #include "core/page/CreateWindow.h" |
78 #include "core/page/EventHandler.h" | 77 #include "core/page/EventHandler.h" |
79 #include "core/page/FrameTree.h" | 78 #include "core/page/FrameTree.h" |
80 #include "core/page/Page.h" | 79 #include "core/page/Page.h" |
81 #include "core/page/WindowFeatures.h" | 80 #include "core/page/WindowFeatures.h" |
82 #include "core/page/scrolling/ScrollingCoordinator.h" | 81 #include "core/page/scrolling/ScrollingCoordinator.h" |
83 #include "core/xml/parser/XMLDocumentParser.h" | 82 #include "core/xml/parser/XMLDocumentParser.h" |
84 #include "platform/Logging.h" | 83 #include "platform/Logging.h" |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motiva
tion for this. | 645 // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motiva
tion for this. |
647 if (!m_frame->tree().parent() || UserGestureIndicator::processingUserGesture
()) | 646 if (!m_frame->tree().parent() || UserGestureIndicator::processingUserGesture
()) |
648 return false; | 647 return false; |
649 return request.formState() && request.formState()->formSubmissionTrigger() =
= SubmittedByJavaScript; | 648 return request.formState() && request.formState()->formSubmissionTrigger() =
= SubmittedByJavaScript; |
650 } | 649 } |
651 | 650 |
652 FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques
t) | 651 FrameLoadType FrameLoader::determineFrameLoadType(const FrameLoadRequest& reques
t) |
653 { | 652 { |
654 if (m_frame->tree().parent() && !m_stateMachine.committedFirstRealDocumentLo
ad()) | 653 if (m_frame->tree().parent() && !m_stateMachine.committedFirstRealDocumentLo
ad()) |
655 return FrameLoadTypeInitialInChildFrame; | 654 return FrameLoadTypeInitialInChildFrame; |
656 if (!m_frame->tree().parent() && !m_frame->page()->backForward().backForward
ListCount()) | 655 if (!m_frame->tree().parent() && !client()->backForwardLength()) |
657 return FrameLoadTypeStandard; | 656 return FrameLoadTypeStandard; |
658 if (m_provisionalDocumentLoader && request.substituteData().failingURL() ==
m_provisionalDocumentLoader->url() && m_loadType == FrameLoadTypeBackForward) | 657 if (m_provisionalDocumentLoader && request.substituteData().failingURL() ==
m_provisionalDocumentLoader->url() && m_loadType == FrameLoadTypeBackForward) |
659 return FrameLoadTypeBackForward; | 658 return FrameLoadTypeBackForward; |
660 if (request.resourceRequest().cachePolicy() == ReloadIgnoringCacheData) | 659 if (request.resourceRequest().cachePolicy() == ReloadIgnoringCacheData) |
661 return FrameLoadTypeReload; | 660 return FrameLoadTypeReload; |
662 if (request.resourceRequest().cachePolicy() == ReloadBypassingCache) | 661 if (request.resourceRequest().cachePolicy() == ReloadBypassingCache) |
663 return FrameLoadTypeReloadFromOrigin; | 662 return FrameLoadTypeReloadFromOrigin; |
664 if (request.lockBackForwardList() || isScriptTriggeredFormSubmissionInChildF
rame(request)) | 663 if (request.lockBackForwardList() || isScriptTriggeredFormSubmissionInChildF
rame(request)) |
665 return FrameLoadTypeRedirectWithLockedBackForwardList; | 664 return FrameLoadTypeRedirectWithLockedBackForwardList; |
666 if (!request.originDocument() && request.resourceRequest().url() == m_docume
ntLoader->urlForHistory()) | 665 if (!request.originDocument() && request.resourceRequest().url() == m_docume
ntLoader->urlForHistory()) |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1441 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
1443 Frame* parentFrame = m_frame->tree().parent(); | 1442 Frame* parentFrame = m_frame->tree().parent(); |
1444 if (parentFrame && parentFrame->isLocalFrame()) | 1443 if (parentFrame && parentFrame->isLocalFrame()) |
1445 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1444 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
1446 if (FrameOwner* frameOwner = m_frame->owner()) | 1445 if (FrameOwner* frameOwner = m_frame->owner()) |
1447 flags |= frameOwner->sandboxFlags(); | 1446 flags |= frameOwner->sandboxFlags(); |
1448 return flags; | 1447 return flags; |
1449 } | 1448 } |
1450 | 1449 |
1451 } // namespace blink | 1450 } // namespace blink |
OLD | NEW |