Commit Graph

2229 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
3bbfb2e943 Bug 1817122 - Make AsyncEventDispatcher(Event) take ownership of the event. r=smaug,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D190059
2023-10-04 19:37:39 +00:00
Emilio Cobos Álvarez
8bd872cf7c Bug 1856628 - Remove WakeLock::IsDocumentInvisible and related code. r=pip-reviewers,mhowell
This was added for bug 1659060 and bug 1679314, but it is effectively
superseded by bug 1755748, which makes document.hidden false if PiP is
used.

Covered by toolkit/content/tests/browser/browser_media_wakelock_PIP.js

Differential Revision: https://phabricator.services.mozilla.com/D189940
2023-10-03 16:08:59 +00:00
Alexander Surkov
793b37abb9 Bug 1807253 - get rid of ResizeObserverNotificationHelper, r=emilio
Integrate resize observer processing with RefreshDriver to make it
more extensible.

Differential Revision: https://phabricator.services.mozilla.com/D189697
2023-10-03 09:48:46 +00:00
Ziran Sun
2eb4db34f2 Bug 1850341 - Check if a dialog is opened as a popover in ESC key handling. r=emilio
https://github.com/whatwg/html/pull/9121

Differential Revision: https://phabricator.services.mozilla.com/D189632
2023-10-02 15:21:27 +00:00
Adam Vandolder
a1cf2d6b5d Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-28 15:47:11 +00:00
Emilio Cobos Álvarez
8c4c373dd7 Bug 1854441 - Initial zoom property implementation. r=layout-reviewers,jfkthame
Implement it as a 16-bit fixed-point value to avoid growing the
ComputedStyle object.

Modify the computed value of absolute lengths directly, as that's how it
works in other implementations (this sucks, see impending spec issues).

This doesn't implement the getComputedStyle / CSSOM APIs unzooming and
so on just yet, at least.

Differential Revision: https://phabricator.services.mozilla.com/D188862
2023-09-28 10:58:51 +00:00
Natalia Csoregi
51f7d1bb14 Backed out changeset 8f8492410799 (bug 1685926) for causing bustage on SVGAnimatedPathSegList.cpp. CLOSED TREE 2023-09-28 10:40:31 +03:00
Adam Vandolder
aee8834b7a Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-28 06:35:44 +00:00
Olli Pettay
c8c800a6a6 Bug 1843477, remove main thread only CC macros, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D187146
2023-09-26 12:36:20 +00:00
Cosmin Sabou
1483b97d75 Backed out 6 changesets (bug 1843477) for causing hazards failures. CLOSED TREE
Backed out changeset 64b093aa12a9 (bug 1843477)
Backed out changeset bdcd84c938d1 (bug 1843477)
Backed out changeset 05c882dd0d9a (bug 1843477)
Backed out changeset 1de814e5820d (bug 1843477)
Backed out changeset 6a0e19a60a5d (bug 1843477)
Backed out changeset 48942aff586f (bug 1843477)
2023-09-26 05:32:28 +03:00
Olli Pettay
c1089623d8 Bug 1843477, remove main thread only CC macros, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D187146
2023-09-25 21:09:00 +00:00
Robert Longson
c5e5a99e72 Bug 866411 - copy animation effects when cloning a use element r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188886
2023-09-25 20:31:29 +00:00
Cristian Tuns
f84b646496 Backed out changeset 37ade77d181e (bug 1685926) for causing build bustages in PerformanceEventTiming.cpp CLOSED TREE 2023-09-25 12:40:22 -04:00
Adam Vandolder
305c6a88bf Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-25 14:39:08 +00:00
Emilio Cobos Álvarez
bc2572c2ca Bug 1854744 - Document::RecordShadowStyleChange doesn't need to invalidate global stylesheet state. r=jrmuizel
Things like @font-face / @font-pallete-values etc don't look into those
stylesheets.

This prevents bugs in invalidation like bug 1854742 from triggering on
shadow root style changes like when changing AdoptedStyleSheets and so
on.

Differential Revision: https://phabricator.services.mozilla.com/D189034
2023-09-24 09:52:04 +00:00
Cristian Tuns
ed52e40449 Backed out changeset fcecc33ac7a3 (bug 1854744) for causing multiple assertion failures in ServoStyleSet.cpp CLOSED TREE 2023-09-22 22:37:45 -04:00
Emilio Cobos Álvarez
a21f440c39 Bug 1854744 - Document::RecordShadowStyleChange doesn't need to invalidate global stylesheet state. r=jrmuizel
Things like @font-face / @font-pallete-values etc don't look into those
stylesheets.

This prevents bugs in invalidation like bug 1854742 from triggering on
shadow root style changes like when changing AdoptedStyleSheets and so
on.

Differential Revision: https://phabricator.services.mozilla.com/D189034
2023-09-23 01:45:24 +00:00
Valentin Gosu
cdd5195292 Bug 1848694 - Remove/avoid global references to nsIIOService r=mccr8,necko-reviewers,kershaw
This patch removes the static pointer to nsIIOService in nsContentUtils,
replacing it to calls to mozilla::components::IO::Service.

It also makes nsScriptSecurityManager::sIOService a StaticRefPtr.

Differential Revision: https://phabricator.services.mozilla.com/D188714
2023-09-22 12:49:44 +00:00
Sandor Molnar
a8db14100e Backed out changeset b858a0740582 (bug 1848694) for causing build bustages on dom/base/Element.cpp CLOSED TREE 2023-09-21 16:45:57 +03:00
Valentin Gosu
e058782d44 Bug 1848694 - Remove/avoid global references to nsIIOService r=mccr8,necko-reviewers,kershaw
This patch removes the static pointer to nsIIOService in nsContentUtils,
replacing it to calls to mozilla::components::IO::Service.

It also makes nsScriptSecurityManager::sIOService a StaticRefPtr.

Differential Revision: https://phabricator.services.mozilla.com/D188714
2023-09-21 12:39:20 +00:00
Benjamin VanderSloot
97b33d4ddc Bug 1848783, part 5 - Move UsingStorageAccess onto the WindowContext to fix the storage access check for resource reuqests within subdocuments without active storage access but with permission r=timhuang,nika
Differential Revision: https://phabricator.services.mozilla.com/D187138
2023-09-21 01:48:49 +00:00
Benjamin VanderSloot
44445ad6ec Bug 1848783, part 1 - Add active document check - r=anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D186982
2023-09-21 01:48:47 +00:00
Benjamin VanderSloot
de2e216997 Bug 1837168 - Update user activation check to be after the permission check - r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D186981
2023-09-21 01:48:47 +00:00
Iulian Moraru
498b92b571 Backed out 9 changesets (bug 1848783, bug 1837168, bug 1835920) for causing multiple failures. CLOSED TREE
Backed out changeset ab1717421318 (bug 1848783)
Backed out changeset de5e1715c877 (bug 1848783)
Backed out changeset 1f64106e6667 (bug 1848783)
Backed out changeset e082ba20bbb2 (bug 1848783)
Backed out changeset cb56c5d713bf (bug 1848783)
Backed out changeset 735161c251e4 (bug 1848783)
Backed out changeset 3d1468ac6e84 (bug 1848783)
Backed out changeset 9ff5b92032cb (bug 1837168)
Backed out changeset 15cfb0c4f048 (bug 1835920)
2023-09-20 22:29:41 +03:00
Benjamin VanderSloot
e0441af918 Bug 1848783, part 5 - Move UsingStorageAccess onto the WindowContext to fix the storage access check for resource reuqests within subdocuments without active storage access but with permission r=timhuang,nika
Differential Revision: https://phabricator.services.mozilla.com/D187138
2023-09-20 16:14:40 +00:00