Title: [139253] trunk/Source/WebKit/chromium
- Revision
- 139253
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-09 16:27:22 -0800 (Wed, 09 Jan 2013)
Log Message
[Chromium] Always enable autocomplete for password fields
https://bugs.webkit.org/show_bug.cgi?id=104600
Patch by Yue Zhang <zys...@google.com> on 2013-01-09
Reviewed by Darin Fisher.
Don't check autocomplete in webkit code. Rather, we check it in chrome code in the following way: if the password field is chrome generated password, we ignore autocomplete=off and always fill the password; otherwise, we respect the autocomplete set. Since this is a chrome only feature, we make it configurable (default to false but enable this in chrome code).
* src/WebPasswordFormUtils.cpp:
(WebKit::findPasswordFormFields):
* src/WebPasswordFormUtils.h:
(WebKit):
(WebKit::findPasswordFormFields):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (139252 => 139253)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-01-10 00:18:15 UTC (rev 139252)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-01-10 00:27:22 UTC (rev 139253)
@@ -1,3 +1,18 @@
+2013-01-09 Yue Zhang <zys...@google.com>
+
+ [Chromium] Always enable autocomplete for password fields
+ https://bugs.webkit.org/show_bug.cgi?id=104600
+
+ Reviewed by Darin Fisher.
+
+ Don't check autocomplete in webkit code. Rather, we check it in chrome code in the following way: if the password field is chrome generated password, we ignore autocomplete=off and always fill the password; otherwise, we respect the autocomplete set. Since this is a chrome only feature, we make it configurable (default to false but enable this in chrome code).
+
+ * src/WebPasswordFormUtils.cpp:
+ (WebKit::findPasswordFormFields):
+ * src/WebPasswordFormUtils.h:
+ (WebKit):
+ (WebKit::findPasswordFormFields):
+
2013-01-09 James Robinson <jam...@chromium.org>
[chromium] Add a notification when a WebWidget's WebLayerTreeView is about to go away
Modified: trunk/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp (139252 => 139253)
--- trunk/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp 2013-01-10 00:18:15 UTC (rev 139252)
+++ trunk/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp 2013-01-10 00:27:22 UTC (rev 139253)
@@ -81,8 +81,7 @@
continue;
if ((fields->passwords.size() < maxPasswords)
- && inputElement->isPasswordField()
- && inputElement->shouldAutocomplete()) {
+ && inputElement->isPasswordField()) {
if (fields->passwords.isEmpty())
firstPasswordIndex = i;
fields->passwords.append(inputElement);
@@ -103,8 +102,7 @@
continue;
// Various input types such as text, url, email can be a username field.
- if ((inputElement->isTextField() && !inputElement->isPasswordField())
- && (inputElement->shouldAutocomplete())) {
+ if ((inputElement->isTextField() && !inputElement->isPasswordField())) {
fields->userName = inputElement;
break;
}
Modified: trunk/Source/WebKit/chromium/src/WebPasswordFormUtils.h (139252 => 139253)
--- trunk/Source/WebKit/chromium/src/WebPasswordFormUtils.h 2013-01-10 00:18:15 UTC (rev 139252)
+++ trunk/Source/WebKit/chromium/src/WebPasswordFormUtils.h 2013-01-10 00:27:22 UTC (rev 139253)
@@ -42,6 +42,10 @@
namespace WebKit {
// Helper structure to locate username, passwords and submit fields.
+//
+// Note that we don't check autocomplete property here. The applications using
+// password forms can use WebPasswordFormData.passwordShouldAutocomplete to
+// implement their own heuristics related autocomplete.
struct PasswordFormFields {
WebCore::HTMLInputElement* userName;
Vector<WebCore::HTMLInputElement*> passwords;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes