This starts some of the needed refactoring towards having proper
rendering suppression, and in general aligning better with the HTML
spec's "update the rendering" section.
Behavior changes should be minimal:
* We suppress rendering until the pres shell is initialized rather than
just created. This matches how autofocus already works and in general
we don't want to forcibly flush an uninitialized presshell.
* We handle view transition suppression more correctly in some (but not
all) phases.
* Some of the steps do no longer recurse manually nor check the view
transitions suppression, as that's done centrally.
* mAutoFocusFlushDocuments isn't tracked separately.
Follow-up work will involve changing most of the "pending resize/scroll/etc"
events to be per-document as per spec, and also implement suppression for
painting.
Differential Revision: https://phabricator.services.mozilla.com/D244372
Sites with racy code can sometimes fail if we don't run timeouts
immediately. Note that in most cases it will still be racy and can still
fail.
Differential Revision: https://phabricator.services.mozilla.com/D242628
Original patch: 7d93b7e3c1
Original author: Aryeh Gregor <ayg@aryeh.name>
According to the spec,
- https://html.spec.whatwg.org/#dom-document-nameditem
- https://html.spec.whatwg.org/#named-access-on-the-window-object
the document and window named getters return different values. This patch creates
a separated content list for document named getter while keeping the original
content list for the window named getter. Additionally, the content list now
includes both names and ids, in addition to the id list (which is still used for
other things like getElementById()).
This means one element might be on up to multiple lists, but this implementation
is necessary. Specifically, we must return a consistent live list for document.foo
and for window.foo, so they need to be stored separately and cannot be generated
on the fly from a single shared list.
Differential Revision: https://phabricator.services.mozilla.com/D240951
Original patch: 7d93b7e3c1
Original author: Aryeh Gregor <ayg@aryeh.name>
According to the spec,
- https://html.spec.whatwg.org/#dom-document-nameditem
- https://html.spec.whatwg.org/#named-access-on-the-window-object
the document and window named getters return different values. This patch creates
a separated content list for document named getter while keeping the original
content list for the window named getter. Additionally, the content list now
includes both names and ids, in addition to the id list (which is still used for
other things like getElementById()).
This means one element might be on up to multiple lists, but this implementation
is necessary. Specifically, we must return a consistent live list for document.foo
and for window.foo, so they need to be stored separately and cannot be generated
on the fly from a single shared list.
Differential Revision: https://phabricator.services.mozilla.com/D240951
Per spec, now we flush the update callback queue before scheduling the new
update callback in Setup() to make sure the previous update callbacks get
invoked before we do capturing.
Differential Revision: https://phabricator.services.mozilla.com/D241328
Per spec, now we flush the update callback queue before scheduling the new
update callback in Setup() to make sure the previous update callbacks get
invoked before we do capturing.
The test is in css-view-transitions/start-view-transtion-skips-active.html,
which is not merged into Gecko yet, so I only can verify it in the try server.
Differential Revision: https://phabricator.services.mozilla.com/D241328
Posting, because per spec we should do this, but we should also do much
more.
I can look into rejiggering the refresh driver set-up a bit more to make
this more generic if you want.
Differential Revision: https://phabricator.services.mozilla.com/D241067
Currently, we only allow openerWithUserInteraction heuristic for
trackering windows, which doesn't match the MDN article of SAA
heuristics.
In addition, we want to remove the opener heuristic in the future and
move to use the openerWithUserInteraction instead.
In this patch, we change the heuristic to allow it for non-tracking
windows and put it behind the pref.
Differential Revision: https://phabricator.services.mozilla.com/D238941
We used a wrong name for the pref that controls SAA AutoGrants for
third-party trackers. This patch fixes this by introducing a pref with a
properly. We will keep the pref that controls SAA heuristics for
third-party trackers.
Differential Revision: https://phabricator.services.mozilla.com/D238940
This changes how DocGroups are created to make cross-origin data
documents share a DocGroup with their embedder.
This is required to better align DocGroups with Similar-origin Window
Agents (which correlate with DocGroups), which is required for other
parts of this patch stack.
Differential Revision: https://phabricator.services.mozilla.com/D239226
This is used to replace the places where all documents are iterated using
DocGroup. In another part, DocGroups are changed to hold Window Globals rather
than Document objects, so an alternative mechanism is required to allow for all
documents to be iterated.
A linked list is used to minimize document creation overhead.
Differential Revision: https://phabricator.services.mozilla.com/D238116
Previously this warning could only fire in a cross-origin-isolated
context, but after the changes in this patch stack, it can also happen
if the webpage opts in with Origin-Agent-Cluster: ?1.
This updates the wording of the warning to more accurately reflect the
new situations which cause it to fire.
Differential Revision: https://phabricator.services.mozilla.com/D236977
The UsesOriginAgentCluster method returns a Maybe<bool>, to allow for an
uncertain state in the future (when the origin-agent-cluster status can be
unknown until a network request is received).
Differential Revision: https://phabricator.services.mozilla.com/D236970
SEC_ERROR_REVOKED_CERTIFICATE is a certificate error, not a TLS protocol error.
This patch updates the categorization of this error while maintaining the
property that it cannot be overridden. This has the benefit of making it
possible to show more diagnostic information in the error page, which this
patch also adds.
Differential Revision: https://phabricator.services.mozilla.com/D239220
We had two codepaths, one failing if the sheet was associated, and one
doing the opposite. Make additional sheets never doc-associated.
Differential Revision: https://phabricator.services.mozilla.com/D239257
size_t is the return type of nsTArray::IndexOf. NoIndex is defined as (size_t)-1. Implicitly converting this to int32_t which is signed and might be a different bit width seems sketchy to me. This makes this clear and explicit.
Differential Revision: https://phabricator.services.mozilla.com/D229282