Create new test class for reducing the redundant code and can provide more
flexibility for adding new related test in the future.
MozReview-Commit-ID: 2f3O8vfHo12
--HG--
extra : rebase_source : 6b503816d9ac75d9269d8f81b2dad300bf1e9702
Notify observer might cause the method (notifyStoppedPlaying) is called by C++ side,
and we should change our internal state before calling the method.
MozReview-Commit-ID: 5xNXhGmAIrR
--HG--
extra : rebase_source : c13943e717fe28b24a1bc6a83c9e6ac18b37eb9d
Because ModifierKeyState is in the 'mozilla::widget' namespace, this file uses
it without qualification.
MozReview-Commit-ID: H6t3AqLjRwJ
--HG--
extra : rebase_source : 69b788761ee332cc94acc4be6ae6ce0bb50f0e98
This isn't great, since although we know that Servo style worker threads
have exclusive write access to the main thread heap due to the use of
the Servo font metrics Mutex, we don't know that we're not modifying
data on the heap that other style worker threads want to read from.
MozReview-Commit-ID: CbSzQFkKG95
--HG--
extra : rebase_source : a6f288e114512cf83a54276591fa31a57dba3278
Here we add a new UserFontLoadState value, STATUS_LOAD_PENDING, which
represents the state just after a gfxUserFontEntry's url()-valued source
would being loading, except that we can't start the load due to being
on a Servo style worker thread. In that case, we defer the work of
initiating the load until just after the Servo traversal is finished.
URLs that can normally be loaded synchronously, such as data: URLs
and script-implemented protocols marked as synchronous, must be
handled asynchronously when encountered during Servo traversal, since
various main-thread only work (in FontFaceSet::SyncLoadFontData) must
happen. This is a user visible change from stock Gecko, but should
only happen when font metrics for a data: URL font are requested
due to ch/ex unit resolution when layout hasn't previously requested
the font load. Hopefully nobody relies on synchronous resolution of
ch/ex units with data: URLs.
We unfortunately also can't pick gfxUserFontEntry objects out of the
UserFontCache during Servo traversal, since validating the cache
entry involves doing content policy checking, which is not thread-safe
(due in part to taking strong references to nsIPrincipals).
Platform fonts and ArrayBuffer-backed DOM FontFace objects continue
to be handled synchronously.
The PostTraversalTask does not take a strong reference to the
gfxUserFontEntry object, since it is held on to by the DOM FontFace
object, which itself won't go away before the PostTraversalTask
is run.
MozReview-Commit-ID: J9ODLsusrNV
--HG--
extra : rebase_source : 1651e2917bd31b87fc1c1be94b0eced1273df86a
The PostTraversalTask does not take a strong reference to the FontFaceSet
object, since as a DOM object, we can't call AddRef/Release on it
from the Servo style worker threads. The FontFaceSet is held on to
by the nsIDocument, and only cleared during cycle collection, which
should not occur between the font metrics request and the
PostTraversalTask running.
MozReview-Commit-ID: 5aKIg4DIQ4w
--HG--
extra : rebase_source : 50ca5f2d8af42cfbeb6808aa755a4670bdf293bd
The PostTraversalTask does not take a strong reference to the FontFace
object, since as a DOM object, we can't call AddRef/Release on it
from the Servo style worker threads. The FontFace objects that we
encounter are all held on to by the FontFaceSet, and none of the
work that we do during font loads should drop FontFace objects
from the FontFaceSet. (That only happens under
nsIDocument::FlushUserFontSet, which is only called on the
main thread.)
MozReview-Commit-ID: 5CdtGQYC9aL
--HG--
extra : rebase_source : 8e4f21a12ae5ca81017293d5b06f1551e307ea5d
As with a few other gfx* font-related classes, during font metrics
calculations we end up taking strong references to gfxUserFontSet,
and it would be difficult to restructure the code to not do this.
MozReview-Commit-ID: L1GbZnf4825
--HG--
extra : rebase_source : bfd83b02cceec747dc4f4f021eff205e7aaa2b69
We need to grab UnscaledFont objects through WeakPtrs during metrics
calculations, but this only happens on Servo style worker threads
while the Servo font metrics mutex is locked (and while the main
thread is paused). So we use WeakPtrTraits to override the
thread safety assertion to allow OMT access through the WeakPtr
if the mutex is locked.
Since we can end up creating UnscaledFont objects from the style
worker threads too, we additionally need to allow the main thread
to access them through WeakPtrs.
It would be nice to avoid the dependency on layout/style/ here, but
I can't see a way to do that without putting the burden of the
annotation that the more permissive thread safety checks are allowed
on the WeakPtr<> declarations themselves.
MozReview-Commit-ID: AbHNZEhE7L8
--HG--
extra : rebase_source : 95e669d64a0881ef1c9747c2e7de7f361865af11
In a later patch, we'll want to queue up some tasks to run when the
Servo traversal is one, and the ServoStyleSet seems like the natural
place to store those tasks. We could probably find the ServoStyleSet
by chasing a bunch of pointers from the task-adding call sites, but
it seems simpler just to make it available directly.
MozReview-Commit-ID: AJoFZEoNaGm
--HG--
extra : rebase_source : d8afe0c2cdf1ea4b1681c6e57aea48c9efddea00
Now all properties in nsCSSProps::kMozAppearanceKTable are in
keyword list of -moz-appearance.
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1361632
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because it's for stylo
Source-Repo: https://github.com/servo/servo
Source-Revision: 83020ffe291846ac425925da1dd4a3da9eb7cbad
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 41a11da87f4c3be15e6d297a40d5b9f024d38a48
In our current setup, in which links with an href attribute always match either
:link or :visited, no matter whether that attribute's value is a valid URI,
changes to the attribute always put the element into either the "match nothing"
state or the "match :link" state, via calls to Link::ResetLinkState.
The only thing FlushPendingLinkUpdates is needed for is (lazily, in case it
turns out to not be needed because the element got removed from the DOM anyway)
registering a history observer to switch the link state to :visited as needed.
This means that selector matching consumers that would never expose :visited
state to start with don't need to worry about calling FlushPendingLinkUpdates.
Video fails to play on Sony Z3C when the media server is in a state that no hardware codec can be created unless reboot. Fallback to software codec when that happens to workaround the issue.
MozReview-Commit-ID: AaRIw7KPaF3
--HG--
extra : rebase_source : d5106d5c75c4430450a81bbe9cfd536f01ef4df9
<!-- Please describe your changes on the following line: -->
Bug 1359787 - Stylo: Unite the implementation of background-image/ mask-image and border-image-source in {background|svg|border}.mako.rs
---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- 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: 896a920ff53f683cdaac8bc6b2f796633a436a7f
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9b64f6b658b04f16cdb1a4ee88075f3f0f41971d
<!-- Please describe your changes on the following line: -->
See https://github.com/servo/rust-mozjs/issues/343#issuecomment-294513870
Heap::new() constructor is unsafe. Heap should be set after reflect_dom_object call in order to prevent potential GC crashes.
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- 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: e8aa3759bd8f74f7a962e421bd0cbf2a0a3e35da
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1f7e2346a5f25efa3e055ff02cd6b9090de23837
This is pretty straight-forward.
Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:
./mach gradle app:assembleLocalAustralisDebug
In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations. I
can't solve that at this time.
Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.
MozReview-Commit-ID: CtU7zFpNCob