Commit Graph

824103 Commits

Author SHA1 Message Date
Jan Varga
9c67dedd7e Bug 1803062 - Deserialize streams only on the task queue; r=dom-storage-reviewers,jesup
Quota file stream wrappers will bind an actor to the thread where
the stream deserialization is done (the actor is needed for proxying quota
checks to the parent process), so we can't deserialize the stream on the worker
thread anymore because the stream is used off the worker thread (on the IO task
queue).

Differential Revision: https://phabricator.services.mozilla.com/D163944
2022-12-16 06:38:11 +00:00
Jan Varga
cfcee7d45e Bug 1803062 - Use mStream in ReadOrWrite only on the task queue; r=dom-storage-reviewers,jari
This is a preparation for lazy deserialization of the stream on the IO task
queue. After that, we won't be able to touch mStream directly on the worker
thread.

Differential Revision: https://phabricator.services.mozilla.com/D163943
2022-12-16 06:38:11 +00:00
Jan Varga
8784d5e561 Bug 1803062 - Change the complete callback of AsyncCopy to MoveOnlyFunction; r=dom-storage-reviewers,jesup
This is needed to prevent build errors when AsyncCopy is called inside of a
lambda function.

Differential Revision: https://phabricator.services.mozilla.com/D163942
2022-12-16 06:38:10 +00:00
Jan Varga
399614ae7b Bug 1803062 - Truncate, GetSize and Flush on the task queue; r=dom-storage-reviewers,jari
Instead of doing IO directly on the worker thread, these methods now instead
dispatch a task on the IO task queue and block the worker by spinning a nested
event loop (worker control runnables can be processed).

Differential Revision: https://phabricator.services.mozilla.com/D163941
2022-12-16 06:38:10 +00:00
Jan Varga
41e58b31bb Bug 1803062 - Read, write and close streams on the task queue; r=dom-storage-reviewers,jesup
This patch adds the last required piece for having fully async close of
FileSystemSyncAccessHandles.

Differential Revision: https://phabricator.services.mozilla.com/D163939
2022-12-16 06:38:09 +00:00
Jan Varga
3120da2b93 Bug 1803062 - Add a helper class for automatic proxy releasing of objects; r=dom-storage-reviewers,jesup
The helper makes it easier and simper to hold self references in lamnda
functions.

Differential Revision: https://phabricator.services.mozilla.com/D163938
2022-12-16 06:38:08 +00:00
Jan Varga
4472bb0420 Bug 1803062 - Create a task queue on top of the STS for each FileSystemSyncAccessHandle; r=dom-storage-reviewers,jesup
The new task queue is not yet used.

Differential Revision: https://phabricator.services.mozilla.com/D163937
2022-12-16 06:38:08 +00:00
Jan Varga
8bb2e3b9d4 Bug 1803062 - Change FileSystemSyncAccessHandle::Close to be async; r=dom-storage-reviewers,jesup
This patch adds all remaining infrastructure for handling async close calls
without actually closing the stream on the IO task queue.

Differential Revision: https://phabricator.services.mozilla.com/D163842
2022-12-16 06:38:08 +00:00
Jan Varga
1e360a7a84 Bug 1803062 - Prepare a way for using other FileSystemSyncAccessHandle states besides the open/closed state; r=dom-storage-reviewers,jesup
Async Close will have to close the stream on the IO task queue which introduces
a new state of the object which can't be controlled by a bool member.

Differential Revision: https://phabricator.services.mozilla.com/D163565
2022-12-16 06:38:07 +00:00
Jan Varga
d5251f60a7 Bug 1803062 - Don't call FileSystemSyncAccessHandle::Close when the object is already closed; r=dom-storage-reviewers,jesup
The Close method will return a MozPromise. Calling such method if the object is
already closed would uselessly allocate a MozPromise and dispatch a runnable
for the MozPromise resolving. So it's better to call Close only if the object
is not yet closed.

Differential Revision: https://phabricator.services.mozilla.com/D163564
2022-12-16 06:38:07 +00:00
Jan Varga
3042af06bf Bug 1803062 - Expose the sync close operation using a dedicated method; r=smaug
This is a preparation for changing the internal Close method to be async.

Differential Revision: https://phabricator.services.mozilla.com/D164192
2022-12-16 06:38:06 +00:00
Jan Varga
fe224998ea Bug 1803062 - Prevent worker shutdown until FileSystemSyncAccessHandles are closed; r=dom-storage-reviewers,jesup
This is a preparation for an async closing of FileSystemSyncAccessHandles which
requires finising of the operation on a live worker thread (after closing the
stream on the IO task queue, we need to send an IPC message to the parent
process).

Differential Revision: https://phabricator.services.mozilla.com/D163563
2022-12-16 06:38:06 +00:00
Jan Varga
11bba396db Bug 1803062 - Add a fallible way to create FileSystemSyncAccessHandle objects; r=dom-storage-reviewers,jari
This is a preparation for creating a task queue and a strong worker ref during
FileSystemSyncAccessHandle construction.

Differential Revision: https://phabricator.services.mozilla.com/D163562
2022-12-16 06:38:05 +00:00
Marian-Vasile Laza
787a36f1b3 Backed out changeset 921e84e9c52d (bug 1796878) for causing xpcshell failures on test_attachments_downloader.js. CLOSED TREE 2022-12-16 06:48:43 +02:00
Jeff Muizelaar
c1d05774cc Bug 1804952. Translate rectangle PushClip() to PushClipRect() r=lsalzman
This helps out when clipping to rects with canvas2d. It reduces GPU
usage on the React-Stockcharts benchmark from ~70% down to ~45% on
a desktop gen9 Intel GPU.

It would be better to handle this in the D2D backend like we do in other
backends, but there's not an easy way to detect rectangle paths there.
This was the easiest place to slot it in and shouldn't have too high a
cost for the other places we use the recording backend.

Differential Revision: https://phabricator.services.mozilla.com/D164764
2022-12-16 04:04:39 +00:00
Barret Rennie
ab93697d52 Bug 1796878 - Port osfile.jsm usage to IOUtils in services/ r=markh
Differential Revision: https://phabricator.services.mozilla.com/D163410
2022-12-16 04:04:07 +00:00
Barret Rennie
e23c2fbace Bug 1805748 - Fix writing profiles in talos-powers API r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D164735
2022-12-16 03:19:22 +00:00
Drew Willcoxon
89bd2779a8 Bug 1804353 - Don't select buttons on mousedown in the urlbar view. r=dao
This stops selecting buttons on mousedown so that selection and the input remain
in a sensible state after clicking the block button while top sites are showing
(e.g., in the weather suggestion).

This turned out to be surprisingly complicated, so please see the bug and code
comments for details. I think our selection logic is pretty brittle or at least
convoluted and could stand to be simplified, but I didn't want to make large
changes here. Ideally we wouldn't treat buttons any differently on mousedown --
so we'd select them too -- and it may be possible to do that while avoiding the
problems I talk about in the bug, but I don't think it's at all worth the
complexity that seems to be required.

I added a new task to the test Daisuke created in D155812.

Differential Revision: https://phabricator.services.mozilla.com/D164018
2022-12-16 02:58:15 +00:00
Boris Chiou
bf23474980 Bug 1774505 - Move tests of printing documents into an independent folder. r=hiro
There is still a spec issue about printing for scroll animations,
https://github.com/w3c/csswg-drafts/issues/8226, so I think moving all of
them into a separate folder makes us easier to address.

Differential Revision: https://phabricator.services.mozilla.com/D164860
2022-12-16 02:28:02 +00:00
Boris Chiou
f856c08cc3 Bug 1774505 - Preserve the progress of null timeline for print. r=hiro
We always use the document timeline of the cloned document, and clone the
paused animation with the preserved progress, even if the original
timeline is null.

Differential Revision: https://phabricator.services.mozilla.com/D164712
2022-12-16 02:28:02 +00:00
sotaro
9df22d9664 Bug 1798245 - Enable video overlay without ZeroCopyNV12Texture with non-intel GPUs to release r=jrmuizel,gfx-reviewers
Bug 1798242 did not cause a regression. Then it seems OK to try to enable video overlay without ZeroCopyNV12Texture with non-intel GPUs to release.

Differential Revision: https://phabricator.services.mozilla.com/D164634
2022-12-16 00:54:14 +00:00
Barret Rennie
8b66c0797a Bug 1803182 - Port osfile.jsm usage to IOUtils in toolkit/components/terminator/ r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D163353
2022-12-16 00:48:38 +00:00
Barret Rennie
e6d1635f6e Bug 1772924 - Remove osfile.jsm usage in /security/sandbox/ r=haik
Differential Revision: https://phabricator.services.mozilla.com/D163404
2022-12-16 00:29:46 +00:00
James Teh
99882c7170 Bug 1805545 part 2: Don't query CSS on image map areas when querying LocalAccessible attributes. r=morgan
This fixes the same bug as part 1, but when the cache is disabled.
It is covered by the same test.

Differential Revision: https://phabricator.services.mozilla.com/D164784
2022-12-15 23:41:18 +00:00
James Teh
c5f38f94f1 Bug 1805545 part 1: Don't query the display style on image map areas when pushing the cache. r=morgan
See the code comments for an explanation.
This fixes assertions and crashes when pushing the cache when a page contains a map which is unslotted in a shadow host.

Differential Revision: https://phabricator.services.mozilla.com/D164783
2022-12-15 23:41:18 +00:00
James Teh
7a085dff19 Bug 1805876 part 2: Use GetAccessible instead of GetAccessibleOrContainer when building the viewport cache. r=morgan
Calling GetAccessibleOrContainer meant that if a particular content node didn't have an Accessible but did have a frame, we'd insert its container in its place.
There might have been other descendants of that container that did have Accessibles, though.
In that case, we would have put the container ahead of some of its descendants!
To fix this, use GetAccessible instead.
We'll still fall back to the container if the user hit tests a point in an inaccessible node, since it will appear later in the viewport cache.

Differential Revision: https://phabricator.services.mozilla.com/D164803
2022-12-15 23:35:51 +00:00
James Teh
c0b3a8201a Bug 1805876 part 1: Revert the RemoteAccessible hit testing changes in bug 1801756. r=morgan
That patch was always somewhat hacky, but we couldn't figure out the cause of the problem.
Now that I've figured it out, a more correct solution is forthcoming.

Differential Revision: https://phabricator.services.mozilla.com/D164802
2022-12-15 23:35:50 +00:00
Matthias Camenzind
c341905d11 Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-15 23:13:01 +00:00
Matthias Camenzind
c9300fab1e Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-15 23:13:00 +00:00
Matthias Camenzind
5ca3ed6b88 Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-15 23:13:00 +00:00
Matthias Camenzind
5d9dfb1656 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-12-15 23:12:59 +00:00
Mike Conley
df3f489652 Bug 1805619 - Check for MigrationUtils before calling into it in ResetProfile.sys.mjs. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D164705
2022-12-15 23:00:51 +00:00
Mark Hammond
8fd66feff0 Bug 1801295 (part 2) - vendor new application-services with the fix. r=skhamis
Depends on D164781

Differential Revision: https://phabricator.services.mozilla.com/D164782
2022-12-15 22:51:51 +00:00
Mark Hammond
efb859df84 Bug 1801295 (part 1) - add a test demonstrating how tabs aren't returned after a quickwrite. r=skhamis
Differential Revision: https://phabricator.services.mozilla.com/D164781
2022-12-15 22:51:50 +00:00
Florian Quèze
26a63b8815 Bug 1805646 - Add profiler markers showing the names of IPC messages triggered by scripts, r=nika,canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D164648
2022-12-15 22:30:14 +00:00
Calixte
ab967ec52a Bug 1805953 - Put pdfjs in metrics index at the right place r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D164847
2022-12-15 22:28:18 +00:00
Ting-Yu Lin
a45a1c2c20 Bug 1804997 Part 4 - Move SumOfChildrenBlockSizeProperty into a struct. r=dholbert
ReflowChildren() needs more bookkeeping data to correctly place tall flex items
being pushed from prev-in-flows during fragmentation. This is a preparation for
bug 1743890 that is going to add more fields to the struct.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D164399
2022-12-15 21:58:31 +00:00
Ting-Yu Lin
d5e1c77a20 Bug 1804997 Part 3 - When building a flex container's next-in-flows, carry forward its items' groupings into distinct FlexLines. r=dholbert
When I first implemented flexbox fragmentation, all the children in flex
container's next-in-flows are all put in one FlexLine, because we assume the
position of flex items won't shift in fragmentation. However, when we implement
more granular control of flexbox fragmentation such as pushing a tall flex item
to next page/column, we'll need the information of flex lines.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D164398
2022-12-15 21:58:31 +00:00
Ting-Yu Lin
66b246d165 Bug 1804997 Part 2 - Rename areChildrenComplete to anyChildIncomplete. r=dholbert
This is a follow-up of Bug 1622935 Part 1
https://hg.mozilla.org/mozilla-central/rev/78d4dfbda06a

The variable storing the return value of ReflowChildren should be renamed, too.

Differential Revision: https://phabricator.services.mozilla.com/D164397
2022-12-15 21:58:30 +00:00
Ting-Yu Lin
457f6eb83e Bug 1804997 Part 1 - Simplify GenerateFlexItemForChild(). r=dholbert
- Remove the return value since it is never used.
- Store the newly create flex item in a reference since EmplaceBack() returns
  NonNull<FlexItem*>.

Differential Revision: https://phabricator.services.mozilla.com/D164396
2022-12-15 21:58:30 +00:00
Emily McMinn
6974b9c7b1 Bug 1790387 - A11y improvements for the Feature Callout step indicator r=aminomancer,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D159629
2022-12-15 21:48:42 +00:00
Drew Willcoxon
da2063ac08 Bug 1805576 - Add back telemetry tests for improve_suggest_experience_checked = true. r=daleharvey
This adds checks to the main sponsored and nonsponsored tests to ensure we have
test cases where this value is both true and false. I think it's important to
have test cases for both sponsored and nonsponsored suggestions since these are
the two main types of Firefox Suggest suggestions. I don't think it's necessary
for other types of suggestions because they all use the same logic, so if these
checks pass for sponsored and nonsponsored suggestions, we can be reasonably
sure other suggestion types are handled correctly.

Differential Revision: https://phabricator.services.mozilla.com/D164617
2022-12-15 21:12:51 +00:00
Dan Mosedale
3ab309d3e4 Bug 1805471 - add ASRouter impression debug logging, r=emcminn
Adds impression debug logging to ASRouter .

Differential Revision: https://phabricator.services.mozilla.com/D164728
2022-12-15 21:11:31 +00:00
Narcis Beleuzu
6da804aed4 Backed out changeset 34ec63cced63 (bug 1575154) for causing wpt failures on idlharness.https.html . CLOSED TREE 2022-12-15 23:10:35 +02:00
Narcis Beleuzu
111b7634b3 Bug 1802704 - Fix skip test_proxy_info_results.js on Windows. r=kershaw DONTBUILD 2022-12-15 23:08:58 +02:00
Emily McDonough
a7d0e54361 Bug 1804798 - Explicitly set auto page name (and corresponding debug flag) when inserting frames in nsCSSFrameConstructor::ContentRangeInserted r=dholbert
Unfortunately, this can be called through both reflow and frame construction
much like nsCSSFrameConstructor::ContentAppended, so we can't just use a page-
name tracker.

Differential Revision: https://phabricator.services.mozilla.com/D164760
2022-12-15 20:30:29 +00:00
Ksenia Berezina
bd91080417 Bug 1805818 - Add additional tests for interventions r=twisniewski DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D164772
2022-12-15 20:30:01 +00:00
Denis Palmeiro
cb098267e2 Bug 1799727: Add redirection time, redirection count, http protocol, trr domain, and same site navigation boolean to the page load event r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161643
2022-12-15 20:19:52 +00:00
Denis Palmeiro
335c4ba85b Bug 1799727: Migrate the page load event to a custom ping that strips client id r=chutten,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162311
2022-12-15 20:19:51 +00:00
Denis Palmeiro
1d5a281c11 Bug 1799727: Replace redundant page load event struct with predefined glean struct r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D163771
2022-12-15 20:19:51 +00:00