| 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 // See https://bugs.webkit.org/show_bug.cgi?id=31838 | 723 // See https://bugs.webkit.org/show_bug.cgi?id=31838 |
| 724 if (m_frame->document()->loadEventFinished()) | 724 if (m_frame->document()->loadEventFinished()) |
| 725 client()->didStartLoading(NavigationWithinSameDocument); | 725 client()->didStartLoading(NavigationWithinSameDocument); |
| 726 | 726 |
| 727 HistoryCommitType historyCommitType = loadTypeToCommitType(type); | 727 HistoryCommitType historyCommitType = loadTypeToCommitType(type); |
| 728 if (!m_currentItem) | 728 if (!m_currentItem) |
| 729 historyCommitType = HistoryInertCommit; | 729 historyCommitType = HistoryInertCommit; |
| 730 | 730 |
| 731 setHistoryItemStateForCommit(type, historyCommitType, sameDocumentNavigation
Source == SameDocumentNavigationHistoryApi ? HistoryNavigationType::HistoryApi :
HistoryNavigationType::Fragment); | 731 setHistoryItemStateForCommit(type, historyCommitType, sameDocumentNavigation
Source == SameDocumentNavigationHistoryApi ? HistoryNavigationType::HistoryApi :
HistoryNavigationType::Fragment); |
| 732 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { | 732 if (sameDocumentNavigationSource == SameDocumentNavigationHistoryApi) { |
| 733 m_currentItem->setStateObject(data); | 733 m_currentItem->setStateObject(std::move(data)); |
| 734 m_currentItem->setScrollRestorationType(scrollRestorationType); | 734 m_currentItem->setScrollRestorationType(scrollRestorationType); |
| 735 } | 735 } |
| 736 client()->dispatchDidNavigateWithinPage(m_currentItem.get(), historyCommitTy
pe, !!initiatingDocument); | 736 client()->dispatchDidNavigateWithinPage(m_currentItem.get(), historyCommitTy
pe, !!initiatingDocument); |
| 737 client()->dispatchDidReceiveTitle(m_frame->document()->title()); | 737 client()->dispatchDidReceiveTitle(m_frame->document()->title()); |
| 738 if (m_frame->document()->loadEventFinished()) | 738 if (m_frame->document()->loadEventFinished()) |
| 739 client()->didStopLoading(); | 739 client()->didStopLoading(); |
| 740 } | 740 } |
| 741 | 741 |
| 742 void FrameLoader::detachDocumentLoader(Member<DocumentLoader>& loader) | 742 void FrameLoader::detachDocumentLoader(Member<DocumentLoader>& loader) |
| 743 { | 743 { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 768 m_frame->eventHandler().stopAutoscroll(); | 768 m_frame->eventHandler().stopAutoscroll(); |
| 769 m_frame->localDOMWindow()->enqueueHashchangeEvent(oldURL, url); | 769 m_frame->localDOMWindow()->enqueueHashchangeEvent(oldURL, url); |
| 770 } | 770 } |
| 771 m_documentLoader->setIsClientRedirect(clientRedirect == ClientRedirectPolicy
::ClientRedirect); | 771 m_documentLoader->setIsClientRedirect(clientRedirect == ClientRedirectPolicy
::ClientRedirect); |
| 772 updateForSameDocumentNavigation(url, SameDocumentNavigationDefault, nullptr,
ScrollRestorationAuto, frameLoadType, initiatingDocument); | 772 updateForSameDocumentNavigation(url, SameDocumentNavigationDefault, nullptr,
ScrollRestorationAuto, frameLoadType, initiatingDocument); |
| 773 | 773 |
| 774 m_documentLoader->initialScrollState().wasScrolledByUser = false; | 774 m_documentLoader->initialScrollState().wasScrolledByUser = false; |
| 775 | 775 |
| 776 checkCompleted(); | 776 checkCompleted(); |
| 777 | 777 |
| 778 m_frame->localDOMWindow()->statePopped(stateObject ? stateObject : Serialize
dScriptValue::nullValue()); | 778 m_frame->localDOMWindow()->statePopped(stateObject ? std::move(stateObject)
: SerializedScriptValue::nullValue()); |
| 779 | 779 |
| 780 if (historyLoadType == HistorySameDocumentLoad) | 780 if (historyLoadType == HistorySameDocumentLoad) |
| 781 restoreScrollPositionAndViewState(); | 781 restoreScrollPositionAndViewState(); |
| 782 | 782 |
| 783 // We need to scroll to the fragment whether or not a hash change occurred,
since | 783 // We need to scroll to the fragment whether or not a hash change occurred,
since |
| 784 // the user might have scrolled since the previous navigation. | 784 // the user might have scrolled since the previous navigation. |
| 785 processFragment(url, NavigationWithinSameDocument); | 785 processFragment(url, NavigationWithinSameDocument); |
| 786 takeObjectSnapshot(); | 786 takeObjectSnapshot(); |
| 787 } | 787 } |
| 788 | 788 |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1616 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1617 return tracedValue; | 1617 return tracedValue; |
| 1618 } | 1618 } |
| 1619 | 1619 |
| 1620 inline void FrameLoader::takeObjectSnapshot() const | 1620 inline void FrameLoader::takeObjectSnapshot() const |
| 1621 { | 1621 { |
| 1622 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1622 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1623 } | 1623 } |
| 1624 | 1624 |
| 1625 } // namespace blink | 1625 } // namespace blink |
| OLD | NEW |