| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 PassRefPtr<HistoryItem> copy() const; | 52 PassRefPtr<HistoryItem> copy() const; |
| 53 | 53 |
| 54 // Resets the HistoryItem to its initial state, as returned by create(). | 54 // Resets the HistoryItem to its initial state, as returned by create(). |
| 55 void reset(); | 55 void reset(); |
| 56 | 56 |
| 57 const String& originalURLString() const; | 57 const String& originalURLString() const; |
| 58 const String& urlString() const; | 58 const String& urlString() const; |
| 59 KURL url() const; | 59 KURL url() const; |
| 60 KURL originalURL() const; | 60 KURL originalURL() const; |
| 61 | 61 |
| 62 const String& referrer() const; | 62 const AtomicString& referrer() const; |
| 63 const String& target() const; | 63 const String& target() const; |
| 64 | 64 |
| 65 FormData* formData(); | 65 FormData* formData(); |
| 66 String formContentType() const; | 66 const AtomicString& formContentType() const; |
| 67 | 67 |
| 68 const IntPoint& scrollPoint() const; | 68 const IntPoint& scrollPoint() const; |
| 69 void setScrollPoint(const IntPoint&); | 69 void setScrollPoint(const IntPoint&); |
| 70 void clearScrollPoint(); | 70 void clearScrollPoint(); |
| 71 | 71 |
| 72 float pageScaleFactor() const; | 72 float pageScaleFactor() const; |
| 73 void setPageScaleFactor(float); | 73 void setPageScaleFactor(float); |
| 74 | 74 |
| 75 const Vector<String>& documentState() const; | 75 const Vector<String>& documentState() const; |
| 76 void setDocumentState(const Vector<String>&); | 76 void setDocumentState(const Vector<String>&); |
| 77 void clearDocumentState(); | 77 void clearDocumentState(); |
| 78 | 78 |
| 79 void setURL(const KURL&); | 79 void setURL(const KURL&); |
| 80 void setURLString(const String&); | 80 void setURLString(const String&); |
| 81 void setOriginalURLString(const String&); | 81 void setOriginalURLString(const String&); |
| 82 void setReferrer(const String&); | 82 void setReferrer(const AtomicString&); |
| 83 void setTarget(const String&); | 83 void setTarget(const String&); |
| 84 | 84 |
| 85 void setStateObject(PassRefPtr<SerializedScriptValue> object); | 85 void setStateObject(PassRefPtr<SerializedScriptValue> object); |
| 86 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } | 86 SerializedScriptValue* stateObject() const { return m_stateObject.get(); } |
| 87 | 87 |
| 88 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } | 88 void setItemSequenceNumber(long long number) { m_itemSequenceNumber = number
; } |
| 89 long long itemSequenceNumber() const { return m_itemSequenceNumber; } | 89 long long itemSequenceNumber() const { return m_itemSequenceNumber; } |
| 90 | 90 |
| 91 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } | 91 void setDocumentSequenceNumber(long long number) { m_documentSequenceNumber
= number; } |
| 92 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} | 92 long long documentSequenceNumber() const { return m_documentSequenceNumber;
} |
| 93 | 93 |
| 94 void setTargetFrameID(int64_t id) { m_targetFrameID = id; } | 94 void setTargetFrameID(int64_t id) { m_targetFrameID = id; } |
| 95 int64_t targetFrameID() const { return m_targetFrameID; } | 95 int64_t targetFrameID() const { return m_targetFrameID; } |
| 96 | 96 |
| 97 void setFormInfoFromRequest(const ResourceRequest&); | 97 void setFormInfoFromRequest(const ResourceRequest&); |
| 98 void setFormData(PassRefPtr<FormData>); | 98 void setFormData(PassRefPtr<FormData>); |
| 99 void setFormContentType(const String&); | 99 void setFormContentType(const AtomicString&); |
| 100 | 100 |
| 101 void addChildItem(PassRefPtr<HistoryItem>); | 101 void addChildItem(PassRefPtr<HistoryItem>); |
| 102 const HistoryItemVector& children() const; | 102 const HistoryItemVector& children() const; |
| 103 void clearChildren(); | 103 void clearChildren(); |
| 104 | 104 |
| 105 bool isCurrentDocument(Document*) const; | 105 bool isCurrentDocument(Document*) const; |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 HistoryItem(); | 108 HistoryItem(); |
| 109 explicit HistoryItem(const HistoryItem&); | 109 explicit HistoryItem(const HistoryItem&); |
| 110 | 110 |
| 111 String m_urlString; | 111 String m_urlString; |
| 112 String m_originalURLString; | 112 String m_originalURLString; |
| 113 String m_referrer; | 113 AtomicString m_referrer; |
| 114 String m_target; | 114 String m_target; |
| 115 | 115 |
| 116 IntPoint m_scrollPoint; | 116 IntPoint m_scrollPoint; |
| 117 float m_pageScaleFactor; | 117 float m_pageScaleFactor; |
| 118 Vector<String> m_documentState; | 118 Vector<String> m_documentState; |
| 119 | 119 |
| 120 HistoryItemVector m_children; | 120 HistoryItemVector m_children; |
| 121 | 121 |
| 122 // If two HistoryItems have the same item sequence number, then they are | 122 // If two HistoryItems have the same item sequence number, then they are |
| 123 // clones of one another. Traversing history from one such HistoryItem to | 123 // clones of one another. Traversing history from one such HistoryItem to |
| 124 // another is a no-op. HistoryItem clones are created for parent and | 124 // another is a no-op. HistoryItem clones are created for parent and |
| 125 // sibling frames when only a subframe navigates. | 125 // sibling frames when only a subframe navigates. |
| 126 int64_t m_itemSequenceNumber; | 126 int64_t m_itemSequenceNumber; |
| 127 | 127 |
| 128 // If two HistoryItems have the same document sequence number, then they | 128 // If two HistoryItems have the same document sequence number, then they |
| 129 // refer to the same instance of a document. Traversing history from one | 129 // refer to the same instance of a document. Traversing history from one |
| 130 // such HistoryItem to another preserves the document. | 130 // such HistoryItem to another preserves the document. |
| 131 int64_t m_documentSequenceNumber; | 131 int64_t m_documentSequenceNumber; |
| 132 | 132 |
| 133 int64_t m_targetFrameID; | 133 int64_t m_targetFrameID; |
| 134 | 134 |
| 135 // Support for HTML5 History | 135 // Support for HTML5 History |
| 136 RefPtr<SerializedScriptValue> m_stateObject; | 136 RefPtr<SerializedScriptValue> m_stateObject; |
| 137 | 137 |
| 138 // info used to repost form data | 138 // info used to repost form data |
| 139 RefPtr<FormData> m_formData; | 139 RefPtr<FormData> m_formData; |
| 140 String m_formContentType; | 140 AtomicString m_formContentType; |
| 141 | 141 |
| 142 }; //class HistoryItem | 142 }; //class HistoryItem |
| 143 | 143 |
| 144 } //namespace WebCore | 144 } //namespace WebCore |
| 145 | 145 |
| 146 #endif // HISTORYITEM_H | 146 #endif // HISTORYITEM_H |
| OLD | NEW |