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

22163 Коммитов

Автор SHA1 Сообщение Дата
Henri Sivonen d5b9be12ce Bug 1603712 - Remove intl.charset.detector.ng.enabled pref and resulting dead code. r=Gijs,fluent-reviewers,valentin,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D79101
2020-06-15 15:32:21 +00:00
Emilio Cobos Álvarez e5fe143835 Bug 1599160 - Better integration of the shared stylesheet cache with the network cache. r=tnikkel,mayhemer,heycam
Make the stylesheet cache respect the same headers as the image cache
does. This makes no-cache stylesheets work as they do now, which is
useful for developers that want to develop sites locally, and for
shift-reloads, etc.

Differential Revision: https://phabricator.services.mozilla.com/D78659
2020-06-12 19:06:04 +00:00
Emilio Cobos Álvarez f3e71a1931 Bug 1599160 - Allow caching stylesheets across documents. r=heycam
This patch implements a per-process cache of parsed stylesheets for
non-inline sheets. The entries are evicted when the document gets
destroyed and there's no other document with the same principal around.

This works fine in practice even when navigating because CC happens
pretty late, but we could add an extra timer if we deem it worth it.

I had to adapt some tests so that they keep passing. They were already
clearing various image / network caches so it seems fine to also clear
this one.

Note that there's a very subtle change in the load data key: We only
miss the cache if the referrer _policy_ is different, not if the
referrer is different. While that is slightly dubious, that is the only
think that makes this effort somewhat worth it. Otherwise stylesheets
would have to be re-fetched if the referrer is different, which
effectively would mean to re-parse it if the document URI is different,
which is bad.

It seems like the network cache only keys on the referrer policy, so it
seems fine to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D77457
2020-06-12 19:31:32 +00:00
Mirko Brodesser 218169fc69 Bug 1643721: part 15) Add assertion to `SerializeRangeNodes`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79483
2020-06-15 09:46:33 +00:00
Mirko Brodesser 416cfa18e7 Bug 1643721: part 14) Change `SerializeToStringRecursive`'s `aDontSerializeRoot` to `enum class SerializeRoot` and drop negation. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79482
2020-06-15 09:48:06 +00:00
Simon Giesecke 0735ecafd8 Bug 1645382 - Remove unnecessary arguments from NS_OBSERVER_ARRAY_NOTIFY_* macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79485
2020-06-15 09:05:00 +00:00
Simon Giesecke 298981065e Bug 1645339 - Use range-based for with nsTObserverArray in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79484
2020-06-15 08:55:27 +00:00
Emilio Cobos Álvarez ffec6f608b Bug 1643656 - Remove prefers-color-scheme: no-preference. r=gl,remote-protocol-reviewers,hiro,whimboo
It was removed from the spec.

Differential Revision: https://phabricator.services.mozilla.com/D78834
2020-06-14 23:26:04 +00:00
Logan Smyth 25d491b792 Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug
The 'asyncStack' flag on JS execution contexts is used as a general switch
to enable async stack capture across all locations in SpiderMonkey, but
this causes problems because it can at times be too much of a performance
burden to general and track all of these stacks.

Since the introduction of this option, we have only enabled it on Nightly
and DevEdition for non-mobile builds, which has left a lot of users unable
to take advantage of this data while debugging.

This patch enables async stack traces across all of Firefox, but introduces
a new pref to toggle the scope of the actual expensive part of async stacks,
which is _capturing_ them and keeping them alive in memory. The new pref
limits the capturing of async stack traces to only debuggees, unless an
explicit pref is flipped to capture async traces for all cases.

This means that while async stacks are technically enabled, and code could
manually capture a stack and pass it back to SpiderMonkey and see that stack
reflected in later captured stacks, SpiderMonkey itself and related async
DOM APIs, among others, will not capture stacks or pass them to SpiderMonkey,
so there should be no general change in performance by enabling the broader
feature itself, unless the user is actively debugging the page.

One effect of this patch is that if you have the debugger open and then close
it, objects that have async stacks associated with them will retain those
stacks and they will continue to show up in stack traces, no _new_ stacks
will be captured. jorendorff and I have decided that this is okay because
the expectation that the debugger fully revert every possible effect that it
could have on a page is a nice goal but not a strict requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68503
2020-06-14 02:41:45 +00:00
Karl Tomlinson 209a34c2b7 Bug 1642849 shut down MediaTrackGraph from AudioContext when window will be destroyed r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D74814
2020-06-12 03:53:34 +00:00
Narcis Beleuzu e8980a61ec Backed out changeset edfbe6020f30 (bug 1640441) for wpt failure on inferred-mrow-baseline.html . CLOSED TREE 2020-06-13 01:44:30 +03:00
Kris Maglione 391fb42766 Bug 1644439: Don't force frame loader initialization during reflow from focus manager. r=hsivonen
When trying to get the current focused element during reflow, when the current
focused element in the document is a frame which has yet to be initialized,
attempting to walk through that frame's BrowsingContext causes immediate frame
loader initialization. Since frame loader initialization often requires running
scripts, that's unsafe, which is why we defer initialization until the end of
any in-progress reflow or document update.

This patch fixes the focus manager code to ignore any uninitialized frame
loaders it comes across, since by definition they cannot have any
currently-focused element until their subdocuments have been created.

Differential Revision: https://phabricator.services.mozilla.com/D79392
2020-06-12 10:22:56 +00:00
Emilio Cobos Álvarez 2ecda03866 Bug 1640441 - Don't do fancy floating point precision shenanigans on DOMRect::SetLayoutRect. r=dholbert
There are some issues with this code. It's using doubles, but SetRect
only takes floats, so we lose precision there already. Instead of
getting fancy, use the same conversion that the rest of Gecko uses, so
that pages that compute style values out of getBoundingClientRect values
don't get minor floating point changes.

Differential Revision: https://phabricator.services.mozilla.com/D79326
2020-06-12 18:57:15 +00:00
Narcis Beleuzu a8dde16e58 Backed out 10 changesets (bug 1508306, bug 1640019) for bc failures on browser_autoOpen.js . CLOSED TREE
Backed out changeset 8844170ff408 (bug 1508306)
Backed out changeset b750f1d873cf (bug 1508306)
Backed out changeset c7170e76e676 (bug 1640019)
Backed out changeset 5905995e4815 (bug 1640019)
Backed out changeset 7bf86513348e (bug 1640019)
Backed out changeset f7d0605295f7 (bug 1640019)
Backed out changeset 521b4d5a9a89 (bug 1640019)
Backed out changeset 8542edc564bc (bug 1640019)
Backed out changeset 4f6a03152526 (bug 1640019)
Backed out changeset 30d2bf04719b (bug 1640019)
2020-06-12 22:47:50 +03:00
Olli Pettay 4aaccd7b6e Bug 1645109 - handle the case when contentlist is modified while iterating it, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D79523
2020-06-12 18:04:16 +00:00
Nika Layzell 47c0aeb539 Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-12 16:52:13 +00:00
Nika Layzell 6069ccac68 Bug 1640019 - Part 5: Remove a number of now-unused 'updateBrowserRemoteness' parameters, r=Gijs
These were only used by process switches triggered via DocumentChannel, which
now take the PROCESS_BEHAVIOR_STANDARD codepath.

Differential Revision: https://phabricator.services.mozilla.com/D78973
2020-06-12 16:52:04 +00:00
Nika Layzell a97cf42257 Bug 1640019 - Part 3: Also allow switching between remote and non-remote, r=mattwoodrow,necko-reviewers,valentin
Due to the PPDC process switching changes, we also handle switching between
remote and non-remote browsers with DocumentLoadListener. Adds support to
CanonicalBrowsingContext::ChangeFrameRemoteness to allow it to handle non-remote
browsers as well.

Differential Revision: https://phabricator.services.mozilla.com/D78971
2020-06-12 16:52:01 +00:00
Nika Layzell aaf6c3a006 Bug 1640019 - Part 2: Use new process switch logic in tabbrowser, r=mattwoodrow,Gijs
Add a series of extra hooks and methods to allow tabbrowser to use the new
process switching codepath. This duplicates some of the logic from
`updateBrowserRemoteness` into event handlers.

Differential Revision: https://phabricator.services.mozilla.com/D78970
2020-06-12 16:52:01 +00:00
Nika Layzell e999957c00 Bug 1640019 - Part 1: Support toplevel process switches outside of tabbrowser, r=mattwoodrow
This new process switching behavior is only enabled for some browser elements,
which have specified a specific attribute. Turning this on for all browsers with
a `remote` attribute causes breakage in reftests.

The initial version does not handle switching from remote to parent or
vice-versa, that is covered in a later part.

Differential Revision: https://phabricator.services.mozilla.com/D78969
2020-06-12 16:52:00 +00:00
Olli Pettay 2223b8660b Bug 1643677, ensure mServiceNotifier is still there when handling EventSource messages, and add some assertions, r=FarooqAR
Some existing tests crash if we just add the assertions and the rest of the patch
fixes those.

mServiceNotifier is now created always on the main thread and used only on the target thread.
And use of it is protected by the mutex so that at the same time when it is created, target thread
can't try to delete it.

Differential Revision: https://phabricator.services.mozilla.com/D79269
2020-06-12 16:57:48 +00:00
Tim Huang eab7aa2b87 Bug 1587743 - Part 1: Pre-compute the delegated permissions for the top-level content and store it in the WindowContext. r=baku,nika
In order to delegate the permission to the top-level window, in this
patch, we pre-compute the permissions of the top-level context and set
them to the top-level WindowContext. So, the cross-origin iframe can
know the permission of the top-level window through the WindowContext.
Thus, the permission can be delegated in Fission.

Differential Revision: https://phabricator.services.mozilla.com/D79132
2020-06-12 16:31:49 +00:00
Emilio Cobos Álvarez 0f9181c73b Bug 1642922 - Tweak scroll-padding implementation to also account for visibility. r=hiro
The previous implementation made us think that stuff was visible when in
fact it was not.

Differential Revision: https://phabricator.services.mozilla.com/D79345
2020-06-11 21:24:33 +00:00
Mirko Brodesser eaaddb5b70 Bug 1643721: part 13) Factor serializing a text node out. r=masayuki
Reduces code duplication.

Differential Revision: https://phabricator.services.mozilla.com/D79422
2020-06-12 12:19:17 +00:00
Mirko Brodesser 6500f1b555 Bug 1643721: part 12) Hide some details of `SerializeRangeToString` in `HasInvisibleParentAndShouldBeSkipped`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79421
2020-06-12 12:19:09 +00:00
Mirko Brodesser 14de6b6aef Bug 1643721: part 11) Privatize member of `RangeContextSerializer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79289
2020-06-12 09:02:21 +00:00
Mirko Brodesser 9e6d7fa0b2 Bug 1643721: part 10) Privatize most members of `RangeSerializer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79288
2020-06-12 08:54:41 +00:00
Mirko Brodesser 5410d5645c Bug 1643721: part 9) Remove redundant `mRangeNodeContext` from `RangeSerializer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79120
2020-06-12 08:54:33 +00:00
Mirko Brodesser 940c150e93 Bug 1643721: part 8) Move `SerializeRangeToString` to `RangeSerializer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79119
2020-06-12 08:54:31 +00:00
Mirko Brodesser 01d1a49b83 Bug 1643721: part 7) Move `mCommonInclusiveAncestors` to `RangeSerializer`. r=masayuki
Preparation for moving `SerializeRangeToString` to `RangeSerializer`.

Differential Revision: https://phabricator.services.mozilla.com/D79118
2020-06-12 08:54:23 +00:00
Mirko Brodesser 9b5aaa3706 Bug 1643721: part 6) Move `SerializeRangeContextStart` (End) to `RangeContextSerializer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79115
2020-06-12 08:54:16 +00:00
Mirko Brodesser 80f08c9c32 Bug 1643721: part 5) Factor `RangeContextSerializer` out from `nsDocumentEncoder`. r=masayuki
Preparatory step to move `SerializeRangeContextStart` (End) to it.

Differential Revision: https://phabricator.services.mozilla.com/D79114
2020-06-12 08:54:09 +00:00
Mirko Brodesser 7773330726 Bug 1643721: part 4) Move `SerializeRangeNodes` to `RangeSerializer`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79113
2020-06-12 08:54:01 +00:00
Mirko Brodesser 4ec81aed90 Bug 1643721: part 3) Factor initializing `mRangeSerializer`'s members out to `RangeSerializer::Initialize`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D79112
2020-06-12 08:53:54 +00:00
Mirko Brodesser 56c83e7372 Bug 1643721: part 2) Add `RangeNodeContext` to `nsDocumentEncoder` and `RangeSerializer`. r=masayuki
Preparatory step to move `SerializeRangeNodes` to `RangeSerializer`.

Differential Revision: https://phabricator.services.mozilla.com/D79111
2020-06-12 08:53:46 +00:00
Mirko Brodesser 639b890fdd Bug 1643721: part 1) Factor range serialization state from `nsDocumentEncoder` out to `RangeSerializer`. r=masayuki
Preparation to move `SerializeRangeNodes` to `RangeSerializer`.

Differential Revision: https://phabricator.services.mozilla.com/D79110
2020-06-12 08:53:39 +00:00
Karl Tomlinson 083e8d5a3e Bug 1644647 - remove waits for suspend and resume completion added to workaround bug 1198386 r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D76808
2020-06-12 02:38:08 +00:00
Jean-Yves Avenard a9c086bd35 Bug 1644009 - P11. Make DocGroup's LabellingEventTarget implement nsIDirectTaskDispatcher. r=farre
It will simply forward the interface to the main thread.
This is the final step required to remove AbstractThread support here.

Differential Revision: https://phabricator.services.mozilla.com/D79095
2020-06-12 05:10:40 +00:00
Kartikaya Gupta 53bb433533 Bug 1644271 - Move the innerWidth/Height overriding behavior to be conditional on a more appropriate check. r=tnikkel
This code really cares about the case with a CSS viewport, which is only
activated with mobile viewport sizing.

Differential Revision: https://phabricator.services.mozilla.com/D79228
2020-06-12 01:15:03 +00:00
Razvan Maries 7b30d6e82e Backed out 7 changesets (bug 1599160) for damp failures. CLOSED TREE
Backed out changeset edb0e17f3c98 (bug 1599160)
Backed out changeset 64b42ac358e6 (bug 1599160)
Backed out changeset ce1521b895e1 (bug 1599160)
Backed out changeset 0b0ff0ad8db7 (bug 1599160)
Backed out changeset c7ef05dae614 (bug 1599160)
Backed out changeset 466cfd0ad5db (bug 1599160)
Backed out changeset b3f28494f0e7 (bug 1599160)
2020-06-12 02:40:38 +03:00
Razvan Maries 4bf4433330 Backed out changeset 2f06b26075f3 (bug 1643677) for mochitest perma cailures on test_eventsourceservice_worker.html. CLOSED TREE 2020-06-11 20:14:33 +03:00
Dorel Luca 255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
Olli Pettay 93b916d5f8 Bug 1643677, ensure mServiceNotifier is still there when handling EventSource messages, and add some assertions, r=FarooqAR
...and be still super safe by adding null checks.

Some existing tests crash if we just add the assertions and the rest of the patch
fixes those.

Differential Revision: https://phabricator.services.mozilla.com/D79269
2020-06-11 14:35:32 +00:00
Nika Layzell 35969e149c Bug 1644797 - Add a WindowContext getter to Document, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D79160
2020-06-11 11:19:14 +00:00
Emilio Cobos Álvarez 5048e0ec84 Bug 1599160 - Better integration of the shared stylesheet cache with the network cache. r=tnikkel,mayhemer,heycam
Make the stylesheet cache respect the same headers as the image cache
does. This makes no-cache stylesheets work as they do now, which is
useful for developers that want to develop sites locally, and for
shift-reloads, etc.

Differential Revision: https://phabricator.services.mozilla.com/D78659
2020-06-11 11:42:01 +00:00
Emilio Cobos Álvarez 208b60eed2 Bug 1599160 - Allow caching stylesheets across documents. r=heycam
This patch implements a per-process cache of parsed stylesheets for
non-inline sheets. The entries are evicted when the document gets
destroyed and there's no other document with the same principal around.

This works fine in practice even when navigating because CC happens
pretty late, but we could add an extra timer if we deem it worth it.

I had to adapt some tests so that they keep passing. They were already
clearing various image / network caches so it seems fine to also clear
this one.

Note that there's a very subtle change in the load data key: We only
miss the cache if the referrer _policy_ is different, not if the
referrer is different. While that is slightly dubious, that is the only
think that makes this effort somewhat worth it. Otherwise stylesheets
would have to be re-fetched if the referrer is different, which
effectively would mean to re-parse it if the document URI is different,
which is bad.

It seems like the network cache only keys on the referrer policy, so it
seems fine to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D77457
2020-06-11 11:42:46 +00:00
Emilio Cobos Álvarez ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
Kagami Sascha Rosylight ea53f4857d Bug 1644868 - Return pointer from GetPrimaryFrameFor* r=jfkthame
Those methods have two sources to check after call: the return value and the pointer. This can be confusing as a caller may think they should check both when they don't need to. Since the two always behaves together (a valid pointer + NS_OK, or nullptr + NS_ERROR_FAILURE), this replaces the return value with the pointer.

Differential Revision: https://phabricator.services.mozilla.com/D79196
2020-06-11 10:56:11 +00:00
Jeff Gilbert cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Mihai Alexandru Michis 59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00