gecko-dev/dom/xhr
Dimi Lee d6530bf9ad Bug 1166995 - P1. Notify DOMDocFetchSuccess when a fetch or XHR request completes successfully r=smaug,sfoster
The goal of this series of patches is to address the cases where sites
don't use standard form submission events.

The basic idea is inferring a form is submitted when the form is removed
from the DOM tree, but with one premise:
There must be a successful fetch or XHR request sent in the document before the
form is removed.

This is because websites usually send the credentials with a fetch or an
XHR. After the request succeeds, the website removes the form.

In summary, this patch does the following:
1. Add NotifyFetchOrXHRSuccess API in Document. The API sends a
   "DOMDocFetchSuccess" event to who registers the event listener.

2. When a fetch request or a XMLHttpReuqest completes and succeeds,
   call NotifyFetchOrXHRSuccess().

3. LoginMangerChild listen to `DOMDocFetchSuccess` event only when there
   is an user interaction on the password field.

Differential Revision: https://phabricator.services.mozilla.com/D106024
2021-03-16 09:15:19 +00:00
..
tests Bug 1685869, enable sync XHR tests also in beta, r=sefeng 2021-01-11 15:12:15 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in mozilla-central. 2020-10-26 18:34:53 +00:00
XMLHttpRequest.cpp
XMLHttpRequest.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
XMLHttpRequestEventTarget.cpp Bug 1673931 - Avoid including DebuggerNotificationBinding.h from header files. r=nika 2020-12-10 11:09:32 +00:00
XMLHttpRequestEventTarget.h Bug 1673931 - Avoid including DebuggerNotificationBinding.h from header files. r=nika 2020-12-10 11:09:32 +00:00
XMLHttpRequestMainThread.cpp Bug 1166995 - P1. Notify DOMDocFetchSuccess when a fetch or XHR request completes successfully r=smaug,sfoster 2021-03-16 09:15:19 +00:00
XMLHttpRequestMainThread.h Bug 1676369 - Avoid including nsIHttpChannel.h from header files. r=#necko-reviewers 2020-11-23 16:10:11 +00:00
XMLHttpRequestString.cpp Bug 1691889 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/. r=peterv 2021-03-10 08:19:25 +00:00
XMLHttpRequestString.h Bug 1691889 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/. r=peterv 2021-03-10 08:19:25 +00:00
XMLHttpRequestUpload.cpp
XMLHttpRequestUpload.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
XMLHttpRequestWorker.cpp Bug 1696348 - Remove redundant nullptr checks of return value of infallible new in dom/[file,xhr]. r=baku 2021-03-04 17:46:55 +00:00
XMLHttpRequestWorker.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00