forked from mirrors/gecko-dev
FormHandler is a central place for heuristics that other components like the LoginManager and FormAutofill rely on. This patch moves the heuristics that detect page navigations to the FormHandler. It also applies two changes: - Heuristic to capture on page navigation no longer relies on the process' active element in FormAutofill - Capturing in cross-origin frames is introduced Introduced page navigation heuristic: When LoginManager/FormAutofill detect a form that they expect a submission for, a FormHandler actor pair is created in the current window context, which registers the web progress listener that listens for "page navigations", e.g. location changes of the observed window/document or history session changes. - If the form is in a same-orign frame, we register the listener only at the top level. - If the form is in a cross-origin frame, we additionally set up a listener with the root of the cross-origin process, so that we are aware of page navigations in both processes. When a page navigation is observed, all existing (same-origin and cross-origin) FormHandler parents in the browsing context subtree notify their children. (Note: We don't create any new actors in this step, because they won't have any form to submit anyway). When the corresponding FormHandlerChild(ren) are notified of the page navigation, they fire the "form-submission-detected" event. On "form-submission-detected" event: - The LoginManagerChild instance(s) kept track of all modified login forms and infers capturing them. - The FormAutofillChild instance(s) kept track of all identified formautofill forms and infers capturing them. Differential Revision: https://phabricator.services.mozilla.com/D204927 |
||
|---|---|---|
| .. | ||
| formautofill | ||
| pictureinpicture | ||
| report-site-issue | ||
| screenshots | ||
| search-detection | ||
| webcompat | ||
| moz.build | ||