diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-31 19:08:35 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-31 19:08:35 +0000 |
commit | 50b691cc2cfdbb3b39e05c6c1632d6e9276f52d1 (patch) | |
tree | 8ce30104490e98073bf78dbd71f8e88df3734174 /webkit/glue/webhistoryitem_impl.cc | |
parent | 11853ace9b087d6896e1bcd7cee161bed615b364 (diff) | |
download | chromium_src-50b691cc2cfdbb3b39e05c6c1632d6e9276f52d1.zip chromium_src-50b691cc2cfdbb3b39e05c6c1632d6e9276f52d1.tar.gz chromium_src-50b691cc2cfdbb3b39e05c6c1632d6e9276f52d1.tar.bz2 |
Part 2 of the CL to unfork our changes to FrameLoader.cpp to support the
window.history object. I've reverted our original changes and gone with a
different approach.
The idea is to fake the HistoryItem that FrameLoader asks for synchronously,
and give it a special URL that we can intercept later and do the back/forward
navigation.
BUG=3912
Review URL: http://codereview.chromium.org/8756
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4308 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webhistoryitem_impl.cc')
-rw-r--r-- | webkit/glue/webhistoryitem_impl.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/webkit/glue/webhistoryitem_impl.cc b/webkit/glue/webhistoryitem_impl.cc index 137086c..20bd956 100644 --- a/webkit/glue/webhistoryitem_impl.cc +++ b/webkit/glue/webhistoryitem_impl.cc @@ -27,6 +27,7 @@ #include "webkit/glue/webhistoryitem_impl.h" #include "webkit/glue/glue_serialize.h" +#include "webkit/glue/glue_util.h" #include "base/compiler_specific.h" @@ -72,7 +73,15 @@ WebCore::HistoryItem* WebHistoryItemImpl::GetHistoryItem() const { if (history_item_) return history_item_.get(); - history_item_ = webkit_glue::HistoryItemFromString(history_state_); + if (history_state_.size() > 0) { + history_item_ = webkit_glue::HistoryItemFromString(history_state_); + } else { + history_item_ = WebCore::HistoryItem::create( + webkit_glue::StdStringToString(url_.spec()), + webkit_glue::StdWStringToString(title_), + 0.0); + } + return history_item_.get(); } |