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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 historyNode->value()->clearChildren(); | 223 historyNode->value()->clearChildren(); |
224 } | 224 } |
225 goToEntry(newEntry.release(), cachePolicy); | 225 goToEntry(newEntry.release(), cachePolicy); |
226 } | 226 } |
227 | 227 |
228 void HistoryController::setDefersLoading(bool defer) | 228 void HistoryController::setDefersLoading(bool defer) |
229 { | 229 { |
230 m_defersLoading = defer; | 230 m_defersLoading = defer; |
231 if (!defer && m_deferredItem) { | 231 if (!defer && m_deferredItem) { |
232 goToItem(m_deferredItem.get(), m_deferredCachePolicy); | 232 goToItem(m_deferredItem.get(), m_deferredCachePolicy); |
233 m_deferredItem = 0; | 233 m_deferredItem = nullptr; |
234 m_deferredCachePolicy = UseProtocolCachePolicy; | 234 m_deferredCachePolicy = UseProtocolCachePolicy; |
235 } | 235 } |
236 } | 236 } |
237 | 237 |
238 void HistoryController::updateForInitialLoadInChildFrame(Frame* frame, HistoryIt
em* item) | 238 void HistoryController::updateForInitialLoadInChildFrame(Frame* frame, HistoryIt
em* item) |
239 { | 239 { |
240 ASSERT(frame->tree().parent()); | 240 ASSERT(frame->tree().parent()); |
241 if (!m_currentEntry) | 241 if (!m_currentEntry) |
242 return; | 242 return; |
243 if (HistoryNode* existingNode = m_currentEntry->historyNodeForFrame(frame)) | 243 if (HistoryNode* existingNode = m_currentEntry->historyNodeForFrame(frame)) |
(...skipping 27 matching lines...) Expand all Loading... |
271 RefPtr<HistoryItem> item = historyNode->value()->copy(); | 271 RefPtr<HistoryItem> item = historyNode->value()->copy(); |
272 const Vector<OwnPtr<HistoryNode> >& childEntries = historyNode->children(); | 272 const Vector<OwnPtr<HistoryNode> >& childEntries = historyNode->children(); |
273 for (size_t i = 0; i < childEntries.size(); i++) | 273 for (size_t i = 0; i < childEntries.size(); i++) |
274 item->addChildItem(itemForExport(childEntries[i].get())); | 274 item->addChildItem(itemForExport(childEntries[i].get())); |
275 return item; | 275 return item; |
276 } | 276 } |
277 | 277 |
278 PassRefPtr<HistoryItem> HistoryController::currentItemForExport() | 278 PassRefPtr<HistoryItem> HistoryController::currentItemForExport() |
279 { | 279 { |
280 if (!m_currentEntry) | 280 if (!m_currentEntry) |
281 return 0; | 281 return nullptr; |
282 return itemForExport(m_currentEntry->rootHistoryNode()); | 282 return itemForExport(m_currentEntry->rootHistoryNode()); |
283 } | 283 } |
284 | 284 |
285 PassRefPtr<HistoryItem> HistoryController::previousItemForExport() | 285 PassRefPtr<HistoryItem> HistoryController::previousItemForExport() |
286 { | 286 { |
287 if (!m_previousEntry) | 287 if (!m_previousEntry) |
288 return 0; | 288 return nullptr; |
289 return itemForExport(m_previousEntry->rootHistoryNode()); | 289 return itemForExport(m_previousEntry->rootHistoryNode()); |
290 } | 290 } |
291 | 291 |
292 HistoryItem* HistoryController::itemForNewChildFrame(Frame* frame) const | 292 HistoryItem* HistoryController::itemForNewChildFrame(Frame* frame) const |
293 { | 293 { |
294 return m_currentEntry ? m_currentEntry->itemForFrame(frame) : 0; | 294 return m_currentEntry ? m_currentEntry->itemForFrame(frame) : 0; |
295 } | 295 } |
296 | 296 |
297 void HistoryController::removeChildrenForRedirect(Frame* frame) | 297 void HistoryController::removeChildrenForRedirect(Frame* frame) |
298 { | 298 { |
(...skipping 11 matching lines...) Expand all Loading... |
310 } else { | 310 } else { |
311 HistoryItem* oldItem = m_currentEntry->itemForFrame(targetFrame); | 311 HistoryItem* oldItem = m_currentEntry->itemForFrame(targetFrame); |
312 if (!clipAtTarget && oldItem) | 312 if (!clipAtTarget && oldItem) |
313 newItem->setDocumentSequenceNumber(oldItem->documentSequenceNumber()
); | 313 newItem->setDocumentSequenceNumber(oldItem->documentSequenceNumber()
); |
314 m_previousEntry = m_currentEntry.release(); | 314 m_previousEntry = m_currentEntry.release(); |
315 m_currentEntry = m_previousEntry->cloneAndReplace(newItem.get(), clipAtT
arget, targetFrame, m_page); | 315 m_currentEntry = m_previousEntry->cloneAndReplace(newItem.get(), clipAtT
arget, targetFrame, m_page); |
316 } | 316 } |
317 } | 317 } |
318 | 318 |
319 } // namespace WebCore | 319 } // namespace WebCore |
OLD | NEW |