| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void HistoryItem::setStateObject(PassRefPtr<SerializedScriptValue> object) { | 136 void HistoryItem::setStateObject(PassRefPtr<SerializedScriptValue> object) { |
| 137 m_stateObject = object; | 137 m_stateObject = object; |
| 138 } | 138 } |
| 139 | 139 |
| 140 const AtomicString& HistoryItem::formContentType() const { | 140 const AtomicString& HistoryItem::formContentType() const { |
| 141 return m_formContentType; | 141 return m_formContentType; |
| 142 } | 142 } |
| 143 | 143 |
| 144 void HistoryItem::setFormInfoFromRequest(const ResourceRequest& request) { | 144 void HistoryItem::setFormInfoFromRequest(const ResourceRequest& request) { |
| 145 if (equalIgnoringCase(request.httpMethod(), "POST")) { | 145 if (equalIgnoringCase(request.httpMethod(), "POST")) { |
| 146 // FIXME: Eventually we have to make this smart enough to handle the case wh
ere | 146 // FIXME: Eventually we have to make this smart enough to handle the case |
| 147 // we have a stream for the body to handle the "data interspersed with files
" feature. | 147 // where we have a stream for the body to handle the "data interspersed with |
| 148 // files" feature. |
| 148 m_formData = request.httpBody(); | 149 m_formData = request.httpBody(); |
| 149 m_formContentType = request.httpContentType(); | 150 m_formContentType = request.httpContentType(); |
| 150 } else { | 151 } else { |
| 151 m_formData = nullptr; | 152 m_formData = nullptr; |
| 152 m_formContentType = nullAtom; | 153 m_formContentType = nullAtom; |
| 153 } | 154 } |
| 154 } | 155 } |
| 155 | 156 |
| 156 void HistoryItem::setFormData(PassRefPtr<EncodedFormData> formData) { | 157 void HistoryItem::setFormData(PassRefPtr<EncodedFormData> formData) { |
| 157 m_formData = formData; | 158 m_formData = formData; |
| 158 } | 159 } |
| 159 | 160 |
| 160 void HistoryItem::setFormContentType(const AtomicString& formContentType) { | 161 void HistoryItem::setFormContentType(const AtomicString& formContentType) { |
| 161 m_formContentType = formContentType; | 162 m_formContentType = formContentType; |
| 162 } | 163 } |
| 163 | 164 |
| 164 EncodedFormData* HistoryItem::formData() { | 165 EncodedFormData* HistoryItem::formData() { |
| 165 return m_formData.get(); | 166 return m_formData.get(); |
| 166 } | 167 } |
| 167 | 168 |
| 168 bool HistoryItem::isCurrentDocument(Document* doc) const { | 169 bool HistoryItem::isCurrentDocument(Document* doc) const { |
| 169 // FIXME: We should find a better way to check if this is the current document
. | 170 // FIXME: We should find a better way to check if this is the current |
| 171 // document. |
| 170 return equalIgnoringFragmentIdentifier(url(), doc->url()); | 172 return equalIgnoringFragmentIdentifier(url(), doc->url()); |
| 171 } | 173 } |
| 172 | 174 |
| 173 DEFINE_TRACE(HistoryItem) { | 175 DEFINE_TRACE(HistoryItem) { |
| 174 visitor->trace(m_documentState); | 176 visitor->trace(m_documentState); |
| 175 } | 177 } |
| 176 | 178 |
| 177 } // namespace blink | 179 } // namespace blink |
| OLD | NEW |