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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ASSERT(!cachedPage || cachedPage->document() == m_frame->document()); | 210 ASSERT(!cachedPage || cachedPage->document() == m_frame->document()); |
211 if (cachedPage && cachedPage->document() == m_frame->document()) { | 211 if (cachedPage && cachedPage->document() == m_frame->document()) { |
212 cachedPage->document()->setInPageCache(false); | 212 cachedPage->document()->setInPageCache(false); |
213 cachedPage->clear(); | 213 cachedPage->clear(); |
214 } | 214 } |
215 | 215 |
216 if (cachedPage) | 216 if (cachedPage) |
217 pageCache()->remove(currentItem()); | 217 pageCache()->remove(currentItem()); |
218 } | 218 } |
219 | 219 |
| 220 bool HistoryController::shouldStopLoadingForHistoryItem(HistoryItem* targetItem)
const |
| 221 { |
| 222 if (!m_currentItem) |
| 223 return false; |
| 224 |
| 225 // Don't abort the current load if we're navigating within the current docum
ent. |
| 226 if (m_currentItem->shouldDoSameDocumentNavigationTo(targetItem)) |
| 227 return false; |
| 228 |
| 229 return m_frame->loader()->client()->shouldStopLoadingForHistoryItem(targetIt
em); |
| 230 } |
| 231 |
220 // Main funnel for navigating to a previous location (back/forward, non-search s
nap-back) | 232 // Main funnel for navigating to a previous location (back/forward, non-search s
nap-back) |
221 // This includes recursion to handle loading into framesets properly | 233 // This includes recursion to handle loading into framesets properly |
222 void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type) | 234 void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type) |
223 { | 235 { |
224 ASSERT(!m_frame->tree()->parent()); | 236 ASSERT(!m_frame->tree()->parent()); |
225 | 237 |
226 // shouldGoToHistoryItem is a private delegate method. This is needed to fix
: | 238 // shouldGoToHistoryItem is a private delegate method. This is needed to fix
: |
227 // <rdar://problem/3951283> can view pages from the back/forward cache that
should be disallowed by Parental Controls | 239 // <rdar://problem/3951283> can view pages from the back/forward cache that
should be disallowed by Parental Controls |
228 // Ultimately, history item navigations should go through the policy delegat
e. That's covered in: | 240 // Ultimately, history item navigations should go through the policy delegat
e. That's covered in: |
229 // <rdar://problem/3979539> back/forward cache navigations should consult po
licy delegate | 241 // <rdar://problem/3979539> back/forward cache navigations should consult po
licy delegate |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 if (!m_currentItem) | 805 if (!m_currentItem) |
794 return; | 806 return; |
795 | 807 |
796 if (!urlString.isEmpty()) | 808 if (!urlString.isEmpty()) |
797 m_currentItem->setURLString(urlString); | 809 m_currentItem->setURLString(urlString); |
798 m_currentItem->setTitle(title); | 810 m_currentItem->setTitle(title); |
799 m_currentItem->setStateObject(stateObject); | 811 m_currentItem->setStateObject(stateObject); |
800 } | 812 } |
801 | 813 |
802 } // namespace WebCore | 814 } // namespace WebCore |
OLD | NEW |