OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
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 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * | 8 * |
9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 if (m_frame->view()) | 1075 if (m_frame->view()) |
1076 m_frame->view()->maintainScrollPositionAtAnchor(0); | 1076 m_frame->view()->maintainScrollPositionAtAnchor(0); |
1077 } | 1077 } |
1078 | 1078 |
1079 void FrameLoader::started() | 1079 void FrameLoader::started() |
1080 { | 1080 { |
1081 for (Frame* frame = m_frame; frame; frame = frame->tree()->parent()) | 1081 for (Frame* frame = m_frame; frame; frame = frame->tree()->parent()) |
1082 frame->loader()->m_isComplete = false; | 1082 frame->loader()->m_isComplete = false; |
1083 } | 1083 } |
1084 | 1084 |
| 1085 void FrameLoader::prepareForHistoryNavigation() |
| 1086 { |
| 1087 // If there is no currentItem, but we still want to engage in |
| 1088 // history navigation we need to manufacture one, and update |
| 1089 // the state machine of this frame to impersonate having |
| 1090 // loaded it. |
| 1091 RefPtr<HistoryItem> currentItem = history()->currentItem(); |
| 1092 if (!currentItem) { |
| 1093 currentItem = HistoryItem::create(); |
| 1094 currentItem->setLastVisitWasFailure(true); |
| 1095 history()->setCurrentItem(currentItem.get()); |
| 1096 frame()->page()->backForward()->setCurrentItem(currentItem.get()); |
| 1097 |
| 1098 ASSERT(stateMachine()->isDisplayingInitialEmptyDocument()); |
| 1099 stateMachine()->advanceTo(FrameLoaderStateMachine::DisplayingInitialEmpt
yDocumentPostCommit); |
| 1100 stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoa
d); |
| 1101 } |
| 1102 } |
| 1103 |
1085 void FrameLoader::prepareForLoadStart() | 1104 void FrameLoader::prepareForLoadStart() |
1086 { | 1105 { |
1087 if (Page* page = m_frame->page()) | 1106 if (Page* page = m_frame->page()) |
1088 page->progress()->progressStarted(m_frame); | 1107 page->progress()->progressStarted(m_frame); |
1089 m_client->dispatchDidStartProvisionalLoad(); | 1108 m_client->dispatchDidStartProvisionalLoad(); |
1090 } | 1109 } |
1091 | 1110 |
1092 void FrameLoader::setupForReplace() | 1111 void FrameLoader::setupForReplace() |
1093 { | 1112 { |
1094 setState(FrameStateProvisional); | 1113 setState(FrameStateProvisional); |
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3284 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); | 3303 windowRect.setHeight(features.height + (windowRect.height() - pageSize.h
eight())); |
3285 page->chrome()->setWindowRect(windowRect); | 3304 page->chrome()->setWindowRect(windowRect); |
3286 | 3305 |
3287 page->chrome()->show(); | 3306 page->chrome()->show(); |
3288 | 3307 |
3289 created = true; | 3308 created = true; |
3290 return frame; | 3309 return frame; |
3291 } | 3310 } |
3292 | 3311 |
3293 } // namespace WebCore | 3312 } // namespace WebCore |
OLD | NEW |