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 26 matching lines...) Expand all Loading... |
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/FormDataBuilder.h" | 42 #include "platform/network/FormDataBuilder.h" |
43 #include "public/web/WebFormElement.h" | 43 #include "public/web/WebFormElement.h" |
44 #include "public/web/WebInputElement.h" | 44 #include "public/web/WebInputElement.h" |
45 #include "wtf/text/TextEncoding.h" | 45 #include "wtf/text/TextEncoding.h" |
46 | 46 |
47 using namespace WebCore; | 47 using namespace blink; |
48 using namespace HTMLNames; | 48 using namespace HTMLNames; |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
52 // Gets the encoding for the form. | 52 // Gets the encoding for the form. |
53 void GetFormEncoding(const HTMLFormElement* form, WTF::TextEncoding* encoding) | 53 void GetFormEncoding(const HTMLFormElement* form, WTF::TextEncoding* encoding) |
54 { | 54 { |
55 String str(form->getAttribute(HTMLNames::accept_charsetAttr)); | 55 String str(form->getAttribute(HTMLNames::accept_charsetAttr)); |
56 str.replace(',', ' '); | 56 str.replace(',', ' '); |
57 Vector<String> charsets; | 57 Vector<String> charsets; |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 String action(formElement->action()); | 285 String action(formElement->action()); |
286 KURL url(formElement->document().completeURL(action.isNull() ? "" : action))
; | 286 KURL url(formElement->document().completeURL(action.isNull() ? "" : action))
; |
287 RefPtr<FormData> formData = FormData::create(encodedString); | 287 RefPtr<FormData> formData = FormData::create(encodedString); |
288 url.setQuery(formData->flattenToString()); | 288 url.setQuery(formData->flattenToString()); |
289 m_url = url; | 289 m_url = url; |
290 m_encoding = String(encoding.name()); | 290 m_encoding = String(encoding.name()); |
291 } | 291 } |
292 | 292 |
293 } // namespace blink | 293 } // namespace blink |
OLD | NEW |