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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 | 215 |
216 void HistoryItem::setFormInfoFromRequest(const ResourceRequest& request) | 216 void HistoryItem::setFormInfoFromRequest(const ResourceRequest& request) |
217 { | 217 { |
218 if (equalIgnoringCase(request.httpMethod(), "POST")) { | 218 if (equalIgnoringCase(request.httpMethod(), "POST")) { |
219 // FIXME: Eventually we have to make this smart enough to handle the cas
e where | 219 // FIXME: Eventually we have to make this smart enough to handle the cas
e where |
220 // we have a stream for the body to handle the "data interspersed with f
iles" feature. | 220 // we have a stream for the body to handle the "data interspersed with f
iles" feature. |
221 m_formData = request.httpBody(); | 221 m_formData = request.httpBody(); |
222 m_formContentType = request.httpContentType(); | 222 m_formContentType = request.httpContentType(); |
223 } else { | 223 } else { |
224 m_formData = 0; | 224 m_formData = nullptr; |
225 m_formContentType = nullAtom; | 225 m_formContentType = nullAtom; |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 void HistoryItem::setFormData(PassRefPtr<FormData> formData) | 229 void HistoryItem::setFormData(PassRefPtr<FormData> formData) |
230 { | 230 { |
231 m_formData = formData; | 231 m_formData = formData; |
232 } | 232 } |
233 | 233 |
234 void HistoryItem::setFormContentType(const AtomicString& formContentType) | 234 void HistoryItem::setFormContentType(const AtomicString& formContentType) |
235 { | 235 { |
236 m_formContentType = formContentType; | 236 m_formContentType = formContentType; |
237 } | 237 } |
238 | 238 |
239 FormData* HistoryItem::formData() | 239 FormData* HistoryItem::formData() |
240 { | 240 { |
241 return m_formData.get(); | 241 return m_formData.get(); |
242 } | 242 } |
243 | 243 |
244 bool HistoryItem::isCurrentDocument(Document* doc) const | 244 bool HistoryItem::isCurrentDocument(Document* doc) const |
245 { | 245 { |
246 // FIXME: We should find a better way to check if this is the current docume
nt. | 246 // FIXME: We should find a better way to check if this is the current docume
nt. |
247 return equalIgnoringFragmentIdentifier(url(), doc->url()); | 247 return equalIgnoringFragmentIdentifier(url(), doc->url()); |
248 } | 248 } |
249 | 249 |
250 } // namespace WebCore | 250 } // namespace WebCore |
251 | 251 |
OLD | NEW |