Граф коммитов

8455 Коммитов

Автор SHA1 Сообщение Дата
James Teh fd5003d8dd Bug 1679753: When constructing a new DocAccessibleParent for an in-process iframe, handle the case where the parent document has already been destroyed. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115645
2021-05-25 23:18:08 +00:00
James Teh 8363da33a8 Bug 1712210: Remove a pending child doc addition (if any) when the embedder accessible for an OOP iframe changes. r=eeejay
Previously, if an OuterDoc was never sent to the parent process and its id was reused later, we ended up adding the document to that accessible, which usually wasn't even an OuterDoc.
Alongside the actual fix, add some assertions to make breakage in this area easier to debug in future.

Differential Revision: https://phabricator.services.mozilla.com/D115777
2021-05-25 23:17:09 +00:00
Csoregi Natalia 15d4f16e13 Backed out 2 changesets (bug 1709346) for causing XPCConvert crashes. CLOSED TREE
Backed out changeset 7c1e15680741 (bug 1709346)
Backed out changeset 34eff3430674 (bug 1709346)
2021-05-26 00:32:25 +03:00
Nika Layzell 804c0c75da Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 17:31:53 +00:00
Butkovits Atila 8ef6ea3d5d Backed out 2 changesets (bug 1709346) for causing failures on browser_bug1709346.js. CLOSED TREE
Backed out changeset 19df1a8bfacc (bug 1709346)
Backed out changeset 602a7b4a41de (bug 1709346)
2021-05-25 19:52:49 +03:00
Nika Layzell a013b4d74e Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 15:54:48 +00:00
Steve Fink ccaf13bf0a Bug 1712006 - Speed up browser_gc_schedule.js with Promise.all and removing unnecessary waitForNewTab calls r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D115554
2021-05-21 22:08:06 +00:00
Andrew McCreight fa406e6672 Bug 1709715 - Take advantage of CTAD for GetParticularProcessPriorityManager(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114406
2021-05-21 21:13:05 +00:00
Alexandru Michis 84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Emilio Cobos Álvarez 667094fd22 Bug 1712129 - Remove unneeded GetSpec call in BrowserParent::LoadURL. r=nika,annyG
It was used for mDelayedURL, which got removed in bug 1589102.

Differential Revision: https://phabricator.services.mozilla.com/D115610
2021-05-20 17:00:50 +00:00
Andreas Farre dc6296a1ba Part 7: Bug 1700623 - Make session storage session store work with Fission. r=nika
Use the newly added session storage data getter to access the session
storage in the parent and store it in session store without a round
trip to content processes.

Depends on D111433

Differential Revision: https://phabricator.services.mozilla.com/D111434
2021-05-20 12:48:23 +00:00
Andreas Farre e9831f3ce0 Part 1: Bug 1700623 - Add storagePrincipal to WindowGlobalParent. r=nika,timhuang
We use the storage principal to look up origin records in the
background session storage manager.

Differential Revision: https://phabricator.services.mozilla.com/D111428
2021-05-20 12:48:20 +00:00
Dorel Luca a79a1b5c86 Backed out 2 changesets (bug 1535913) for Hazzard failure
Backed out changeset 1675ff18e322 (bug 1535913)
Backed out changeset fbcd65f308c2 (bug 1535913)
2021-05-20 01:33:36 +03:00
Nika Layzell 096124dd1a Bug 1535913 - Part 1: Orchestrate content BCG destruction from parent, r=farre
This should help avoid crashes caused when the content process has
already destroyed a BCG when the parent process hasn't yet. The BCG will
still be destroyed when the content process shuts down using normal
cycle-collection.

Differential Revision: https://phabricator.services.mozilla.com/D113828
2021-05-19 17:17:35 +00:00
Paul Bone 6477eef4a5 Bug 1710803 - Skip browser_gc_schedule.js for verify mode r=mccr8 DONTBUILD
I don't think the intermittent failures here are an indication of a true
problem here, more of a problem with how it's possible to test this code.

Differential Revision: https://phabricator.services.mozilla.com/D115330
2021-05-19 02:36:40 +00:00
Kershaw Chang 8394bdd6d1 Bug 1491084 - Remove unused code that shows http auth prompt for nested content process, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115374
2021-05-18 19:43:05 +00:00
Masayuki Nakano e9d6280e92 Bug 1520983 - part 1: Add new content command event for inserting text r=smaug
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events.  Instead, they expose only
`beforeinput` event and `input` event.  We should follow their behavior for web-compat
because `beforeinput` events for IME composition are never cancelable, but the
`beforeinput` events for the cases are cancelable of the other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D114826
2021-05-18 06:30:35 +00:00
Butkovits Atila f3f08e64ba Backed out 2 changesets (bug 1520983) for causing build bustages. CLOSED TREE
Backed out changeset c09060ee8358 (bug 1520983)
Backed out changeset b4c25d047cee (bug 1520983)
2021-05-18 07:47:57 +03:00
Masayuki Nakano 1bb2df9ea3 Bug 1520983 - part 1: Add new content command event for inserting text r=smaug
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events.  Instead, they expose only
`beforeinput` event and `input` event.  We should follow their behavior for web-compat
because `beforeinput` events for IME composition are never cancelable, but the
`beforeinput` events for the cases are cancelable of the other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D114826
2021-05-17 23:52:43 +00:00
Jonathan Kew 83fcb74e81 Bug 1704812 - Broadcast newly-added FontList shm blocks to Content Processes instead of waiting and doing sync IPC. r=emilio,jld
Differential Revision: https://phabricator.services.mozilla.com/D112666
2021-05-13 14:30:09 +00:00
Csoregi Natalia 1697facf08 Backed out changeset 221d5494188c (bug 1704812) for thread sanitizer issues in SharedFontList. DONTBUILD CLOSED TREE 2021-05-13 15:16:00 +03:00
Jonathan Kew 0ba5a52a62 Bug 1704812 - Broadcast newly-added FontList shm blocks to Content Processes instead of waiting and doing sync IPC. r=emilio,jld
Differential Revision: https://phabricator.services.mozilla.com/D112666
2021-05-13 11:45:48 +00:00
Csoregi Natalia ba272367cd Backed out changeset 80c9125cfac0 (bug 1704812) for assertion failures on gfxPlatformFontList.cpp. CLOSED TREE 2021-05-13 12:26:03 +03:00
Jonathan Kew 40e823046b Bug 1704812 - Broadcast newly-added FontList shm blocks to Content Processes instead of waiting and doing sync IPC. r=emilio,jld
Differential Revision: https://phabricator.services.mozilla.com/D112666
2021-05-13 08:57:42 +00:00
Andrew McCreight 72e921c0d9 Bug 1709931 - Properly shut down ParticularProcessPriorityManager when destroying it. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D114777
2021-05-12 20:34:29 +00:00
Nika Layzell 86d93eb604 Bug 1708254 - Move CreateAboutBlankContentViewer logic into platform, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D114789
2021-05-12 20:01:17 +00:00
Randell Jesup bef762916a Bug 1710671: do SetAcceptLanguages during process preallocation to reduce first-use overhead (especially for process-switch) r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D114901
2021-05-12 19:11:56 +00:00
Nicolas B. Pierron a4aef929a1 Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld
This change adds the ground work to share content provided by the JS engine of
the Parent process to initialize the JS engine of other threads and Content
processes.

The singleton class xpc::SelfHostedShmem is used to wrap the logic behind
holding the memory. The memory is initialized with `InitFromParent` or
`InitFromChild`. The memory is accessible using either the `Content` or
`Handle`.

The shared memory is transfered through the command line using
`mozilla::ipc::ExportSharedJSInit` and read using
`mozilla::ipc::ImportSharedJSInit` functions. The command line is used, as we
need the shared memory to be avilable for the JS engine initialization. The
command line is composed of a single command named `-jsInit` which is followed
by the handle (on Windows) and the length of the shared content.

The memory associated with the shared memory is cleared in `ShutdownXPCOM` after
closing all threads, and shuting down the JS engine. This is necessary as we
expect the JS engine to borrow content from the shared memory.

Differential Revision: https://phabricator.services.mozilla.com/D110576
2021-05-12 13:57:55 +00:00
Dorel Luca 2bc4e5cdf6 Backed out changeset 05c26697326a (bug 1710671) for multiple failures in obj-build/dist/include/mozilla/AlreadyAddRefed.h. CLOSED TREE 2021-05-12 16:32:28 +03:00
Randell Jesup 1679badc68 Bug 1710671: do SetAcceptLanguages during process preallocation to reduce first-use overhead (especially for process-switch) r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D114901
2021-05-12 12:54:39 +00:00
Paul Bone e301ee240c Bug 1629064 - pt 8. Add a test for JS initiated GCs r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109855
2021-05-12 06:46:10 +00:00
Paul Bone b5e6d9ccd6 Bug 1629064 - pt 7. Check that aborts do not confuse GC scheduler r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109854
2021-05-12 06:46:10 +00:00
Paul Bone b3d03fb2a6 Bug 1629064 - pt 6. Add a basic GC scheduling test r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105421
2021-05-12 06:46:10 +00:00
Sean Feng f575b80072 Bug 1708488 - Initialize NSS earlier in preallocated processes for fisson r=jesup,keeler
Differential Revision: https://phabricator.services.mozilla.com/D114907
2021-05-12 03:13:11 +00:00
Sandor Molnar 8839b94d54 Backed out changeset e7187a1150ae (bug 1710671) for causing build bustages in nsHttpHandler. CLOSED TREE 2021-05-12 01:10:23 +03:00
Randell Jesup e726c98cf2 Bug 1710671: do SetAcceptLanguages during process preallocation to reduce first-use overhead (especially for process-switch) r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D114901
2021-05-11 21:52:49 +00:00
Nika Layzell ad678cf076 Bug 1708734 - Part 3: Add tests for createActor: false, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114793
2021-05-11 17:29:25 +00:00
Nika Layzell 9c17d49cce Bug 1708734 - Part 2: Allow specifying that an actor should not be created when event is fired, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114792
2021-05-11 17:29:25 +00:00
Nika Layzell 568e5e85df Bug 1708734 - Part 1: Add getExistingActor to actor managers, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114791
2021-05-11 17:29:24 +00:00
Edgar Chen 45da1c12ad Bug 1706316 - Part 1: Remove nsIEmbeddingSiteWindow::setFocus; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D112739
2021-05-10 20:05:12 +00:00
Andrew McCreight 9c9c36a9fa Bug 1710473 - Remove hal::SetProcessPrioritySupported(). r=gsvelto,geckoview-reviewers,aklotz
As far as I can see, all this does is protect the user from
running some useless code if they manually enable the priority
manager using a pref on an OS that doesn't support it. The
upside of allowing this is that it makes it possible to debug
the priority manager on OSX and Linux with just a pref flip.

Differential Revision: https://phabricator.services.mozilla.com/D114767
2021-05-10 19:59:24 +00:00
Andrew McCreight 0688567b46 Bug 1618547 - Support Fission in the process priority manager. r=kmag,gsvelto
With Fission, there can be multiple BrowserParents in a single tab, so
this patch moves the tracking of active tabs onto the top BrowsingContext
in a tab. If the priority of a top BC is changed, then the activity
of all of the BPs of the BCs in the tree are all adjusted. The flag
that tracks this state gets carried forward to the new BC in the case
of a cross-group navigation by the changes in ReplacedBy().

The other change here covers the case where we do a process-switching
navigation on an iframe. If we create a new BrowserParent with an active
top BC, then the BP gets marked as active in the priority manager. Doing
this tracking on the BP instead of the BC (both here in and in the part
that landed previously in BrowserParent::Deactivated()) means that we
don't need to track down every place that a BC switches processes.

I left the tracking of activity in ParticularProcessPriorityManager
centered around BrowserParents, instead of changing it to BCs, to
minimize the changes required. There are some tricky interactions there
with wakelocks that I didn't want to have to figure out.

browser_ProcessPriorityManager.js was set up to track a mapping of
browsers to priorities, but for the purposes of testing Fission support
I changed it to track a mapping of child IDs to priorities.

In the test, I also removed an assignment (this.window = null) that
didn't seem to be doing anything.

Differential Revision: https://phabricator.services.mozilla.com/D112213
2021-05-07 17:51:34 +00:00
Narcis Beleuzu 343ffe2efd Backed out changeset 30060c96b2cd (bug 1535913) for frequent content crashes. a=backout DONTBUILD 2021-05-07 12:46:04 +03:00
Paul Bone 6191ca4916 Bug 1709526 - Fix all the lint errors for .ini files in dom/ r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D114321
2021-05-06 01:29:31 +00:00
Emilio Cobos Álvarez 8fb52356f4 Bug 1708303 - Fix scroll-margin implementation. r=hiro
So that margin is not included in the rect for visibility calculations,
and padding and margin are accounted properly on them.

Differential Revision: https://phabricator.services.mozilla.com/D113853
2021-05-06 00:54:14 +00:00
Noemi Erli b7da3f34ee Backed out changeset f45996fe15b2 (bug 1618547) for causing failures in browser_ProcessPriorityManager.js CLOSED TREE 2021-05-06 00:53:54 +03:00
Nika Layzell e6838de735 Bug 1535913 - Orchestrate content BCG destruction from parent, r=farre
This should help avoid crashes caused when the content process has
already destroyed a BCG when the parent process hasn't yet. The BCG will
still be destroyed when the content process shuts down using normal
cycle-collection.

Differential Revision: https://phabricator.services.mozilla.com/D113828
2021-05-05 21:00:05 +00:00
Andrew McCreight 063f9001b0 Bug 1618547 - Support Fission in the process priority manager. r=kmag,gsvelto
With Fission, there can be multiple BrowserParents in a single tab, so
this patch moves the tracking of active tabs onto the top BrowsingContext
in a tab. If the priority of a top BC is changed, then the activity
of all of the BPs of the BCs in the tree are all adjusted. The flag
that tracks this state gets carried forward to the new BC in the case
of a cross-group navigation by the changes in ReplacedBy().

The other change here covers the case where we do a process-switching
navigation on an iframe. If we create a new BrowserParent with an active
top BC, then the BP gets marked as active in the priority manager. Doing
this tracking on the BP instead of the BC (both here in and in the part
that landed previously in BrowserParent::Deactivated()) means that we
don't need to track down every place that a BC switches processes.

I left the tracking of activity in ParticularProcessPriorityManager
centered around BrowserParents, instead of changing it to BCs, to
minimize the changes required. There are some tricky interactions there
with wakelocks that I didn't want to have to figure out.

browser_ProcessPriorityManager.js was set up to track a mapping of
browsers to priorities, but for the purposes of testing Fission support
I changed it to track a mapping of child IDs to priorities.

In the test, I also removed an assignment (this.window = null) that
didn't seem to be doing anything.

Differential Revision: https://phabricator.services.mozilla.com/D112213
2021-05-05 20:29:14 +00:00
Emilio Cobos Álvarez 1cdf344860 Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-05 09:41:24 +00:00
Iulian Moraru b21df91635 Backed out 3 changesets (bug 1680387) for causing browser chrome failures on browser_bug592641.js. CLOSED TREE
Backed out changeset 65616921e520 (bug 1680387)
Backed out changeset 51531850a9a2 (bug 1680387)
Backed out changeset 0c1c5e1f901b (bug 1680387)
2021-05-04 16:28:17 +03:00