Commit Graph

726217 Commits

Author SHA1 Message Date
Dão Gottwald
7183a3a857 Bug 1664203 - Send attribution request work for default tiles that became frecency tiles. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D90244
2020-09-15 12:21:29 +00:00
Jon Coppeard
2e7dd08c7c Bug 1664810 - Remove some dependencies of vm/EnvironmentObject.h r=jandem
Similar to previous patches, remove includes from EnvironmentObject.h where
possible and some of its uses.

Differential Revision: https://phabricator.services.mozilla.com/D90104
2020-09-15 12:54:09 +00:00
Jon Coppeard
d6d58f3b3d Bug 1664810 - Slim down AtomMarking includes r=sfink
Including SymbolType.h in AtomMarking.h pulls in a ton of vm includes. This
dependency can be moved to the -inl.h which used rarely.

Differential Revision: https://phabricator.services.mozilla.com/D90103
2020-09-15 11:04:31 +00:00
Jon Coppeard
a5d4574b7c Bug 1664810 - Remove dependencies on jit/MacroAssembler.h where possible r=jandem
This file is huge and pulls in a ton of includes. We can remove some of its
includes and a bunch of its uses too.

Differential Revision: https://phabricator.services.mozilla.com/D90102
2020-09-15 11:04:31 +00:00
Jon Coppeard
722d63f40b Bug 1664810 - Move internal helper thread definitions into a separate header file r=jandem
Currently HelperThreads.h defines all the internals of the helper thread
system, but most of this is only neeed by HelperThreads.cpp itself. This patch
splits that out into a separate file so that HelperThreads.h defines an API for
the helper thread system.

Differential Revision: https://phabricator.services.mozilla.com/D90101
2020-09-15 11:04:31 +00:00
Jon Coppeard
2f4a67969d Bug 1664810 - Remove TraceIncomingCCWs from the public API r=sfink
This is only used by ubinode and doesn't need to be in the public API. I
removed ZoneSet/CompartmentSet which are otherwise unneeded.

Differential Revision: https://phabricator.services.mozilla.com/D90100
2020-09-15 11:04:31 +00:00
Gijs Kruitbosch
0aa5254ee5 Bug 1662364 - use content principal as the triggering principal when opening external URIs from plugins, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D90191
2020-09-15 07:33:25 +00:00
Bryce Seager van Dyk
cd72e6b8ec Bug 1642735 - Suppress exceptions in ChromiumCDMProxy if we don't have MediaKeys. r=jbauman
When rejecting promises in ChromiumCDMProxy we pass an exception to MediaKeys to
represent the error that took place. However, if we do not have a any keys the
exception is not passed anywhere. Since these exceptions will assert on
destruction that they were handled we need to explicitly suppress the exception
when we don't have MediaKeys to avoid firing asserts.

The case we hit this issue in is during browser shutdown, so I think it makes
sense to ignore the exception. This is not a case of simply ignoring an
exception when it can be handled, this is that we're in a state where various
machinery is becoming unavailable and where it makes sense to not try and send
the exception any further.

Differential Revision: https://phabricator.services.mozilla.com/D90156
2020-09-15 12:32:45 +00:00
Andrei Oprea
1b0916b6c1 Bug 1664750 - Redirect users to about:home after they opt in to restore default settings r=nanj
Differential Revision: https://phabricator.services.mozilla.com/D90129
2020-09-14 19:49:21 +00:00
Csoregi Natalia
dd1efa8650 Backed out 5 changesets (bug 1664810) for build bustages on TestingFunctions.cpp. CLOSED TREE
Backed out changeset 8342bb37c478 (bug 1664810)
Backed out changeset 0cf50c9c75d9 (bug 1664810)
Backed out changeset b85512fd99e1 (bug 1664810)
Backed out changeset 99bd2cab97c8 (bug 1664810)
Backed out changeset 0d5cd8372bcb (bug 1664810)
2020-09-15 14:01:07 +03:00
Valentin Gosu
07362aeaa4 Bug 1663657 - Turn IsIpAddr* functions into NetAddr methods r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D89552
2020-09-15 10:39:56 +00:00
Valentin Gosu
7de4c8009c Bug 1525854 - TRR shouldn't fallback to DNS on DNSSEC error r=necko-reviewers,dragana
This patch adds support for the Extended DNS Errors draft code.
https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-extended-error-16

While not yet in the draft, it seems the OPT code for Extended DNS Error is 15
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11

The list of errors for which we hard fail isn't necessarily final.
I picked the errors that indicate a DNSSec failure, or an intentional
filtering done by the resolver.

Differential Revision: https://phabricator.services.mozilla.com/D87698
2020-09-15 10:39:07 +00:00
Valentin Gosu
8fac241692 Bug 1660970 - Get rid of DoHAddr r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D88121
2020-09-15 10:38:41 +00:00
Valentin Gosu
3e2712a46b Bug 1645108 - Parse additional section of TRR response r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D87088
2020-09-15 10:38:27 +00:00
Jon Coppeard
bc5cc1dd1b Bug 1664810 - Remove some dependencies of vm/EnvironmentObject.h r=jandem
Similar to previous patches, remove includes from EnvironmentObject.h where
possible and some of its uses.

Differential Revision: https://phabricator.services.mozilla.com/D90104
2020-09-15 10:32:29 +00:00
Jon Coppeard
337a3accde Bug 1664810 - Slim down AtomMarking includes r=sfink
Including SymbolType.h in AtomMarking.h pulls in a ton of vm includes. This
dependency can be moved to the -inl.h which used rarely.

Differential Revision: https://phabricator.services.mozilla.com/D90103
2020-09-15 10:30:29 +00:00
Jon Coppeard
1342723b78 Bug 1664810 - Remove dependencies on jit/MacroAssembler.h where possible r=jandem
This file is huge and pulls in a ton of includes. We can remove some of its
includes and a bunch of its uses too.

Differential Revision: https://phabricator.services.mozilla.com/D90102
2020-09-15 10:30:14 +00:00
Jon Coppeard
456115c547 Bug 1664810 - Move internal helper thread definitions into a separate header file r=jandem
Currently HelperThreads.h defines all the internals of the helper thread
system, but most of this is only neeed by HelperThreads.cpp itself. This patch
splits that out into a separate file so that HelperThreads.h defines an API for
the helper thread system.

Differential Revision: https://phabricator.services.mozilla.com/D90101
2020-09-15 10:29:29 +00:00
Jon Coppeard
f55613367d Bug 1664810 - Remove TraceIncomingCCWs from the public API r=sfink
This is only used by ubinode and doesn't need to be in the public API. I
removed ZoneSet/CompartmentSet which are otherwise unneeded.

Differential Revision: https://phabricator.services.mozilla.com/D90100
2020-09-15 10:27:57 +00:00
Dão Gottwald
3bc9f5a61d Bug 1664502 - Disable canonical URL conversion for search shortcuts when using default top sites from remote settings. r=mikedeboer
Remote Settings still support search shortcuts for the time being but it's considered an obsolete feature that we don't intend to use.

Differential Revision: https://phabricator.services.mozilla.com/D90122
2020-09-15 08:38:42 +00:00
Jonathan Kew
9ed4473651 Bug 1664530 - Use WithDefaultDevMode() helper in nsPrinterWin::GetMarginsForPaper. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D90180
2020-09-15 10:14:52 +00:00
Timothy Nikkel
0dabf9ce91 Bug 1664419. Need to suppress scrollbar repaint when seting visual viewport offset. r=kats,botond
In ScrollFrameHelper::ScrollToImpl we suppress repainting scrollbars when calling UpdateScrollbarPosition if we've decided not to schedule a paint (because we are sending a pending scroll update instead). Otherwise we repaint which is what we are trying to avoid.

The desktop zooming scrollbars code added a call to UpdateScrollbarPosition in SetVisualViewportOffset because the vv offset is what determines the scrollbar position, no longer the layout scroll position. This means that we can trigger a repaint via that path, and there is a test that checks that we don't.

This patch moves the SetVisualViewportOffset call to just after the code that determines if we need to schedule a paint (it was just before it), and then add the AutoScrollbarRepaintSuppression class.

Differential Revision: https://phabricator.services.mozilla.com/D89902
2020-09-14 21:38:25 +00:00
Gijs Kruitbosch
90b9ab56dc Bug 1663499 - fix ending webbrowserpersist downloading so it only happens once, r=valentin
This fixes a few causes of firing EndDownload twice:

1. firing it from OnDataAvailable if the download was already canceled when the
   method was initially invoked, rather than if we are ourselves wanting to
   cancel the download because we encountered issues inside OnDataAvailable.
2. firing it from FinishDownload, dispatched from SerializeNextFile, after the
   download has already been ended elsewhere.
3. calling Cancel() multiple times.

It also adds some code to avoid the re-entrancy on the Promise code that the
bug was originally filed for, and a diagnostic assert to check if there are any
other cases of repeated EndDownload calling that we've missed.

As a driveby, it adds a few thread assertions to help with code clarity.

Differential Revision: https://phabricator.services.mozilla.com/D90186
2020-09-15 07:17:00 +00:00
Noemi Erli
efb7727779 Backed out 2 changesets (bug 1664735) for causing failures in repeating-conic-gradient.html CLOSED TREE
Backed out changeset 5219686dc465 (bug 1664735)
Backed out changeset b9ca78d0a835 (bug 1664735)
2020-09-15 12:33:35 +03:00
Emilio Cobos Álvarez
d94923f235 Bug 1664685 - Simplify HTML{Image,Input}Element.{width,height} getters. r=edgar
By moving it to nsImageLoadingContent we don't need to pass a reference
to the current request and can just use the member.

The weird reference-passing was introduced in bug 987140 and broke in
bug 1534608.

Also make it return a CSSIntSize rather than an nsSize, since it's what
it returns, nsSize is supposed to be in app units, not in CSS pixels :-)

Differential Revision: https://phabricator.services.mozilla.com/D90036
2020-09-15 09:04:59 +00:00
Paul Adenot
f0eeac36f0 Bug 1662805 - Don't consider a stream audible if it has never been audible. r=pehrsons
Depends on D90110

Differential Revision: https://phabricator.services.mozilla.com/D90111
2020-09-15 09:01:42 +00:00
Paul Adenot
d8d6a524f7 Bug 1662805 - Make a test file longer. r=pehrsons
This is now a 20 second file.

Depends on D89636

Differential Revision: https://phabricator.services.mozilla.com/D90110
2020-09-15 09:01:29 +00:00
Paul Adenot
f94544f988 Bug 1662805 - Make the silence duration before a tab is considered inaudible configurable. r=pehrsons
Depends on D89635

Differential Revision: https://phabricator.services.mozilla.com/D89636
2020-09-15 09:01:16 +00:00
Paul Adenot
2f461c2326 Bug 1662805 - Replace instantaneous audibility decisions for MediaStream and regular playback with the AudibilityMonitor. r=pehrsons
Depends on D89634

Differential Revision: https://phabricator.services.mozilla.com/D89635
2020-09-15 09:00:57 +00:00
Paul Adenot
1db6a3923f Bug 1662805 - Extract the sample-rate decision for an AudioSink to its own function, in the same way it is done for the channel count. r=pehrsons
Depends on D89633

Differential Revision: https://phabricator.services.mozilla.com/D89634
2020-09-15 09:00:33 +00:00
Paul Adenot
1c62900c16 Bug 1662805 - Introduce an AudibilityMonitor to determine if an audio stream is considered audible. r=pehrsons
Depends on D89390

Differential Revision: https://phabricator.services.mozilla.com/D89633
2020-09-15 09:00:15 +00:00
Paul Adenot
6abe53e8ff Bug 1662805 - Don't freeze a tab when it's playing back audio. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89390
2020-09-15 09:00:05 +00:00
Paul Adenot
29b9613021 Bug 1520788 - Reenable mediacapture-streams/MediaStreamTrack-getCapabilities.https.html on Linux. r=pehrsons
r?jgraham,jib,pehrsons

Differential Revision: https://phabricator.services.mozilla.com/D90121
2020-09-15 08:54:20 +00:00
Paul Adenot
5333662fb3 Bug 1664772 - Fix clang-tidy/clang-format/coverity issues in VideoUtils.cpp. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D90083
2020-09-15 08:29:06 +00:00
Paul Adenot
5e645a28b9 Bug 1664755 - Fix typo in dummy android device enumeration code. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D90076
2020-09-14 18:58:04 +00:00
Masayuki Nakano
620c728792 Bug 1658702 - part 10: Implement a path to compute target ranges when joining 2 blocks from current block boundary r=m_kato
This patch corresponds to:
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#3525-3543
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#2710-2719
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#4140-4165
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/HTMLEditSubActionHandler.cpp#5650-5716
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/WSRunObject.cpp#97-213
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/WSRunObject.cpp#218-386
* https://searchfox.org/mozilla-central/rev/2b250967a66886398e5e798371484fd018d88a22/editor/libeditor/WSRunObject.cpp#391-480

In `WSRunObject.cpp`, joining 2 blocks code is split to 3 methods, they are
for:

1. left block element is an ancestor of right block element
2. right block element is an ancestor of left block element
3. left block element and right block element are siblings

The reason why they are split to is, they need to move descendants of child
block element or right block element with different logic.  However, this
difference is not a big problem when we compute target ranges because only
the difference is where we need to check whether there are invisible white-
spaces.  Therefore, this patch creates only a utility method in `WSRunScanner`
and makes `AutoInclusiveAncestorBlockElementsJoiner::ComputeRangesToDelete()`
much simpler than `AutoInclusiveAncestorBlockElementsJoiner::Run()`.

Differential Revision: https://phabricator.services.mozilla.com/D89278
2020-09-11 06:24:08 +00:00
Masayuki Nakano
d060d644d6 Bug 1663797 - Make delete handler of HTMLEditor not try to join <html>, <head> and <body> r=m_kato
It'll fail to join them when its utility methods actually join them.
However, it should be considered earlier timing because the preparation
DOM tree changes before joining them causes creating odd tree (see the
removed cases of the test).  Therefore, we should make them stop handling
deletion before modifying the DOM tree.

Depends on D89579

Differential Revision: https://phabricator.services.mozilla.com/D89580
2020-09-15 07:33:58 +00:00
Junior Hsu
ec6be89428 Bug 1655895 - do not set a timer for neqo passed a UINT64::MAX, r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D85234
2020-08-24 17:23:00 +00:00
Emilio Cobos Álvarez
2d4dbdf603 Bug 1654323 - Use GtkTextView.text.selection to get selection colors in GTK. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D84814
2020-09-15 06:59:14 +00:00
Lee Salzman
e5ff26cbb8 Bug 1664735 - support vectorized texelFetchPtr. r=mattwoodrow
Gradient shaders end up calling fetch_from_gpu_cache_2 with a vectorized
address. This currently disables SWGL texelFetchPtr optimization for repeated
uses of texelFetchOffsets. In principle this optimization can still work in
vector mode. We just need to use an I32 instead of a direct pointer into the
buffer in this case. I've added a texelFetchUnchecked wrapper to automagically
disambiguate between scalar and vector cases.

Differential Revision: https://phabricator.services.mozilla.com/D90059
2020-09-15 07:44:47 +00:00
Lee Salzman
eeefca1cca Bug 1664735 - micro-optimizations for WR sample_gradient. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90054
2020-09-15 07:44:36 +00:00
Emilio Cobos Álvarez
c06997e522 Bug 1661402 - Make nsIStreamLoader.numBytesRead safe to call from any thread. r=necko-reviewers,valentin
Right now it uses mData, which is modified from another thread from
OnDataAvailable.

Prevent the race and even simplify the code a bit by keeping the bytes
read separately.

Relaxed atomics are fine for these, they don't guard any memory.

Differential Revision: https://phabricator.services.mozilla.com/D90155
2020-09-15 07:19:37 +00:00
Christoph Kerschbaumer
c18ba9eea8 Bug 1145314: Increase expected assertion range to 9 for test_bug995943.xhtml on Linux. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D82145
2020-09-15 07:30:26 +00:00
Christoph Kerschbaumer
ed4fe6b936 Bug 1145314: Lock down CheckLoadURIFlags by dropping the check that lets any URI_IS_UI_RESOURCE URL link to any other URL with that flag. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D80601
2020-09-15 07:30:26 +00:00
Masayuki Nakano
7effeb6cde Bug 1663370 - part 9: Make AutoInclusiveAncestorBlockElementsJoiner::Prepare() consider whether it will NOT join the elements or not r=m_kato
This makes `AutoInclusiveAncestorBlockElementsJoiner` stores whether `Run()`
will return "ignored" or not when `Prepare()` is called.  And this patch adds
`NS_ASSERTION()` to compare the result of `Run()` and the guess.

Note that this shouldn't used for considering whether its user call or not
`Run()` actually for the risk of regressions and if we do it with current
implementation, some web apps may be broken if they do modify the DOM tree
at white-space adjustment before joining the left and right block elements.

The method will be used by `ComputeTargetRanges()` which will be implemented
by bug 1658702.

Depends on D89578

Differential Revision: https://phabricator.services.mozilla.com/D89579
2020-09-15 06:07:01 +00:00
Masayuki Nakano
9ed84efbc7 Bug 1663370 - part 8: Make AutoInclusiveAncestorBlockElementsJoiner::Prepare() scan preceding invisible <br> element r=m_kato
When its `Run()` join the block elements, even if it won't move any content
nodes in first line, it may notify the callers as "handled" when there is a
preceding invisible `<br>` element since it needs to delete it in any cases.
Therefore, whether there is or not a preceding invisible `<br>` element is
important to compute target ranges since if there is one, `Run()` won't return
"ignored" and the callers won't delete leaf content instead.

Note that the new assertions are not hit in any tests, but due to searching
preceding invisible `<br>` element in `Prepare()`, expected assertion
count of 2 tests is increased.

Depends on D89577

Differential Revision: https://phabricator.services.mozilla.com/D89578
2020-09-14 13:35:42 +00:00
Masayuki Nakano
4a6cf53eeb Bug 1663370 - part 7: Make AutoInclusiveAncestorBlockElementsJoiner::Prepare() check the relation of its mLeftBlockElement and mRightBlockElement r=m_kato
The relation is important when the class handles both joining them and computing
target ranges.  Additionally, it's required to consider whether it can join the
block elements.  So, it should store the relation when `Prepare()` is called.

Depends on D89576

Differential Revision: https://phabricator.services.mozilla.com/D89577
2020-09-14 11:40:34 +00:00
Masayuki Nakano
da0f19a5f3 Bug 1663370 - part 6: Create a method to check whether HTMLEditor::MoveOneHardLineContents() returns "handled" or "canceled" r=m_kato
Unfortunately, `HTMLEditor::MoveOneHardLineContents()`,
`HTMLEditor::MoveChildrenWithTransaction()` and
`HTMLEditor::MoveNodeOrChildrenWithTransaction()` return strict result whether
at least one node is moved or not.  Therefore, we need to scan the DOM tree
whether there is at least one content node which can be moved by them for
computing target ranges.

We cannot do same thing for ``HTMLEditor::MoveOneHardLineContents()` because
it split parent elements first and use `ContentSubtreeIterator` which lists
up topmost nodes which are completely in the range, but we need to compute
target ranges without splitting nodes at the range boundaries.  Therefore,
this patch checks whether the line containing specified point has content
except invisible `<br>` element.

The others are simple.  We can use same logic with them.

Finally, this adds `NS_ASSERTION()`s to check whether the computation is done
correctly at running any automated tests on debug build, and I don't see any
failure with them.

Depends on D89575

Differential Revision: https://phabricator.services.mozilla.com/D89576
2020-09-14 10:54:42 +00:00
Masayuki Nakano
6355f06829 Bug 1663370 - part 5: Make helper methods of AutoInclusiveAncestorBlockElementsJoiner::Run() use simple constructor of EditActionResult when they return error r=m_kato
When they return error, neither "handled" nor "canceled" state is referred.
So, for making the code simpler, we can make them return
`EditActionResult(NS_ERROR_*)` instead of `EditActionIgnored(NS_ERROR_*)`.

Depends on D89574

Differential Revision: https://phabricator.services.mozilla.com/D89575
2020-09-14 07:25:08 +00:00
Masayuki Nakano
f081792788 Bug 1663370 - part 4: Sort out "handled" state settings around AutoInclusiveAncestorBlockElementsJoiner users r=m_kato
The 2 of them always mark the edit action as "handled", but it's not important
when it's "canceled" or an error.  Therefore, we can make the users simpler
as this patch does.

Depends on D89573

Differential Revision: https://phabricator.services.mozilla.com/D89574
2020-09-14 05:07:48 +00:00