OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 frame_, WebEventListenerClass::kMouseWheel, | 1040 frame_, WebEventListenerClass::kMouseWheel, |
1041 WebEventListenerProperties::kNothing); | 1041 WebEventListenerProperties::kNothing); |
1042 frame_->GetPage()->GetChromeClient().SetEventListenerProperties( | 1042 frame_->GetPage()->GetChromeClient().SetEventListenerProperties( |
1043 frame_, WebEventListenerClass::kTouchEndOrCancel, | 1043 frame_, WebEventListenerClass::kTouchEndOrCancel, |
1044 WebEventListenerProperties::kNothing); | 1044 WebEventListenerProperties::kNothing); |
1045 } | 1045 } |
1046 | 1046 |
1047 Client()->TransitionToCommittedForNewPage(); | 1047 Client()->TransitionToCommittedForNewPage(); |
1048 | 1048 |
1049 frame_->GetNavigationScheduler().Cancel(); | 1049 frame_->GetNavigationScheduler().Cancel(); |
1050 | |
1051 // If we are still in the process of initializing an empty document then its | |
1052 // frame is not in a consistent state for rendering, so avoid | |
1053 // setJSStatusBarText since it may cause clients to attempt to render the | |
1054 // frame. | |
1055 if (!state_machine_.CreatingInitialEmptyDocument()) { | |
1056 LocalDOMWindow* window = frame_->DomWindow(); | |
1057 window->setStatus(String()); | |
1058 window->setDefaultStatus(String()); | |
1059 } | |
1060 } | 1050 } |
1061 | 1051 |
1062 bool FrameLoader::IsLoadingMainFrame() const { | 1052 bool FrameLoader::IsLoadingMainFrame() const { |
1063 return frame_->IsMainFrame(); | 1053 return frame_->IsMainFrame(); |
1064 } | 1054 } |
1065 | 1055 |
1066 void FrameLoader::RestoreScrollPositionAndViewState() { | 1056 void FrameLoader::RestoreScrollPositionAndViewState() { |
1067 if (!frame_->GetPage() || !GetDocumentLoader()) | 1057 if (!frame_->GetPage() || !GetDocumentLoader()) |
1068 return; | 1058 return; |
1069 RestoreScrollPositionAndViewStateForLoadType(GetDocumentLoader()->LoadType()); | 1059 RestoreScrollPositionAndViewStateForLoadType(GetDocumentLoader()->LoadType()); |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 // TODO(japhet): This is needed because the browser process DCHECKs if the | 1678 // TODO(japhet): This is needed because the browser process DCHECKs if the |
1689 // first entry we commit in a new frame has replacement set. It's unclear | 1679 // first entry we commit in a new frame has replacement set. It's unclear |
1690 // whether the DCHECK is right, investigate removing this special case. | 1680 // whether the DCHECK is right, investigate removing this special case. |
1691 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && | 1681 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && |
1692 (!Opener() || !request.Url().IsEmpty()); | 1682 (!Opener() || !request.Url().IsEmpty()); |
1693 loader->SetReplacesCurrentHistoryItem(replace_current_item); | 1683 loader->SetReplacesCurrentHistoryItem(replace_current_item); |
1694 return loader; | 1684 return loader; |
1695 } | 1685 } |
1696 | 1686 |
1697 } // namespace blink | 1687 } // namespace blink |
OLD | NEW |