<!-- Please describe your changes on the following line: -->
This fixes#12937 where keypresses arrive in a one-off fashion, effectively delaying each keystroke. This PR is based heavily on @codec-abc's https://github.com/servo/servo/pull/16193 PR, with some further fixes and cleanup. From the original PR comments:
> There are 2 types of events associated with keyboard: Key event (up or down) and Character Input.
>
> * A character is not necessary created one a key is pressed (like the home key).
> * A character may be created only using a combination of several key. For example, using a Qwerty International layout you have to type ` then e to get é. The first key press on ` will create no character.
> * In servo, we currently merge the 2 events together, meaning that we store a Character Input event in a field to fire a single event later on when we get a Key event.
>
> The order of events seems to be system dependent. For example, let's say that we type the A key on a Qwerty Layout. In Linux and MacOs we will get this:
>
> * Character Input for character A
> * Key down event with virtual key code of the key A
> * Key up event with virtual key code of the key A
>
> while in Windows we get:
>
> * Key down event with virtual key code of the key A
> * Character Input for character A
> * Key up event with virtual key code of the key A
>
> It seems that glutin make no attempt to reorder the event to make the order independent of the Operating System. I think it would be easier for Servo if it were handled by the library.
This fix is a stopgap for the current state of glutin. We may want to look into a deeper fix in the future. For now, this is hopefully adequate solution until a more permanent one can be found.
This is the last remaining issue for the Windows nightly blockers meta-issue https://github.com/servo/servo/issues/12125
---
<!-- 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#12937 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are around Windows keyboard eventing.
<!-- 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: 4c851925fbbd8446f6bfc36ff6836e9b24ad635b
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : ed025584e25c5979861919d48ddedfe656f32729
These are interdependent patches of Bug 1343753. We want to use ComputedValues and AnimationValues to start/update/stop the transitions.
---
<!-- 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 1343753.
- [X] These changes do not require tests because we have tests in Gecko already.
Source-Repo: https://github.com/servo/servo
Source-Revision: e817666859f381648e41b690a7e35ad22cf48bbe
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bd521c13192c7a3b3711b6cb6d97dc27dbffa843
Reviewed by @emilio in [bug 1353191](https://bugzilla.mozilla.org/show_bug.cgi?id=1353191).
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
Source-Repo: https://github.com/servo/servo
Source-Revision: 5f6c27bb945eba1242be2fb4812ea5095ef26377
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5b14918d20ee9b9b5cf4fe9be7b303251e6e9bb1
I wanted to add an environmental variable to disable the style sharing
cache for gecko, but the current pattern involves lazy_static!, which
involves an atomic operation on lookup, which is a bit hot to do each
time we try to share styles. This makes that work happen once per
process.
Source-Repo: https://github.com/servo/servo
Source-Revision: 54ecfb155dba40382764ee20186a31f067a507be
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 35cbfe0f6490eadf25d9de020f0d2ea851badaba
Autoland should have prevented this. A bug is on file so it hopefully
won't happen again.
MozReview-Commit-ID: 1tN1lAyTLyE
--HG--
extra : rebase_source : 9377f92151e481446481fec263c39e369dab5246
Reviewed by upsuper in https://bugzilla.mozilla.org/show_bug.cgi?id=1345206.
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
Source-Repo: https://github.com/servo/servo
Source-Revision: 80f6160580477d5ca984071eeeef26866be5c68e
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7d1005d11d0e336b69f1cab1f7e007f774d0ba89
This is the Servo part of https://bugzilla.mozilla.org/show_bug.cgi?id=1351535.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2f67f69e895206135012c7445a86fb07d6e3b6b5
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fbd7a0657af2e60eb295c93b18d6d61622d159c0
This helps Stylo builds to actually use the new cssparser.
Source-Repo: https://github.com/servo/servo
Source-Revision: 535d0e421a3188473fc0c3cefca569c1276c4804
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : d72cbe5b073fd7a22eb291a86007734c7b54e42b
This is the Servo side change of [bug 1343964](https://bugzilla.mozilla.org/show_bug.cgi?id=1343964) which has been reviewed on Bugzilla.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9ad95a5dc74455c52233963fba4fb31324c40847
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2d135f6e480fc2e1ff0b820ec4c4211465de5415
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1311257
---
<!-- 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.
<!-- 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: d7fb2cc27f666c53bfa79bf95f924b2b87e9b0f2
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a5a08fdf6fd816bfc99f215952802e005b2e1cde
scrollbars.css is the only sheet which is parsed as author level, but later
added as agent level in [1]. Add a new enum value so that it can be parsed
as author level in gecko (nsCSSParser::AgentRulesEnabled() will exclude it),
but servo can recognize it as agent level sheet when the sheet is created.
Delete UserRulesEnabled() because no one uses it.
[1] http://searchfox.org/mozilla-central/rev/7419b368156a6efa24777b21b0e5706be89a9c2f/layout/base/nsDocumentViewer.cpp#2326
MozReview-Commit-ID: 2lrV4ogfnHM
--HG--
extra : rebase_source : 9d80a146f2ec5629999076ea1587e7d36f06afe7
This is the Servo side change of [bug 1351957](https://bugzilla.mozilla.org/show_bug.cgi?id=1351957) which has been reviewed on Bugzilla.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5b037a0aa080799faae93efe59e56938a1eba913
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 263b43f65d0486e4111f2ddcf13f630e82d6ece2
AnimationValue::mGecko and AnimationValue::mServo are mutually
exclusive, so we have to make sure mGecko.IsNull() returns reasonable
value, or we will got assertions. Hence, we should initialize it during
constructing StyleAnimationValue from Servo side.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1352067.
- [X] These changes do not require tests because there are enough tests in Gecko
Source-Repo: https://github.com/servo/servo
Source-Revision: a70e4ac5b25251ca1c05e8eced12f2aefea4410d
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bc8e26879318bc65845aaf0679d45f669c3d3713
This is the Servo part of [bug 1345696](https://bugzilla.mozilla.org/show_bug.cgi?id=1345696) which has been reviewed on Bugzilla.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2084ee29c40291c9abf9b0922e05f0663b215333
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : c179cfffd618252dff4ae25a3c4d6a52bc29bc5e
The current code can leave the tree in an inconsistent state, with the dirty
descendants bit not fully propagated.
Reviewed in https://bugzilla.mozilla.org/show_bug.cgi?id=1350441
Source-Repo: https://github.com/servo/servo
Source-Revision: 8adf1919732a764617ce7c8c26e772a9a7663b98
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2778ab00a757f5a03c3e060fb32780cafc16d7e9
This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1350671.
Source-Repo: https://github.com/servo/servo
Source-Revision: 6311321882a021f4929d040d62035a9cfa0d37d3
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : dc49a8941be87c1fe77f2065a67386b6bd07d1da
<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1344966
---
<!-- 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.
<!-- 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: d77fceaf241843d0fee246c1c910072fe041a69e
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9f2e870cb55520ba6deee3ba63b6b673d48bca2e
These patches fix [Bug 1343153](https://bugzilla.mozilla.org/show_bug.cgi?id=1343153).
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix Bug 1343153
- [X] These changes do not require tests because gecko has enough test cases for web animations.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5a656cfa54c7c125b309721f587d591d515999c2
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 05696cc5a76eecf0ace9e8b8f137c067014ba070
In Gecko, these keywords compute to different values depending on the
font.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1341775
Source-Repo: https://github.com/servo/servo
Source-Revision: 50fd39f068fe5a4a018bb4e7a602f50f10590524
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bce6512a67ff1bb441554ece8b0e3cf9db07e80e
<!-- Please describe your changes on the following line: -->
Before this PR, every object reflected in CSSOM is in `Arc<RwLock<_>>` to enable safe (synchronized) mutable aliasing. Acquiring all these locks has significant cost during selector matching:
* https://bugzilla.mozilla.org/show_bug.cgi?id=1311469
* https://bugzilla.mozilla.org/show_bug.cgi?id=1335941
* https://bugzilla.mozilla.org/show_bug.cgi?id=1339703
This PR introduce a mechanism to protect many objects with the same `RwLock` that only needs to be acquired once.
In Stylo, there is one such lock per process (in a `lazy_static`), used for everything.
I non-Stylo Servo, I originally intended to have one such lock per document (for author-origin stylesheets, and one per process for user-agent and user sytlesheets since they’re shared across documents, and never mutated anyway). However I failed to have the same document-specific (or pipeline-specific) `Arc` reachable from both `Document` nodes and `LayoutThread`. Recursively following callers lead me to include this `Arc` in `UnprivilegedPipelineContent`, but that needs to be serializable. So there is a second process-wide lock.
This was previously #15998, closed accidentally.
---
<!-- 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 _____
<!-- 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: bb54f0a429de0e8b8861f8071b6cf82f73622664
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 851230e57ac8775707df5f0f103be5feac81fc41
I think these properties are generally rare enough that they're not worth adding 8 bytes of memmove overhead on every PropertyDeclaration. There are a _lot_ of 24-byte properties though, so I think that's probably a good sustainable level.
Source-Repo: https://github.com/servo/servo
Source-Revision: ae1a7cc7b8079491c2140d694467113dcc1f44a6
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a3eaac5f9529174d13151a1cc1f52d5015f81560
<!-- Please describe your changes on the following line: -->
This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1340958
---
<!-- 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: 36234d717f7155d61a631e98f0a435110e1ec161
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 714164a9c47722d41ce1959024ea072af7569cfb
From https://bugzilla.mozilla.org/show_bug.cgi?id=1347719
This effectively combines the discriminants of the two enums and reduces the
size of PropertyDeclaration by one word.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5d61afd11876fc82e3d3c52ddd8f7aa3e2c3de47
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7d4053f5640c3c4e7aaa2f470a95dc9ad32bf783
Right now they don't, which means that we have four properties making PropertyDeclaration 16 bytes bigger than it should be.
I'm not sure if there's a better way to get these tests to run against stylo than to hoist them into the properties file, but I couldn't figure it out. This seems good enough.
Source-Repo: https://github.com/servo/servo
Source-Revision: f5c67fda04195bd6d8ef10a73b9158eb60dbd6d7
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b676ce616df6c86cb142864ce941c57fca3ffe52
This is the Servo side changes of [bug 1345698](https://bugzilla.mozilla.org/show_bug.cgi?id=1345698).
Source-Repo: https://github.com/servo/servo
Source-Revision: 9986b42333a7438c02debd7fe8395a5c146a58df
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 87f42c038798f7cefd9b0bcdd83bf5f9c7a162c1
We want to give a chance to the embedder to handle a link itself.
Is it a problem that this will add a round trip to the main thread every time `load_url` is called?
---
<!-- 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#15655
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I'm not sure how to test that
<!-- 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: 808ffffd1e8dab9ca6340a981b797434b34e2e36
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 667e921e89833af26350326ab50d27517fc29cb3
This is on top of https://github.com/servo/servo/pull/15928.
Now that cascade() gets a Device ref, we can use the default computed values
from there to avoid propagating that state all over the place.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8c8edb8731dc01d254839d0922590fba72f278c6
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 4da0b4a162f5987954a443b93f411e461ef0187d
This is needed for https://bugzilla.mozilla.org/show_bug.cgi?id=1346481
<!-- Please describe your changes on the following line: -->
---
<!-- 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
- [X] These changes do not require tests because will be tested on the Gecko side
<!-- 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: e648ebd1613927d3c280540e10703d406f408c09
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : e00f4cdb3c062d8c71bf806a460cd1e7adb1057e
<!-- Please describe your changes on the following line: -->
I added the check, modified the tests and removed all instances of "-> ()" that were already there.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix#15925 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes
<!-- 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: a6f89c503671726bcb0407cd84c380f3af4a7916
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 825958bdb427ce2644ceac397d0a4fd38660acbc
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