This is the Servo part of [bug 1315601](https://bugzilla.mozilla.org/show_bug.cgi?id=1315601).
Source-Repo: https://github.com/servo/servo
Source-Revision: cc9fb0ba59181d478eabb64e942b9342a4879a73
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 09cdf9d508235f512f8c41664be0f040a91efdfc
<!-- Please describe your changes on the following line: -->
PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1346655
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [X] These changes do not require tests because it's for stylo
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: 4757a9b71268f3cdedbd8b2d38f4bb4968a0e113
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7c209205e9c17927fcbcaa691739a10001c67bef
This was introduced in #15916, but most of it is actually unreachable.
Source-Repo: https://github.com/servo/servo
Source-Revision: 430c7d924d51aad5d1093d38d4b3de10e09ec825
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 74af78ec2eae0b2fbd7dfc994576e17c7bb2decf
Added support for "font-family: -moz-fixed" for stylo
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1341637](https://bugzilla.mozilla.org/show_bug.cgi?id=1341637)
<!-- Either: -->
- [X] These changes do not require tests because it's stylo change
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: e6af6a8f48f2c7e3227f03bd84266f232f9ae7a9
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : dc8ab1256e8cebeda6a3f33ca4b7b5e5ad6a65c8
Once part 4 is applied, a suspend video element won't be rendered anymore, so that the video element keeps the last decoded-frame.
By this way, drawing a suspended video element to a canvas should get something that is not single-color.
MozReview-Commit-ID: J6dsZIvtO
--HG--
extra : rebase_source : 16207bb1925fc8317ba35d4adbe86c7fba6ee9b2
extra : source : 7e55644b5ba79c7a13211c23cedc5dc77a1e55ff
The blank decoder used to create green frames.
Bug 1274626 patch 2 modifies its behavior to return black frames.
The original implementation is better in memory usage, so we revert it.
MozReview-Commit-ID: Lue63Rsoy3G
--HG--
extra : rebase_source : 87ba4a2cea29f3fcb90c84e5b844d35b62799995
extra : source : e920b71a11ebf410f4a1c99708911be98f68586c
So that the suspended video element won't be rendered any more and keeps the last decoded frame.
This is the effect that UX specification defines.
And actually, we don't need to set ImageContainer if there are no valid new images.
MozReview-Commit-ID: B7RS3LXu8J0
--HG--
extra : rebase_source : de7d014ebad34f032a0ea8bfbe9aa723ffe922de
extra : source : d6a2b47b14f6ac00ea420f5eba7190c7af725381
The video decoder of NullDecoderModule returns a VideoData with dimension of zero size and no image data.
By this way, we reduce memory usage while a video element is suspended.
MozReview-Commit-ID: IMODFOGdpaj
--HG--
extra : rebase_source : 6da95997eeb2098396b577b9dc0473d30d78b4d4
extra : source : 8a002d74db6c445dff17aa24d2e92f9c27019b07
Change name to 'Dummy' to signify it's base for decoders that don't decode.
And we will implement a new NullDecoderModule in the next patch which will utilize the DummyMediaDataDecoder.
MozReview-Commit-ID: LPsczoztgx3
--HG--
extra : rebase_source : b8c3c565709f998eb40a72b6c8831d7b4f3bd142
extra : source : dec60f61cc8809ebe6dd65cb16a325f2272b3ce2
Smart string classes like nsCString are safer to use than raw |char*| strings,
and are typically easier to deal with as well.
MozReview-Commit-ID: 18C293zWrJw
--HG--
extra : rebase_source : 350191d4c3047fb38d18e8c6d9370cd059007861
Mark video element as tainted (stored on the decoder owned by video element) when the video is used as source to drawImage() on canvas.
MozReview-Commit-ID: HdciVwhqPu3
--HG--
extra : rebase_source : b26c257afaaabdd6346a5421988d95e82281d7ef
extra : source : 149234329b62015dfd2e954030c23bf9c6b1d55e
Some uses of media elements should 'taint' the element so that the video doesn't participate in video decode suspending.
Add the infrastructure to track the taint status on MediaDecoder and mirror the status to MediaDecoderStateMachine.
MozReview-Commit-ID: Ik6aDIzrZaO
--HG--
extra : rebase_source : 1dfdedea63d18918ef7b529a87f3afeb1592b149
extra : source : 1ac0f1b9264706f65e04528757bd60028331d31f
This member-var has type 'UniquePtr', but (up until this patch) its value
is set up using "new" and raw pointers. This patch improves that codepath by
using UniquePtr & MakeUnique, for stronger ownership guarantees.
MozReview-Commit-ID: KWZVpvr9bYj
--HG--
extra : rebase_source : 4e46d355078c7da6ae750f3ca06586dc8703e8a7
Fennec team decides that Fennec will turn off ICU support on release build now. So we need to able be build Firefox without ENABLE_INTL_API (Bug 1343725).
Bug 1341994 uses mozIMozIntl interface, but it is only defined with ENABLE_INTL_API. So we shouldn't expose intlUtils if ICU is turned off.
MozReview-Commit-ID: EiQKiF4BRQv
--HG--
extra : rebase_source : 97f329da11094248a37edc543b5b541500a73d18
That also fixed bug 1303156, since handling better the device pixel ratio makes
also the lines crisp.
MozReview-Commit-ID: Iyl6YLFFp5b
--HG--
extra : rebase_source : eff92ab5dd2a389329e6a800f95f3b3a4be36db4
While we're here, don't re-recompute the default computed values, just grab them
from the device.
MozReview-Commit-ID: GqqnPLIwN2F
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>