void HistoryController::updateForCommit(LocalFrame* frame, HistoryItem* item, HistoryCommitType commitType, bool navigationWithinPage) { if (commitType == BackForwardCommit) { if (!m_provisionalEntry) return; // Once committed, we want to use current item for saving DocState, and // the provisional item for restoring state. // Note previousItem must be set before we close the URL, which will // happen when the data source is made non-provisional below m_previousEntry = m_currentEntry.release(); ASSERT(m_provisionalEntry); m_currentEntry = m_provisionalEntry.release(); } else if (commitType == StandardCommit) { createNewBackForwardItem(frame, item, !navigationWithinPage); } else if (commitType == InitialCommitInChildFrame) { updateForInitialLoadInChildFrame(frame, item); } }
void HistoryController::updateBackForwardListForFragmentScroll(Frame* frame, HistoryItem* item) { createNewBackForwardItem(frame, item, false); }