OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 // session history after a crash, we need to manufacture one otherwise WebKi
t | 888 // session history after a crash, we need to manufacture one otherwise WebKi
t |
889 // hoarks. This is probably the wrong thing to do, but it seems to work. | 889 // hoarks. This is probably the wrong thing to do, but it seems to work. |
890 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem(
); | 890 RefPtr<HistoryItem> currentItem = m_frame->loader()->history()->currentItem(
); |
891 if (!currentItem) { | 891 if (!currentItem) { |
892 currentItem = HistoryItem::create(); | 892 currentItem = HistoryItem::create(); |
893 currentItem->setLastVisitWasFailure(true); | 893 currentItem->setLastVisitWasFailure(true); |
894 m_frame->loader()->history()->setCurrentItem(currentItem.get()); | 894 m_frame->loader()->history()->setCurrentItem(currentItem.get()); |
895 m_frame->page()->backForward()->setCurrentItem(currentItem.get()); | 895 m_frame->page()->backForward()->setCurrentItem(currentItem.get()); |
896 } | 896 } |
897 | 897 |
898 m_frame->loader()->history()->goToItem( | 898 m_frame->page()->goToItem(historyItem.get(), |
899 historyItem.get(), FrameLoadTypeIndexedBackForward); | 899 FrameLoadTypeIndexedBackForward); |
900 } | 900 } |
901 | 901 |
902 void WebFrameImpl::loadData(const WebData& data, | 902 void WebFrameImpl::loadData(const WebData& data, |
903 const WebString& mimeType, | 903 const WebString& mimeType, |
904 const WebString& textEncoding, | 904 const WebString& textEncoding, |
905 const WebURL& baseURL, | 905 const WebURL& baseURL, |
906 const WebURL& unreachableURL, | 906 const WebURL& unreachableURL, |
907 bool replace) | 907 bool replace) |
908 { | 908 { |
909 SubstituteData substData(data, mimeType, textEncoding, unreachableURL); | 909 SubstituteData substData(data, mimeType, textEncoding, unreachableURL); |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2284 | 2284 |
2285 String scriptResult; | 2285 String scriptResult; |
2286 if (!result.getString(scriptResult)) | 2286 if (!result.getString(scriptResult)) |
2287 return; | 2287 return; |
2288 | 2288 |
2289 if (!m_frame->navigationScheduler()->locationChangePending()) | 2289 if (!m_frame->navigationScheduler()->locationChangePending()) |
2290 m_frame->loader()->writer()->replaceDocument(scriptResult); | 2290 m_frame->loader()->writer()->replaceDocument(scriptResult); |
2291 } | 2291 } |
2292 | 2292 |
2293 } // namespace WebKit | 2293 } // namespace WebKit |
OLD | NEW |