| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 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 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 differentDocumentLoads.set(m_page->mainFrame(), m_provisionalEntry->root
()); | 165 differentDocumentLoads.set(m_page->mainFrame(), m_provisionalEntry->root
()); |
| 166 | 166 |
| 167 if (sameDocumentLoads.isEmpty() && differentDocumentLoads.isEmpty()) | 167 if (sameDocumentLoads.isEmpty() && differentDocumentLoads.isEmpty()) |
| 168 sameDocumentLoads.set(m_page->mainFrame(), m_provisionalEntry->root()); | 168 sameDocumentLoads.set(m_page->mainFrame(), m_provisionalEntry->root()); |
| 169 | 169 |
| 170 if (differentDocumentLoads.isEmpty()) { | 170 if (differentDocumentLoads.isEmpty()) { |
| 171 m_previousEntry = m_currentEntry.release(); | 171 m_previousEntry = m_currentEntry.release(); |
| 172 m_currentEntry = m_provisionalEntry.release(); | 172 m_currentEntry = m_provisionalEntry.release(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 for (HistoryFrameLoadSet::iterator it = sameDocumentLoads.begin(); it != sam
eDocumentLoads.end(); ++it) | 175 for (HistoryFrameLoadSet::iterator it = sameDocumentLoads.begin(); it != sam
eDocumentLoads.end(); ++it) { |
| 176 it->key->loader().loadHistoryItem(it->value, HistorySameDocumentLoad, ca
chePolicy); | 176 if (it->key->host()) |
| 177 for (HistoryFrameLoadSet::iterator it = differentDocumentLoads.begin(); it !
= differentDocumentLoads.end(); ++it) | 177 it->key->loader().loadHistoryItem(it->value, HistorySameDocumentLoad
, cachePolicy); |
| 178 it->key->loader().loadHistoryItem(it->value, HistoryDifferentDocumentLoa
d, cachePolicy); | 178 } |
| 179 for (HistoryFrameLoadSet::iterator it = differentDocumentLoads.begin(); it !
= differentDocumentLoads.end(); ++it) { |
| 180 if (it->key->host()) |
| 181 it->key->loader().loadHistoryItem(it->value, HistoryDifferentDocumen
tLoad, cachePolicy); |
| 182 } |
| 179 } | 183 } |
| 180 | 184 |
| 181 void HistoryController::recursiveGoToEntry(Frame* frame, HistoryFrameLoadSet& sa
meDocumentLoads, HistoryFrameLoadSet& differentDocumentLoads) | 185 void HistoryController::recursiveGoToEntry(Frame* frame, HistoryFrameLoadSet& sa
meDocumentLoads, HistoryFrameLoadSet& differentDocumentLoads) |
| 182 { | 186 { |
| 183 ASSERT(m_provisionalEntry); | 187 ASSERT(m_provisionalEntry); |
| 184 ASSERT(m_currentEntry); | 188 ASSERT(m_currentEntry); |
| 185 HistoryItem* newItem = m_provisionalEntry->itemForFrame(frame); | 189 HistoryItem* newItem = m_provisionalEntry->itemForFrame(frame); |
| 186 HistoryItem* oldItem = m_currentEntry->itemForFrame(frame); | 190 HistoryItem* oldItem = m_currentEntry->itemForFrame(frame); |
| 187 if (!newItem) | 191 if (!newItem) |
| 188 return; | 192 return; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } else { | 317 } else { |
| 314 HistoryItem* oldItem = m_currentEntry->itemForFrame(targetFrame); | 318 HistoryItem* oldItem = m_currentEntry->itemForFrame(targetFrame); |
| 315 if (!clipAtTarget && oldItem) | 319 if (!clipAtTarget && oldItem) |
| 316 newItem->setDocumentSequenceNumber(oldItem->documentSequenceNumber()
); | 320 newItem->setDocumentSequenceNumber(oldItem->documentSequenceNumber()
); |
| 317 m_previousEntry = m_currentEntry.release(); | 321 m_previousEntry = m_currentEntry.release(); |
| 318 m_currentEntry = m_previousEntry->cloneAndReplace(newItem.get(), clipAtT
arget, targetFrame, m_page); | 322 m_currentEntry = m_previousEntry->cloneAndReplace(newItem.get(), clipAtT
arget, targetFrame, m_page); |
| 319 } | 323 } |
| 320 } | 324 } |
| 321 | 325 |
| 322 } // namespace WebCore | 326 } // namespace WebCore |
| OLD | NEW |