Slightly different from the previous search revisions. In this case, rather than having their own search boxes, the recent browsing components share a single search box located within the parent element. Thus, `fxview-search-textbox-query` event listeners are added/removed from the //parent// component rather than the components themselves.
Differential Revision: https://phabricator.services.mozilla.com/D195596
This patch makes the protection dashboard recognize the suspicious
fingerprinter ID in the ContentBlockingLog and aggregate the number to
the fingerprinter category.
Differential Revision: https://phabricator.services.mozilla.com/D194863
This patch introduces a new category SUSPICIOUS_FINGERPRINTERS_ID to the
nsITrackingDBService. We record this category when we detect suspicious
fingerprinting behaviors.
Differential Revision: https://phabricator.services.mozilla.com/D194134
There is a meta annotation for content-visibility-030.html on linux, but the test works completely now.
This patch removes the unnecessary meta annotations
Differential Revision: https://phabricator.services.mozilla.com/D193758
Make it be output-only, not having that confusing in-out tab-index
parameter that is special for XUL to become focusable with
-moz-user-focus: normal. Instead, do that explicitly in
nsIFrame::IsFocusable().
Also, call it IsFocusableWithoutStyle(), since that's what it is.
Differential Revision: https://phabricator.services.mozilla.com/D195644
The change removes dependency on WebRenderImageHost and RemoteTextureInfoList in AsyncImagePipelineManager::UpdateImageKeys().
Differential Revision: https://phabricator.services.mozilla.com/D195842
In many cases, using CONFIG["CPU_ARCH"] will silently do the unexpected
thing now that it doesn't exist anymore. In case there are in-flight
patches using it, it's better to avoid those causing subtle problems
after a rebase by making most uses of the variable throw an exception.
Differential Revision: https://phabricator.services.mozilla.com/D195158
These thresholds were chosen based on local benchmarking results.
In general all macOS systems I've tested perform great and the 4MB threshold is
because none of the benchmarks I used have a heap smaller than that.
Recent Windows and Linux results are also better than previously although not
as good as macOS.
I haven't done any more Android benchmarking recently so I'm using the same
value as for Linux. We're not going to enable this on Android without specific
performance work there first.
For reference, according to telemetry about 10% of our GCs have < 1MB heap size
(the minimum size captured by telemetry). A 4MB threshold excludes 11.4% of
GCs, 8MB 14.3% and 16MB 24% of GCs.
Differential Revision: https://phabricator.services.mozilla.com/D195629
And don't allow new request being associated with existing pending request if
the requests are from different origin.
This patch also set proper principal to nsItransferable for clipboard write in
various cases,
- Copy image via context menu.
- Copy current selection via keyboard shortcut or context menu.
- Data is provided by script when copy operation is triggered via keyboard
shortcut or context menu.
- Clipboard data is put via async clipboard.
Depends on D190761
Differential Revision: https://phabricator.services.mozilla.com/D190796
Displaying the paste context menu for background tabs can be surprising and
confusing for users, so we reject the request and don't allow it being associated
with existing pending request.
Depends on D190405
Differential Revision: https://phabricator.services.mozilla.com/D190761
This patch creates a `media.ffmpeg.encoder.enabled` pref for enabling
FFmpegVideoEncoder with defualt value set to `false`, so
FFmpegVideoEncoder won't be activated in the webrtc cases.
Depends on D195739
Differential Revision: https://phabricator.services.mozilla.com/D195740
Since the current Encode API is implemented by the modern APIs
introduced in ffmpeg 58, the encoder functionalities should be limited
by the version accordingly.
Depends on D195380
Differential Revision: https://phabricator.services.mozilla.com/D195381
This patch implements drain function based on avcodec_send_frame and
avcodec_receive_packet, similar to what Encode function did.
Thus, it only works when ffmpeg version is at least 58.
It's worth mentioning that the encoder cannot continue encoding once it
enters draining mode, due to API limitation. Users need to encode data
after draining are encouraged to create a new encoder.
Still, the alternative does exist. If AV_CODEC_CAP_ENCODER_FLUSH is set
in the AVCodec's capabilities of the AVCodecContext, then
`avcodec_flush_buffers` can be used to flush or drain all the encoded
data without explicitly entering draining mode, instead of sending a
NULL to the `avcodec_send_frame`. However, since this flag is not set
when using the libvpx encoder (at least on my machine), this approach is
put to the backlog.
With the Drain implementation, the patches so far can be tested with the
additional tests below:
1. MediaDataEncoderTest.VP8Encodes
2. MediaDataEncoderTest.VP9Encodes
via the following command:
```
MOZ_LOG="FFmpegVideo:5" ./mach gtest MediaDataEncoderTest.*
```
Those tests can check the sanity of Encode() and Drain().
Depends on D195378
Differential Revision: https://phabricator.services.mozilla.com/D195379
This patch completes the encoding functionality. It implements a
function copying AVPacket's data to a MediaRawData. Accordingly, the
main encode function can return the encoded data properly.
Depends on D195620
Differential Revision: https://phabricator.services.mozilla.com/D195377
This patch partially implements the encoding. The following patches will
complete it. This patch focuses on how to send the given VideoData to
the underlying encoder, receive the encoded results, then convert them
into the expected format. To outline the whole process in this patch, a
dummy function is added to convert the encoded results into the expected
output format, MediaRawData, without implementation. It will be done in
the following patch.
In addition, this patch only addresses YUV/NV images. Handling of
RGB-type images will be addressed in the next patch.
Most notably, the encoding code here is based on avcodec_send_frame and
avcodec_receive_packet, which were introduced in FFmpeg 58. If the
ffmpeg version is smaller than 58, the encoder returns error for now
(The encode implementation for older ffmpeg is tracked in bug 1868253).
Depends on D195057
Differential Revision: https://phabricator.services.mozilla.com/D195328
This patch creates two functions to initialize and uninitialize the
AVFrame that will be fed to the underlying encoder as an input.
Depends on D195056
Differential Revision: https://phabricator.services.mozilla.com/D195057
avcodec_open2 is not thread-safe until version 60 [1]. Besides, even it
claims to be thread-safe now, data race can appear in situations [2, 3].
To accommodate order FFmpeg versions, opening/closing the AVCodecContext
in a critical section is the simplest way to avoid data race issues.
The following related tests:
1. MediaDataEncoderTest.VP8Create
2. MediaDataEncoderTest.VP8Inits
3. MediaDataEncoderTest.VP9Create
4. MediaDataEncoderTest.VP9Inits
can be run via below command:
```
MOZ_LOG="FFmpegVideo:5" ./mach gtest MediaDataEncoderTest.*
```
[1] ebf1d0f4bb
[2] https://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/290914.html
[3] https://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/thread.html#290914
Depends on D194913
Differential Revision: https://phabricator.services.mozilla.com/D194914
This patch add a VideoConfig member into FFmpegVideoEncoder. Since
VideoConfig is a template, its associated type is introduced into
FFmpegVideoEncoder's template.
Depends on D194580
Differential Revision: https://phabricator.services.mozilla.com/D194581
This patch partially implements Init() and Shutdown() to allocate and
release the AVCodecContext respectively. These two functions will be
exectued on the platform's encoder task queue specified in the given
CreateEncoderParams. Thus, the allocated AVCodecContext is a task-queue
only member variable.
Depends on D193952
Differential Revision: https://phabricator.services.mozilla.com/D194580