Bug 26650 - Add methods to HistoryItem to support Chromium
Summary: Add methods to HistoryItem to support Chromium
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
Depends on:
Reported: 2009-06-23 09:44 PDT by Darin Fisher (:fishd, Google)
Modified: 2009-06-23 22:01 PDT (History)
0 users

See Also:

v1 patch (2.37 KB, patch)
2009-06-23 09:49 PDT, Darin Fisher (:fishd, Google)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2009-06-23 09:44:17 PDT
Add methods to HistoryItem to support Chromium

Chromium serializes HistoryItems to store in the browser's session history.  To accomplish this requires being able to read the fields of HistoryItem and then later reconstruct a HistoryItem given the same information.

The related code would be a lot cleaner if HistoryItem had setFormData and setFormContentType methods.  Otherwise, it is necessary to create a dummy ResourceRequest in order to call setFormInfoFromRequest.

We also need a way to clear the children of a HistoryItem.  That can be done in a hacky fashion by const_cast'ing the const HistoryItemVector& returned from the children() getter, but I think that is a bad idea and should be replaced with a clearChildren method ;-)
Comment 1 Darin Fisher (:fishd, Google) 2009-06-23 09:49:02 PDT
Created attachment 31722 [details]
v1 patch
Comment 2 Darin Adler 2009-06-23 10:17:52 PDT
Comment on attachment 31722 [details]
v1 patch

These changes seem OK.

I think our future direction is to move history management out of WebKit.

Comment 3 Darin Fisher (:fishd, Google) 2009-06-23 22:01:49 PDT
Landed as http://trac.webkit.org/changeset/44994