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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 555 |
556 void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume
ntNavigationSource sameDocumentNavigationSource, PassRefPtr<SerializedScriptValu
e> data, FrameLoadType type) | 556 void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume
ntNavigationSource sameDocumentNavigationSource, PassRefPtr<SerializedScriptValu
e> data, FrameLoadType type) |
557 { | 557 { |
558 // Update the data source's request with the new URL to fake the URL change | 558 // Update the data source's request with the new URL to fake the URL change |
559 m_frame->document()->setURL(newURL); | 559 m_frame->document()->setURL(newURL); |
560 documentLoader()->setReplacesCurrentHistoryItem(type != FrameLoadTypeStandar
d); | 560 documentLoader()->setReplacesCurrentHistoryItem(type != FrameLoadTypeStandar
d); |
561 documentLoader()->updateForSameDocumentNavigation(newURL, sameDocumentNaviga
tionSource); | 561 documentLoader()->updateForSameDocumentNavigation(newURL, sameDocumentNaviga
tionSource); |
562 | 562 |
563 // Generate start and stop notifications only when loader is completed so th
at we | 563 // Generate start and stop notifications only when loader is completed so th
at we |
564 // don't fire them for fragment redirection that happens in window.onload ha
ndler. | 564 // don't fire them for fragment redirection that happens in window.onload ha
ndler. |
565 // See https://bugs.webkit.org/show_bug.cgi?id=31838 | 565 // See https://bugs.webkit.org/show_bug.cgi?id=31838 and crbug.com/464675 |
566 if (m_frame->document()->loadEventFinished()) | 566 if (m_frame->document()->shouldFireLoadingEvents()) |
567 client()->didStartLoading(NavigationWithinSameDocument); | 567 client()->didStartLoading(NavigationWithinSameDocument); |
568 | 568 |
569 HistoryCommitType historyCommitType = loadTypeToCommitType(type); | 569 HistoryCommitType historyCommitType = loadTypeToCommitType(type); |
570 if (!m_currentItem) | 570 if (!m_currentItem) |
571 historyCommitType = HistoryInertCommit; | 571 historyCommitType = HistoryInertCommit; |
572 | 572 |
573 setHistoryItemStateForCommit(historyCommitType, sameDocumentNavigationSource
== SameDocumentNavigationHistoryApi, data); | 573 setHistoryItemStateForCommit(historyCommitType, sameDocumentNavigationSource
== SameDocumentNavigationHistoryApi, data); |
574 client()->dispatchDidNavigateWithinPage(m_currentItem.get(), historyCommitTy
pe); | 574 client()->dispatchDidNavigateWithinPage(m_currentItem.get(), historyCommitTy
pe); |
575 client()->dispatchDidReceiveTitle(m_frame->document()->title()); | 575 client()->dispatchDidReceiveTitle(m_frame->document()->title()); |
576 if (m_frame->document()->loadEventFinished()) | 576 if (m_frame->document()->shouldFireLoadingEvents()) |
577 client()->didStopLoading(); | 577 client()->didStopLoading(); |
578 } | 578 } |
579 | 579 |
580 void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
tValue> stateObject, FrameLoadType type, ClientRedirectPolicy clientRedirect) | 580 void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
tValue> stateObject, FrameLoadType type, ClientRedirectPolicy clientRedirect) |
581 { | 581 { |
582 // If we have a state object, we cannot also be a new navigation. | 582 // If we have a state object, we cannot also be a new navigation. |
583 ASSERT(!stateObject || type == FrameLoadTypeBackForward); | 583 ASSERT(!stateObject || type == FrameLoadTypeBackForward); |
584 | 584 |
585 // If we have a provisional request for a different document, a fragment scr
oll should cancel it. | 585 // If we have a provisional request for a different document, a fragment scr
oll should cancel it. |
586 if (m_provisionalDocumentLoader) { | 586 if (m_provisionalDocumentLoader) { |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 | 1409 |
1410 // FIXME: We need a way to propagate insecure content policy flags to | 1410 // 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. | 1411 // out-of-process frames. For now, we'll always use default behavior. |
1412 if (!parentFrame->isLocalFrame()) | 1412 if (!parentFrame->isLocalFrame()) |
1413 return SecurityContext::InsecureContentDoNotUpgrade; | 1413 return SecurityContext::InsecureContentDoNotUpgrade; |
1414 | 1414 |
1415 return toLocalFrame(parentFrame)->document()->insecureContentPolicy(); | 1415 return toLocalFrame(parentFrame)->document()->insecureContentPolicy(); |
1416 } | 1416 } |
1417 | 1417 |
1418 } // namespace blink | 1418 } // namespace blink |
OLD | NEW |