Improve IME messaging to embedder with insertion point index and mult…
…iline flag.
<!-- Please describe your changes on the following line: -->
This improves handling of IME requests in the embedder by passing the location of the insertion point along with the current text, and a boolean flag 'multiline' (true for HTML textarea, false otherwise) which allows the embedder to be more clever about handling of the 'enter' or 'return' keys.
Tested and working in an embedding example.
---
<!-- 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. -->
Fix some 'nosniff' tests
This PR implements some standard function to work with headers, hence it fixes some 'nosniff' test/
I create a PR as Draft because i have some questions:
* i added the code info the `net` module instead of `script::dom::headers` to avoid some cyclic dependencies... but i'm not sure about this choice. Is there another potential location to put this code?
* i used String object to match the spectification (it states to collect sequences of "code points", but some code use byte arrays. Should i change the code to work with bytes?
---
<!-- 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. -->
Winit 0.24.0 and surfman
<!-- Please describe your changes on the following line: -->
I've updated Servo to Winit 0.24.0 based on the previous work in #26394.
I've basically rebased master onto his jdm/winit branch which had the bulk of the work and I brute forced it till it built correcting things here and there as I could.
The build reports a few warnings:
```
00:04:59 Mar 03 10:20:06 warning: use of deprecated field `winit::event::KeyboardInput::modifiers`: Deprecated in favor of WindowEvent::ModifiersChanged
00:04:59 Mar 03 10:20:06 --> ports/winit/headed_window.rs:753:12
00:04:59 Mar 03 10:20:06 |
00:04:59 Mar 03 10:20:06 753 | if input.modifiers.shift() {
00:04:59 Mar 03 10:20:06 | ^^^^^^^^^^^^^^^
00:04:59 Mar 03 10:20:06 |
00:04:59 Mar 03 10:20:06 = note: `#[warn(deprecated)]` on by default
00:04:59 Mar 03 10:20:06
00:04:59 Mar 03 10:20:06 warning: use of deprecated field `winit::event::KeyboardInput::modifiers`: Deprecated in favor of WindowEvent::ModifiersChanged
00:04:59 Mar 03 10:20:06 --> ports/winit/keyutils.rs:263:34
00:04:59 Mar 03 10:20:06 |
00:04:59 Mar 03 10:20:06 263 | modifiers: get_modifiers(input.modifiers),
00:04:59 Mar 03 10:20:06 | ^^^^^^^^^^^^^^^
00:04:59 Mar 03 10:20:06
00:07:06 Mar 03 10:22:13 warning: 2 warnings emitted
00:07:06 Mar 03 10:22:13
00:07:06 Mar 03 10:22:13 Completed servo v0.0.1 bin "servo" in 132.7s
00:07:06 Mar 03 10:22:13 Finished dev [unoptimized + debuginfo] target(s) in 6m 59s
00:07:08 Mar 03 10:22:15 [Warning] Could not generate notification!
00:07:08 Mar 03 10:22:15 Build Completed in 0:07:01
```
And there are a few commits namely b27e09e009 which I'm not entirely sure of.
I've intentionally left the surfman patch in Cargo.toml so someone else can validate this branch.
Unit tests and smoke test run successfully.
Servo runs but I'm not familiar enough with it to validate how well it does. The window opens and content loads though.
My Rust foo is not great and I could use some help fixing those warnings.
Regards,
PECastro
---
<!-- 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
A few warnings ...
- [x ] `./mach test-tidy` does not report any errors
A few duplicate version statements but no errors.
- [x] These changes fix#26394
- [x] There are tests for these changes
- [ ] 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. -->
This fixes the failures in bug 1671573 and just works thanks to the
invalidation improvements I did for :is / :where.
Added a couple tests for invalidation which is the tricky bit. 001 is a
very straight-forward test, 002 is the :is test but with :is() replaced
by double-:not().
This also fixes default namespaces inside :is() / :where(), which are
supposed to get ignored, but aren't. Added tests for that and for the
pre-existing :not() behavior which Chrome doesn't quite get right.
Differential Revision: https://phabricator.services.mozilla.com/D94142
Adjust is-where-parsing.html to work with both the new and old behavior,
and add a test for the new behavior.
Depends on D90049
Differential Revision: https://phabricator.services.mozilla.com/D90050
Adjust is-where-parsing.html to work with both the new and old behavior,
and add a test for the new behavior.
Depends on D90049
Differential Revision: https://phabricator.services.mozilla.com/D90050
This is strictly better and more flexible, but can change specificity so
have a pref in case it causes trouble. I doubt it will though, the
specificity rules of :is() make more sense, and my gut feeling is that
:-moz-any is not very used on the wild.
Make it early-beta-or-earlier for now to minimize risk, once this is on
nightly for a bit we can enable it everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D86696