Commit Graph

2004 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
9fb7a17630 Bug 1864425 - Remove PendingAnimationTracker. r=birtles
Instead of starting transitions and animations as a result of a paint,
use the refresh driver tick to do this.

This sets the transition-ready time to the current time during the next
refresh driver tick that it was started on (see mSawTickWhilePending).

This is similar to what's described in the bugs comments, and seems to
work nicely in practice.

We could easily change that (current time) by a paint-based time if
needed (when available), which would be more similar to what we were
doing. But I'd rather do the simple thing for now, and land this shortly
after the soft freeze is over so that we have time to watch out for
regressions.

There's one regression on a test that birtles wrote (using an XHR doc
and switching the timeline to a rendered doc's timeline).

We use the timeline's document rather than the target document to
determine whether to trigger animations now. That's one of the cases
where we'd keep vsync perma-running without this patch, and Chrome also
fails that test. Maybe the test should be removed / the spec should be
tweaked to allow this behavior?

This causes some progression in some CSS transitions tests too, and I
added an extra test for the vsync behavior.

Over-all this is much simpler to reason about and I think we should try
to do this.

Differential Revision: https://phabricator.services.mozilla.com/D193583
2023-11-20 09:31:41 +00:00
Narcis Beleuzu
aeac4d77e1 Backed out 7 changesets (bug 1852098) for bustages on UseCounterMetrics.h . CLOSED TREE
Backed out changeset 3b87419a9eea (bug 1852098)
Backed out changeset d9c7c84c82df (bug 1852098)
Backed out changeset e594c7eebb91 (bug 1852098)
Backed out changeset 15e0b0bd3bfb (bug 1852098)
Backed out changeset 220e9ee63ec3 (bug 1852098)
Backed out changeset 9edef145d1c5 (bug 1852098)
Backed out changeset 920a798dbb8a (bug 1852098)
2023-11-16 01:00:42 +02:00
Chris H-C
be4023d4f6 Bug 1852098 - Increment Glean use counter metrics and submit the use-counters ping during shutdown r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D193250
2023-11-15 21:34:12 +00:00
Stanca Serban
7f8a3ccc5e Backed out 7 changesets (bug 1852098) for causing build bustages in UseCounterMetrics.cpp. CLOSED TREE
Backed out changeset 2caabd4bfe86 (bug 1852098)
Backed out changeset 5c174b0ee1ab (bug 1852098)
Backed out changeset 05ba23510b93 (bug 1852098)
Backed out changeset 256984effaa2 (bug 1852098)
Backed out changeset 8bed08cf2a68 (bug 1852098)
Backed out changeset 16b0698a239d (bug 1852098)
Backed out changeset 6e8d54a51fb7 (bug 1852098)
2023-11-15 23:02:32 +02:00
Chris H-C
1a8a70316b Bug 1852098 - Increment Glean use counter metrics and submit the use-counters ping during shutdown r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D193250
2023-11-15 17:01:30 +00:00
Tom Schuster
489ae02a57 Bug 1847990 - Font fingerprinting detection and telemetry. r=timhuang,jfkthame,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192074
2023-11-13 10:05:22 +00:00
Tom Schuster
b69f140767 Bug 1847990 - Canvas fingerprinting telemetry. r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189111
2023-11-13 10:05:22 +00:00
Tom Schuster
d5c72b44a3 Bug 1847990 - Canvas fingerprinting detection heuristics. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D188340
2023-11-13 10:05:22 +00:00
Nazım Can Altınova
b3e5486e5f Bug 1862937 - Add profiler markers for LCP values r=sefeng,profiler-reviewers,florian,emilio
There might be multiple LCP entries in a web page, and we only care about the
last one which is also the biggest value. That's why we need to record these
values in two different places:
- During the Document unload, so we can add markers for the closed pages.
- During the profile capture, so we can add markers for the open pages.

This allows us to capture all the LCP values. Note that this is not the case
for other metrics like FCP, TTFB, DOMContentLoaded etc. that fires only once.

Differential Revision: https://phabricator.services.mozilla.com/D192828
2023-11-13 08:59:17 +00:00
Cosmin Sabou
5e145e6c18 Backed out changeset 4100364d528c (bug 1862937) for causing build bustages. CLOSED TREE 2023-11-09 19:34:15 +02:00
Nazım Can Altınova
439c72d640 Bug 1862937 - Add profiler markers for LCP values r=sefeng,profiler-reviewers,florian
There might be multiple LCP entries in a web page, and we only care about the
last one which is also the biggest value. That's why we need to record these
values in two different places:
- During the Document unload, so we can add markers for the closed pages.
- During the profile capture, so we can add markers for the open pages.

This allows us to capture all the LCP values. Note that this is not the case
for other metrics like FCP, TTFB, DOMContentLoaded etc. that fires only once.

Differential Revision: https://phabricator.services.mozilla.com/D192828
2023-11-09 16:59:05 +00:00
Stanca Serban
86c5c0bcea Backed out changeset 31f667310dfe (bug 1862937) for causing multiple failures in WeakPtr.h. CLOSED TREE 2023-11-08 16:52:51 +02:00
Nazım Can Altınova
f766a094c3 Bug 1862937 - Add profiler markers for LCP values r=sefeng,profiler-reviewers,florian
There might be multiple LCP entries in a web page, and we only care about the
last one which is also the biggest value. That's why we need to record these
values in two different places:
- During the Document unload, so we can add markers for the closed pages.
- During the profile capture, so we can add markers for the open pages.

This allows us to capture all the LCP values. Note that this is not the case
for other metrics like FCP, TTFB, DOMContentLoaded etc. that fires only once.

Differential Revision: https://phabricator.services.mozilla.com/D192828
2023-11-08 13:29:41 +00:00
Noemi Erli
3ebc359ec4 Backed out 2 changesets (bug 1851816) for causing private browsing related failures CLOSED TREE
Backed out changeset d2f63b3f6342 (bug 1851816)
Backed out changeset 7d0d2fe95e67 (bug 1851816)
2023-11-07 00:18:54 +02:00
Tom Ritter
d8e7355533 Bug 1851816: Pass PBM Status into RFPIsEnabledFor r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D192501
2023-11-06 21:02:40 +00:00
Bas Schouten
12be488887 Bug 1862939 - Part 3: Add Glean histogram telemetry for LCP, mirrored to legacy telemetry. r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D192710
2023-11-06 20:32:44 +00:00
Bas Schouten
507bbaad9a Bug 1862939 - Part 2: Add LCP information to the Pageload Event. r=dpalmeiro
Differential Revision: https://phabricator.services.mozilla.com/D192695
2023-11-06 20:32:44 +00:00
Emilio Cobos Álvarez
3e250daf73 Bug 1789214 - When forcing colors without a color-scheme, compute prefers-color-scheme based on them. r=morgan
This requires moving some code around to PreferenceSheet, but that makes
stuff actually a bit simpler.

Depends on D192574

Differential Revision: https://phabricator.services.mozilla.com/D192575
2023-11-06 19:59:38 +00:00
Emilio Cobos Álvarez
488a396e1b Bug 1855861 - Make stylesheet load events only fire if the sheet has an owner node. r=smaug
This matches the behavior of other browsers, and avoids having to keep
alive the link element and thus associated document etc for too long.

Differential Revision: https://phabricator.services.mozilla.com/D192834
2023-11-06 17:05:10 +00:00
Emilio Cobos Álvarez
2b3f849ce9 Bug 1862924 - Remove devtools.toolbox.force-chrome-prefs. r=devtools-reviewers,nchevobbe
Instead, use forced-color-adjust: none to disable HCM forced colors in
DevTools, for now. It's a more straight-forward way of doing it.

Differential Revision: https://phabricator.services.mozilla.com/D192669
2023-11-03 21:46:49 +00:00
Sean Feng
2d6e584e05 Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 20:53:36 +00:00
Sandor Molnar
d23e2827b7 Backed out 7 changesets (bug 1722322) for causing bp-nu bustages
Backed out changeset 0ebd32e273b8 (bug 1722322)
Backed out changeset 7a75717f127c (bug 1722322)
Backed out changeset c2a6440a83d7 (bug 1722322)
Backed out changeset 9955756855bd (bug 1722322)
Backed out changeset 37fccb407777 (bug 1722322)
Backed out changeset f52b1f28f753 (bug 1722322)
Backed out changeset 0121c8cf5d2f (bug 1722322)
2023-11-02 21:27:24 +02:00
Sean Feng
cacfa492a8 Bug 1722322 - Implement LargestContentfulPaint r=emilio
Spec: https://w3c.github.io/largest-contentful-paint

Differential Revision: https://phabricator.services.mozilla.com/D151079
2023-11-02 17:04:47 +00:00
Dave Townsend
6ba6028340 Bug 1855427: The DOMLinkRemoved chrome event is not used anywhere. r=emilio
The event isn't dispatched correctly for DOM manipulations anymore. It is
dispatched when swapping docshells but we don't actually use this event anywhere
except tests so we might as well just remove it entirely.

Differential Revision: https://phabricator.services.mozilla.com/D192333
2023-10-31 15:10:43 +00:00
Masayuki Nakano
484742d76d Bug 1859245 - part 4: Make HTMLEditor handle only the new direction mode r=m_kato
Depends on D191607

Differential Revision: https://phabricator.services.mozilla.com/D191608
2023-10-27 01:57:29 +00:00
Tom Schuster
b900d3586a Bug 1857488 - Set RTPCallerType when creating the global/realm in the browser. r=smaug,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D190677
2023-10-26 17:49:01 +00:00
Masayuki Nakano
665f8cef01 Bug 1244437 - part 1: Make HTMLEditUtils::IsFormatNode check same tags as Chromium does r=m_kato
I realized that our `HTMLEditUtils::IsFormatNode` is not maintained different
from the other browsers.  Therefore, only we do not check new elements defined
after HTML 4.01.  This patch aligns the list of the format elements to the
others [1].

Then, this also changes some expectations of `editing/run/formatblock.html`
to align common behavior of the browsers.

Note that we mapped `formatBlock` of `execCommand` to `cmd_paragraphState`,
and the XUL command handles `<blockquote>` in a different path [2] and the
behavior is pretty different from the other formatBlock command implementations.
Therefore, this patch creates new command for `formatBlock` and makes
`HTMLEditor` switch behavior in any places.

1. ba50f40fc4:third_party/WebKit/WebCore/editing/FormatBlockCommand.cpp;l=114-134
2. https://searchfox.org/mozilla-central/rev/6602bdf9fff5020fbc8e248c963ddddf09a77b1b/editor/libeditor/HTMLEditor.cpp#2461-2474

Differential Revision: https://phabricator.services.mozilla.com/D190900
2023-10-26 03:45:17 +00:00
Adam Brouwers-Harries
4a2ba69cbc Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-24 15:18:12 +00:00
Narcis Beleuzu
67b61b8b2c Backed out changeset 714aaf6484fb (bug 1421651) for causing Bug 1860719. CLOSED TREE 2023-10-24 17:31:02 +03:00
Olli Pettay
09966ae20f Bug 1844755 - Consider to not create ServoStyleSet for data documents, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D191485
2023-10-23 16:10:41 +00:00
Iulian Moraru
653333b281 Backed out 3 changesets (bug 1857488) for causing valgrind bustages related to Fingerprinting. CLOSED TREE
Backed out changeset f2961f6ece1f (bug 1857488)
Backed out changeset df299aac1633 (bug 1857488)
Backed out changeset b640c254626e (bug 1857488)
2023-10-23 19:32:13 +03:00
Tom Schuster
6f0742291c Bug 1857488 - Set RTPCallerType when creating the global/realm in the browser. r=smaug,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D190677
2023-10-23 14:06:04 +00:00
Adam Brouwers-Harries
720e582a3a Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-23 13:55:50 +00:00
Natalia Csoregi
936df55967 Backed out changeset f1426851ae30 (bug 1844755) for causing failures on test_printpreview.xhtml. CLOSED TREE 2023-10-23 13:44:53 +03:00
Olli Pettay
ce1ccc4967 Bug 1844755 - Consider to not create ServoStyleSet for data documents, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D191485
2023-10-23 09:42:42 +00:00
Emilio Cobos Álvarez
2181461fd3 Bug 1859945 - Restore old content-inaccessible-about:blank behavior. r=nika
While not perfect, as you noted, it's probably good enough. It's also a
bit safer, probably.

Differential Revision: https://phabricator.services.mozilla.com/D191413
2023-10-20 09:10:56 +00:00
CanadaHonk
aa654b839c Bug 1622090 - Implement loading=lazy for <iframe> r=emilio
Initial implementation for <iframe loading=lazy>

Also cleaned up some image lazy loading to be generalised
(sharing an intersection observer and some enums/funcs in Element).

Unimplemented details:
 - Window load should not wait for in view lazy loading iframes.
   Unplanned for this patch and ship for now.
   (Chromium fail, WebKit pass)

We also pass some other WPTs other engines do not too already too.
Also added a WPT to ensure using parse-time base URI for lazy -> eager iframes.

Differential Revision: https://phabricator.services.mozilla.com/D190662
2023-10-18 14:13:29 +00:00
Tim Huang
7f0348add6 Bug 1824222 - Make nsRFPService::IsRFPEnabledFor() to use the given OverriddenFingerprintingSettings for checking RFPTargets. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D185016
2023-10-17 22:02:30 +00:00
Tim Huang
f992ee3a42 Bug 1824222 - Add OverriddenFingerprintingSettings to worker loadInfo. r=tjr,dom-worker-reviewers,smaug
To allow workers to know the OverriddenFingerprintingSettings,
we populate the value to the worker loadInfo and worker private from
the document.

For service workers, we use the partitionKey in its principal to get
the OverriddenFingerprintingSettings of the given service worker.

Differential Revision: https://phabricator.services.mozilla.com/D185014
2023-10-17 22:02:28 +00:00
Emilio Cobos Álvarez
e0d1c6c07c Bug 1859427 - Cache number parsers and formatters per language. r=smaug
This makes number localization cheaper / halves the time in the
microbenchmark.

Change the content-language handling to use atoms. This exposes some
interesting inconsistencies but I tried not to change behavior there.

Differential Revision: https://phabricator.services.mozilla.com/D191174
2023-10-17 11:01:13 +00:00
Benjamin VanderSloot
9e9a008e34 Bug 1858494 - Return permission action rather than boolean when fetching the storage access permission from the parent process - r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D190722
2023-10-12 16:58:22 +00:00
Timothy Nikkel
c882e53a61 Bug 1858083. Avoid needless addref in Document::GetBrowsingContext. r=smaug
It's a weak pointer but presumably can only die based on main thread actions. The GetBrowsingContext getter is just a plain getter, returning a pointer.

Although small this does show up in the profile in bug 1857094. It's called from some common layout/painting functions.

Differential Revision: https://phabricator.services.mozilla.com/D190559
2023-10-11 10:30:01 +00:00
Emilio Cobos Álvarez
6fd3d0e73c Bug 1857513 - Clean up document state setup. r=smaug
Now that we have a DocumentState type we can be a bit less explicit
(before this used EventStates, so the extra Document in the names was
useful).

Differential Revision: https://phabricator.services.mozilla.com/D190602
2023-10-11 08:24:14 +00:00
Emilio Cobos Álvarez
d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
CanadaHonk
004e291fb6 Bug 1791079 - Implement User Activation API r=dom-core,webidl,saschanaz,edgar
Rewrote internal user activation tree (spreading state to other elements)
logic to match HTML spec:
https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model

Added navigator.userActivation API to expose internal user activation.

Also fixed a WPT test to conform to spec (siblings are not activated),
see also spec issue: https://github.com/whatwg/html/issues/9831

Co-authored-by: Tom Schuster <evilpies@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D185348
2023-10-07 23:12:29 +00:00
Narcis Beleuzu
d458eaacfa Backed out changeset 73919dbff272 (bug 1791079) for bustages on Navigator.h . CLOSED TREE 2023-10-06 23:04:11 +03:00
CanadaHonk
e259378f1c Bug 1791079 - Implement User Activation API r=dom-core,webidl,saschanaz,edgar
Rewrote internal user activation tree (spreading state to other elements)
logic to match HTML spec:
https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model

Added navigator.userActivation API to expose internal user activation.

Also fixed a WPT test to conform to spec (siblings are not activated),
see also spec issue: https://github.com/whatwg/html/issues/9831

Co-authored-by: Tom Schuster <evilpies@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D185348
2023-10-06 18:56:23 +00:00
Sandor Molnar
ef68ad3af9 Backed out changeset 7c84c5fc7d00 (bug 1791079) for causing mochitest process crashes at @ RefPtr<mozilla::dom::WindowContext>::operator-> CLOSED TREE 2023-10-06 16:18:00 +03:00
CanadaHonk
f7c7df7e67 Bug 1791079 - Implement User Activation API r=dom-core,webidl,saschanaz,edgar
Rewrote internal user activation tree (spreading state to other elements)
logic to match HTML spec:
https://html.spec.whatwg.org/multipage/interaction.html#user-activation-processing-model

Added navigator.userActivation API to expose internal user activation.

Also fixed a WPT test to conform to spec (siblings are not activated),
see also spec issue: https://github.com/whatwg/html/issues/9831

Co-authored-by: Tom Schuster <evilpies@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D185348
2023-10-06 12:16:17 +00:00
Emilio Cobos Álvarez
061c11bc12 Bug 1857073 - Remove ResizeObserverController. r=surkov,smaug
These days it's just a very thin wrapper over an nsTArray of
ResizeObservers. We also schedule notifications for resize observations
for the whole BrowsingContext tree at once, so there's no point on
individually keep track of them.

Differential Revision: https://phabricator.services.mozilla.com/D190113
2023-10-05 12:11:56 +00:00