Revert "Remove outdated code and comment"

This reverts commit f48770ee5a.

The changes broke back history returned
This commit is contained in:
Tobias Taschner
2020-01-16 19:39:40 +01:00
parent 9f6beb00c2
commit e211e14ace

View File

@@ -403,12 +403,21 @@ void wxWebViewEdge::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewEdge::GetBackwardHistory()
{
return m_impl->m_historyList;
wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
//As we don't have std::copy or an iterator constructor in the wxwidgets
//native vector we construct it by hand
for (int i = 0; i < m_impl->m_historyPosition; i++)
{
backhist.push_back(m_impl->m_historyList[i]);
}
return backhist;
}
wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewEdge::GetForwardHistory()
{
wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
//As we don't have std::copy or an iterator constructor in the wxwidgets
//native vector we construct it by hand
for (int i = m_impl->m_historyPosition + 1; i < static_cast<int>(m_impl->m_historyList.size()); i++)
{
forwardhist.push_back(m_impl->m_historyList[i]);