OLD | NEW |
1 /* ***** BEGIN LICENSE BLOCK ***** | 1 /* ***** BEGIN LICENSE BLOCK ***** |
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
3 * | 3 * |
4 * The contents of this file are subject to the Mozilla Public License Version | 4 * The contents of this file are subject to the Mozilla Public License Version |
5 * 1.1 (the "License"); you may not use this file except in compliance with | 5 * 1.1 (the "License"); you may not use this file except in compliance with |
6 * the License. You may obtain a copy of the License at | 6 * the License. You may obtain a copy of the License at |
7 * http://www.mozilla.org/MPL/ | 7 * http://www.mozilla.org/MPL/ |
8 * | 8 * |
9 * Software distributed under the License is distributed on an "AS IS" basis, | 9 * Software distributed under the License is distributed on an "AS IS" basis, |
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
(...skipping 28 matching lines...) Expand all Loading... |
39 // fields. | 39 // fields. |
40 // This method based on Firefox2 code in | 40 // This method based on Firefox2 code in |
41 // toolkit/components/passwordmgr/base/nsPasswordManager.cpp | 41 // toolkit/components/passwordmgr/base/nsPasswordManager.cpp |
42 | 42 |
43 #include "config.h" | 43 #include "config.h" |
44 #include "WebPasswordFormUtils.h" | 44 #include "WebPasswordFormUtils.h" |
45 | 45 |
46 #include "HTMLFormElement.h" | 46 #include "HTMLFormElement.h" |
47 #include "HTMLInputElement.h" | 47 #include "HTMLInputElement.h" |
48 #include "HTMLNames.h" | 48 #include "HTMLNames.h" |
49 #include "KURL.h" | 49 #include "core/platform/KURL.h" |
50 | 50 |
51 using namespace WebCore; | 51 using namespace WebCore; |
52 | 52 |
53 namespace WebKit { | 53 namespace WebKit { |
54 | 54 |
55 // Maximum number of password fields we will observe before throwing our | 55 // Maximum number of password fields we will observe before throwing our |
56 // hands in the air and giving up with a given form. | 56 // hands in the air and giving up with a given form. |
57 static const size_t maxPasswords = 3; | 57 static const size_t maxPasswords = 3; |
58 | 58 |
59 void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields) | 59 void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // We ignore elements that have no value. Unlike userName, alternate
UserNames | 96 // We ignore elements that have no value. Unlike userName, alternate
UserNames |
97 // is used only for autofill, not for form identification, and blank
autofill | 97 // is used only for autofill, not for form identification, and blank
autofill |
98 // entries are not useful. | 98 // entries are not useful. |
99 if (!inputElement->value().isEmpty()) | 99 if (!inputElement->value().isEmpty()) |
100 fields->alternateUserNames.append(inputElement->value()); | 100 fields->alternateUserNames.append(inputElement->value()); |
101 } | 101 } |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 } // namespace WebKit | 105 } // namespace WebKit |
OLD | NEW |