summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/autofill
Commit message (Collapse)AuthorAgeFilesLines
* Merge WebKit at r75993: Move WebKit/android files to SourceBen Murdoch2011-05-1611-1966/+0
| | | | Change-Id: Ifa871f8320bdb3a09fe189fffecc23f702c394b9
* Merge WebKit at r74534: Fix WebCoreFrameBridge.cpp andBen Murdoch2011-05-101-5/+17
| | | | | | | | | | FormManagerAndroid.cpp Platform code needs updating after upstream refactoring. See http://trac.webkit.org/changeset/73430 Change-Id: If9306164c5dae24fb11af724979c0187d28792da
* Fix occasional AutoFill crashBen Murdoch2011-01-181-12/+13
| | | | | | Don't store a raw pointer to a refcounted type. Change-Id: I444578e7cc601ef6402ea135982aedc7ca1f983c
* Fix warningKristian Monsen2011-01-141-1/+1
| | | | Change-Id: I92ac985aba6780bc00f6dfbdca7e72f645b03580
* Merge Chromium at 9.0.597.55: Move formsSeen call to IO thread.Ben Murdoch2011-01-112-1/+28
| | | | | | | | | | | | | When we search the document for forms to be autofilled, we make a URL request to the AutoFill server to ask it for form field data. With Chromium r67655, this URL request needs to be made on a Chrome thread. This is a simple fix for the merge, which blocks until the call completes. See http://src.chromium.org/viewvc/chrome?view=rev&revision=67655 Change-Id: Iad96314e4ecb66ee7e65c1ef846709e9c41b0e2e
* Merge Chromium at 9.0.597.55: Merge 67599. (2/2)Ben Murdoch2011-01-112-11/+38
| | | | | | | | | | This needed a bit of work so I've split into two commits. This is part 2, where we now need to pass both the field that was focussed and the form it belongs to. To achieve this I have a new class that encapsulates the pointers. Change-Id: Iea1a5a55696c63255bcc57b070116409a2195f4c
* Merge Chromium at 9.0.597.55: Merge r67599 (1/2)Ben Murdoch2011-01-113-5/+14
| | | | | | | | This is a slightly tricky merge. This first part is the easy bit. See http://src.chromium.org/viewvc/chrome?view=rev&revision=67599 Change-Id: Id22f7f0ce0f0b7eca62f39d4e6ae65b9ea1bdcda
* Merge Chromium at 9.0.597.55: Merge r67192Ben Murdoch2011-01-112-5/+8
| | | | | | See http://src.chromium.org/viewvc/chrome?view=rev&revision=67192 Change-Id: Ia1a391a9e7634e86e5c3166349befc47841b570e
* Merge Chromium at 9.0.597.55: Autofill: Merge r66860Ben Murdoch2011-01-111-2/+1
| | | | | | See http://src.chromium.org/viewvc/chrome?view=rev&revision=66860 Change-Id: I561d89dcc060af7f3e0b975e4a940c7de63d89d4
* Merge Chromium at 9.0.597.55: Autofill: Merge r66850Ben Murdoch2011-01-113-13/+13
| | | | | | | | | Autofill: Prefer maxLength to size attribute for form filling heuristics. See http://src.chromium.org/viewvc/chrome?view=rev&revision=66850 Change-Id: Ia102dea1c861474e878639b91288e6845d7250ef
* Fix crash in AutoFillBen Murdoch2010-12-171-2/+1
| | | | | | | | | | | | | | | | We recently changed WebKit to use one URLRequestContext per WebView. However AutoFill did not get migrated to the new system and so we have observed crashes due to a dangling pointer. We have one AutoFill object per WebView and hence one Profile object per webview. we access the URLRequestContext through the Profile so inject the correct context in when the AutoFill object is created. Needs a change in external/chromium, see I004ab7ac9c6a72be1b62aa8e44322b97a371c136 Bug: 3291654 Change-Id: Iace23ae8c0240f0134894c12d2f7281161aa6150
* Refactor AutoFill so it runs lazily.Ben Murdoch2010-12-062-13/+41
| | | | | | | | | | | | | | | This CL refactors the AutoFill code so that we only search for forms when we need to, i.e. the user has focused a form field. This helps page load times. We also re-search the document for forms if the dom version number has changed. These changes fix a bug where a crash occurs if the form is focused before the page has finished loading. We also move the callsite of formFieldFocused so that it only occurs when the IME is requested which is a more appropriate place called less frequently than it's current callsite in EditorClientAndroid. Bug: 3243567 Change-Id: I04fe13944d3f8248197d71a0e58c21f01c4abdd0
* Merge Chromium at r66597: Merge in AutoFill changes in r66310Ben Murdoch2010-12-032-3/+16
| | | | | | See http://src.chromium.org/viewvc/chrome?view=rev&revision=66310 Change-Id: If294e929ee4d27fd6804939986be7650ff7224ad
* Merge Chromium at r66597: Merge in AutoFill changes from r66237Ben Murdoch2010-12-031-8/+8
| | | | | | See http://src.chromium.org/viewvc/chrome?view=rev&revision=66237 Change-Id: I1baea2eea0e6cf0def36ce3f69e8fb53a17eb2ba
* Merge Chromium at r66597: AutoFill: no more queryIdBen Murdoch2010-12-034-8/+8
| | | | | | See http://src.chromium.org/viewvc/chrome?view=rev&revision=66237 Change-Id: Ie2bf417bf20686ca782f6c0e4d2527e666c88ad4
* Use one WebRequestContext per WebViewSteve Block2010-12-011-1/+3
| | | | | | | | | | | | This change switches from using a pair of WebRequestContexts (one for private browsing, one for regular browsing) to using one WebRequestContext per WebView. This is required to allow us to set the userAgent on each WebView. The WebRequestContext is now owned by the WebView. Bug: 3113804 Change-Id: Iba2b1490e7ce4ff65c08a04a310963fa2c7e4f83
* Do more AutoFill steup lazilySteve Block2010-12-012-5/+11
| | | | | | | | | Currently, much of the AutoFill setup is done in the WebAutoFill constructor, which is called when the Page is created. This change moves this setup to be done lazily when searchDocument() is called, which is the entry point into the feature. Change-Id: I0d437ed53391b5a7d8d16ec1000dc783c710e564
* Provide a URLRequestContext directly to AutoFill, rather than a factory functionSteve Block2010-11-301-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In b/3044989, AutoFill was modified to take a factory function for the URLRequestContext (which was then created when needed), rather than taking the context directly. This was to avoid a race condition where the context is created before the required storage paths have been synced to the WebCore thread through the BrowserFrame. Since https://android-git.corp.google.com/g/76579 and https://android-git.corp.google.com/g/80056, we read the required paths directly from JniUtils, so the race condition no longer exists. We can therefore provide the context directly to AutoFill. Note that while the context may be created before the Settings have been synced to the WebCore thread, the necessary properties will be updated as part of this sync before the context is used. This change will also simplify things when we use one context per WebView. Also requires a change in external/chromium ... https://android-git.corp.google.com/g/82146 Change-Id: Idfc34d435bae21654a02e5898aef0e84da98218a
* Revert "Merge Chromium at r65505: Work around regression introduced by 64761"Ben Murdoch2010-11-231-6/+0
| | | | | | | | | | | | This reverts commit 0c918ae77b5edfe59b726ff40a7c86dbc4a94307. This was actually not really a regression as we were still broken previously it's just that this change makes that breakage more visible. The problem reproduces on tip of tree Chromium, so we can make the fix upstream and then cherry pick into Android. Change-Id: I4d65544b4ea137d77c00a39fcd29edb28b40aa1c
* By default, provide native AutoFill with an empty profile.Ben Murdoch2010-11-232-1/+25
| | | | | | | | | | | If no profile is set then AutoFill will not inform Java that it has found a form that could be autofilled. We want to be able to offer the user the option Java side to set up a profile in this case, so we set by default an empty profile that is active until the user syncs their real profile. This ensures that the AutoFill detection code will not early out. Change-Id: I474b25c5b31dae59e4ddb23c7f398d013e9d3beb
* Merge Chromium at r65505: Work around regression introduced by 64761Ben Murdoch2010-11-221-1/+7
| | | | | | | | | | This is a temporary workaround to fix the regression introduced on Android by http://src.chromium.org/viewvc/chrome?view=rev&revision=64761 It should be reverted when we understand better the root cause of the regression. Change-Id: I6652d817254f1b8c3857e2f14b53d5d034d2f12f
* Merge Chromium at r65505: Merge AutoFill change 64761Ben Murdoch2010-11-221-13/+11
| | | | | | | | | Merge in http://src.chromium.org/viewvc/chrome?view=rev&revision=64761 This is not part of the bigger autofill merge as this introdcues a regression that we need to understand. Change-Id: I08cfcefb93181e70a8a48d0c6da2217d3a5bbcf9
* Merge Chromium at r65505: Update AutoFill files.Ben Murdoch2010-11-223-83/+154
| | | | | | | | | | | | | | Bring our forked AutoFill files in line with r65505. http://src.chromium.org/viewvc/chrome?view=rev&revision=63527 http://src.chromium.org/viewvc/chrome?view=rev&revision=63797 http://src.chromium.org/viewvc/chrome?view=rev&revision=64470 http://src.chromium.org/viewvc/chrome?view=rev&revision=64572 http://src.chromium.org/viewvc/chrome?view=rev&revision=64612 http://src.chromium.org/viewvc/chrome?view=rev&revision=64691 http://src.chromium.org/viewvc/chrome?view=rev&revision=64696 Change-Id: I34755e649d1093a79ad50de53dfd1d1f9e92a584
* Merge Chromium at r65505: Update use of AutoFillProfile.Ben Murdoch2010-11-222-9/+16
| | | | | | | | | | | | | | With this new Chromium merge, unique profile ids have been deprecated and profile previews are obtained through the Label function rather that PreviewSummary. WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp: WebKit/android/jni/WebSettings.cpp: WebKit/android/WebCoreSupport/autofill/WebAutoFill.h: http://src.chromium.org/viewvc/chrome?view=rev&revision=63806 http://src.chromium.org/viewvc/chrome?view=rev&revision=65100 Change-Id: I8af86c8be8627e17b13edf66349d9df8f85638a1
* Merge autofill files after last Chromium mergeBen Murdoch2010-11-167-505/+786
| | | | | | | | | | | | | Merge by hand the files that have been gotked implementing AutoFill on Android. This classes use WebCore types rather than the Chrome WebKit API types that the code would normally use. This brings the files up to date with the last external/chromium merge to r63472 and updates their usages in line with that so that the feature continues to work as intended. Change-Id: Ic110873dc48c59555f0db76e7ad0c138c2fe96f2
* Fix browser crash.Patrick Scott2010-11-051-7/+9
| | | | | | Also fixed indenting (3 spaces?). Change-Id: If4a137d1af3ec8a597e8b929e5b4f10240f2f054
* Send the AutoFill Preview string java side.Ben Murdoch2010-11-052-25/+21
| | | | | | | | | | | When we have determined that the form can be autofilled, send a preview string over to Java so that we can display it in the drop down box. Requires a change in frameworks/base: https://android-git.corp.google.com/g/#change,77127 Change-Id: Ia0dd899d659c6e5710155f33749255058d7c3faf
* Clear chromium side autofill profiles when java syncs a null profile.Ben Murdoch2010-10-292-0/+18
| | | | | | | This implements the native code needed to support the deletion of a profile through the editor UI. Change-Id: I7966551324d709612bff7cafeaf8a2cf93c218f0
* Fixes style in WebRequestContextSteve Block2010-10-271-3/+3
| | | | | | | | | | | | | | | Previously this file used Chromium style, as it extends a Chromium class. However, I think it's best to switch to WebKit style to prevent Chromium style from leaking into the rest of WebKit. Also switches static member methods to file-scope static functions where possible. Finally, return WebRequestContext* rather than URLRequestContext* to allow us to call methods in the derived class. this will be required to hook up CookieManager. Change-Id: Ifdca62230a3728e338904ef1b9b392640af06a92
* Hide details of private browsing for URLRequestContext from Chromium ↵Steve Block2010-10-251-1/+6
| | | | | | AutoFill code Change-Id: I58a388ecf16b2af4f1cd31afb39d0aa6c5c44a24
* Fix debug statements.Patrick Scott2010-10-211-1/+1
| | | | Change-Id: Id37bf0a8b5864fea2490bd2dc5d4a1f52bc56c1d
* Fix Chromium HTTP request context getters to use raw pointersSteve Block2010-10-211-1/+1
| | | | | | | | | | | | | | | All call sites into the Chromium stack take raw pointers rather than scoped_refptr, so we should do the same for simplicity. This change also makes the ownership model more clear. Previously we were sometimes throwing away the scoped_refptr and using the raw pointer, which is unsafe unless you know that somebody else holds a reference. Requires a change to external/chromium ... https://android-git.corp.google.com/g/75220 Change-Id: I09c86d424193a3f3c2644bcf77a2d363fa24293b
* Fix AutoFill after merge to Chromium merge to 7.0.540.0Ben Murdoch2010-10-202-6/+7
| | | | | | | | | | | Chromium now seems to enforce that profile unique ids cannot be zero (as the default ctor leaves them). Read the correct id from the Java WebSettings.AutoFillProfile class. Requires a corresponding change in frameworks/base: I88cd1e91b8c6043c732a1709a89fda4a3c9f921f. Change-Id: I736220dccd8d68c395d6742e38a063da4140a13b
* Fixing WebKit APIs affected by Chromium 7.0.540.0 mergeIain Merrick2010-10-194-21/+12
| | | | | | | | | | | | | WebUrlLoaderClient, WebRequest: changing std::wstring to string16 http://src.chromium.org/viewvc/chrome?view=rev&revision=54101 HostResolver parameters changed, fixing WebRequestContext.cpp http://src.chromium.org/viewvc/chrome?view=rev&revision=57189 Icon parameter added to AutoFillHost, fixing AutoFillHostAndroid. http://src.chromium.org/viewvc/chrome?view=rev&revision=54052 Change-Id: If6a17af7da3b80d039205883019e4a73eb35f562
* Support the complete AutoFill profile.Ben Murdoch2010-10-142-2/+14
| | | | | | | | Load all AutoFill profile values from Java. Requires a corresponding change in frameworks/base: https://android-git.corp.google.com/g/#change,74046 Change-Id: I4567d0879f364647b649c0f3c80ce8e32423b371
* Sync autofill profile data from java.Ben Murdoch2010-10-132-20/+19
| | | | | | | | | | | | | | Add the JNI bindings so that we can get the AutoFill profile data that the user entered in the Browser UI and inject that data into the WebAutoFill object. This eliminates the John Smith profile! Note that additional profile data such as addresses and phone numbers will be added very shortly. Requires a corresponding change to frameworks/base, see https://android-git.corp.google.com/g/#change,72204 Change-Id: Ie32100123ef0d868e1f7efb5604c6fac48725967
* Update AndroidURLRequestContextGetter to take a pointer to the getter functionSteve Block2010-10-011-1/+1
| | | | | | | | | | | | | | | | | This allows users of AndroidURLRequestContextGetter to instantiate a URLRequestContext lazilly. When used in AutoFill++, this means that when the URLRequestContext is first initialized, the WebCore thread is set-up and the necessary settings are available. Also re-enables AutoFill++ The corresponding external/chromium change is https://android-git.corp.google.com/g/71275 Bug: 3044989 Change-Id: I4b577f08717775bce5268f3f4b4f5fcf23e54536
* Turn autofill on by default at compile time and make it a browser setting.Ben Murdoch2010-09-282-0/+30
| | | | | | | | | | | Make autofill a runtime option configured through the browser. Required a corresponding change in frameworks/base - https://android-git.corp.google.com/g/65573 and packages/apps/browser - https://android-git.corp.google.com/g/65579 Change-Id: I905b464a6338ff27b02f16d0b9a718154c3c98c1
* Integrate AutoFill with WebTextView in Java.Ben Murdoch2010-09-233-7/+48
| | | | | | | | | | | | | | | Adds the necessary JNI hooks so that when the user focuses a form field that AutoFill has identified as "autofillable", the Java side WebTextView will show an option in the auto complete drop down box that when selected will call back to AutoFill in native code and actually fill out the form. AutoFill is still disabled at compile time by default. To test the feature set ENABLE_AUTOFILL=true and rebuild WebKit. Needs a corresponding frameworks/base change. Change-Id: Ie76ff9cbf0b44f3f3644079ed64ce71bfbc9859a
* Fix a bug that would cause the AutoFill server to return an error.Ben Murdoch2010-09-231-1/+4
| | | | | | | | | | We were pushing the <option> elements associated with <select> tags into the form field vector that AutoFill uses. This is not correct as they are not used by the server and result in duplicate field signatures in the XML requests. As the signatures should be unique, the server returns an error response. Change-Id: I359a952cf219e088c2cae886907f563d86756688
* Add more profile data to the canned profile.Ben Murdoch2010-09-231-0/+5
| | | | Change-Id: Idcafae151f6635394883fa45720cedd3b38bd9c8
* Initial autofill changes in libwebcore.Ben Murdoch2010-09-1310-0/+1361
Initial checkin of WebKit source for enabling AutoFill on Android. This code calls into the chromium library to perform the autofill magic. There's still lots to do, but this and a corresponding change in external/chromium enable the feature (basically) end to end. The feature is disabled by default until we implement it more fully with some proper UI. To turn it on, set the ENABLE_AUTOFILL environment variable to "true" and rebuild. This is only useful for preliminary testing though as for now we use a precanned profile, which won't be relevant unless your name happens to be John Smith. Change-Id: I4a3e0e840617f7cf8f522af33ae1be560768a6c5