Bug 26650

Summary: Add methods to HistoryItem to support Chromium
Product: WebKit Reporter: Darin Fisher (:fishd, Google) <fishd>
Component: HistoryAssignee: Darin Fisher (:fishd, Google) <fishd>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
v1 patch darin: review+

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.

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