OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "core/HTMLNames.h" | 33 #include "core/HTMLNames.h" |
34 #include "core/InputTypeNames.h" | 34 #include "core/InputTypeNames.h" |
35 #include "core/dom/Document.h" | 35 #include "core/dom/Document.h" |
36 #include "core/html/FormData.h" | 36 #include "core/html/FormData.h" |
37 #include "core/html/HTMLFormControlElement.h" | 37 #include "core/html/HTMLFormControlElement.h" |
38 #include "core/html/HTMLFormElement.h" | 38 #include "core/html/HTMLFormElement.h" |
39 #include "core/html/HTMLInputElement.h" | 39 #include "core/html/HTMLInputElement.h" |
40 #include "core/html/HTMLOptionElement.h" | 40 #include "core/html/HTMLOptionElement.h" |
41 #include "core/html/HTMLSelectElement.h" | 41 #include "core/html/HTMLSelectElement.h" |
42 #include "platform/network/FormDataEncoder.h" | 42 #include "platform/network/FormDataEncoder.h" |
| 43 #include "platform/wtf/text/TextEncoding.h" |
43 #include "public/web/WebFormElement.h" | 44 #include "public/web/WebFormElement.h" |
44 #include "public/web/WebInputElement.h" | 45 #include "public/web/WebInputElement.h" |
45 #include "wtf/text/TextEncoding.h" | |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 using namespace HTMLNames; | 49 using namespace HTMLNames; |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
53 // Gets the encoding for the form. | 53 // Gets the encoding for the form. |
54 // TODO(tkent): Use FormDataEncoder::encodingFromAcceptCharset(). | 54 // TODO(tkent): Use FormDataEncoder::encodingFromAcceptCharset(). |
55 void getFormEncoding(const HTMLFormElement& form, WTF::TextEncoding* encoding) { | 55 void getFormEncoding(const HTMLFormElement& form, WTF::TextEncoding* encoding) { |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
267 String action(formElement->action()); | 267 String action(formElement->action()); |
268 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)); | 268 KURL url(formElement->document().completeURL(action.isNull() ? "" : action)); |
269 RefPtr<EncodedFormData> formData = EncodedFormData::create(encodedString); | 269 RefPtr<EncodedFormData> formData = EncodedFormData::create(encodedString); |
270 url.setQuery(formData->flattenToString()); | 270 url.setQuery(formData->flattenToString()); |
271 m_url = url; | 271 m_url = url; |
272 m_encoding = String(encoding.name()); | 272 m_encoding = String(encoding.name()); |
273 } | 273 } |
274 | 274 |
275 } // namespace blink | 275 } // namespace blink |
OLD | NEW |