mach bootstrap - activate virtual env
This modifies the `./mach bootstrap` script to activate the python virtual environment, fixing issues on systems that don't have `six` and `distro` pre-installed.
---
<!-- 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#24561 (also relevant to #24541)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are in the `./mach bootstrap` script - although this may be something that could be checked in CI - Is there any interest in setting this up?
Fix keypress trigger condition
Fix#22346
keypress event should be triggered for keys representing character
values. So, we should trigger this event for enter key.
This event should not trigger for IME inputs.
TODO:
- It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd).
- I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way.
<!-- 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
- [x] 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. -->
Correct inverted logic for available image checks.
From https://html.spec.whatwg.org/multipage/images.html#updating-the-image-data:
Step 3 says to initialize selected source to null.
Step 4 says to set the selected source to the image element's src value if it's not using responsive images and it has a non-empty src value.
Step 6 performs some steps if selected source is not null.
The existing code tried to do the step 6 check in a roundabout way which caused us to always check for an available image when using responsive images, which is incorrect. The new code is easier to read and matches the specification text.
---
- [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 not worth writing a test to verify that an image cache check that would always fail does not happen.
HSTS & CA updates; Fix Debian bootstrap; Default to https on Android, too.
- Updated HSTS Preload list using ./mach update-hsts-preload
- Updated CA [database](https://ccadb-public.secure.force.com/mozilla/IncludedCACertificateReportPEMCSV) using etc/cert_generator.sh.
- No additions.
- [bug 1552374](https://bugzilla.mozilla.org/show_bug.cgi?id=1552374) removed Certinomis - Root CA
- [bug 1574670](https://bugzilla.mozilla.org/show_bug.cgi?id=1574670) removed Class 2 Primary CA and Deutsche Telekom Root CA 2
- [bug 1586081](https://bugzilla.mozilla.org/show_bug.cgi?id=1586081) removed GlobalSign Extended Validation CA - SHA256 - G2
- Updated Public Suffix list using ./mach update-pub-domains
- Default to https on Android, too. Desktop was done in #23363.
Keep http:// after `android.webkit.URLUtil.guessUrl()` url sanitization only if the user explicitly typed it into the address bar.
Small warning: I don't have an Android build environment yet, but still wanted to try to contribute these two lines.
- Fixed `./mach bootstrap` for Debian Testing. Regression from #24512.
After `pip install distro` (#24561) I finally got `Exception: mach bootstrap does not support Debian GNU/Linux, please file a bug`.
distrib and version were "debian" and "bullseye/sid" before, now they are "debian gnu/linux" and "testing".
- Use HSTS preload list for private HttpState, too. Private HttpState currently [creates an empty HSTS list](f7fb130a2a/components/net/http_loader.rs (L93-L95)). In contrast, regular HttpState first creates HstsList from Preload list and then adds further HSTS entries previously saved on disk.
---
<!-- 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. -->
Implement srcdoc support for iframes
<!-- Please describe your changes on the following line: -->
This PR contains changes related to adding srcdoc attribute parsing support for iframes in Servo. The following changes have been made:
- uncomment the [srcdoc](f63b404e0c/components/script/dom/webidls/HTMLIFrameElement.webidl (L10-L11)) WebIDL attribute, and implement the attribute getter.
- add a field to [LoadData](e6b271d329/components/script_traits/lib.rs (L137-L164)) for storing the srcdoc contents when loading a srcdoc iframe.
- (partially) implemented a new `page_load_about_srcdoc` method to `script_thread.rs` which loads the special `about:srcdoc` URL [per the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes) and takes the srcdoc contents as an argument
- call this new method from [handle_new_layout](e6b271d329/components/script/script_thread.rs (L2409-L2412)) when it's detected that a srcdoc iframe is being loaded
- (partially) in [attribute_mutated](e6b271d329/components/script/dom/htmliframeelement.rs (L560)), ensure that changing the `srcdoc` attribute of an iframe element [follows the specification](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element:the-iframe-element-9).
---
<!-- 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 are a part of fix#4767 (GitHub issue number if applicable)
<!-- 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. -->
Properly set event.buttons value on mousemove
A regular mousemove doesn't have any pressed button. And we were not resetting the pressed buttons after a click. That was messing up some jquery polyfil.
---
<!-- 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#24596 (GitHub issue number if applicable)
Add consume stream callback
<!-- Please describe your changes on the following line: -->
Added the consume stream callback function as per the steps mentioned [here](https://webassembly.github.io/spec/web-api/index.html#compile-a-potential-webassembly-response)
---
<!-- 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#21476
<!-- 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. -->
Make offscreen canvas rendering context use offscreen canvas' size; Consolidate size helpers
<!-- Please describe your changes on the following line: -->
Addresses issues raised in the review of PR #24518 and includes changes to 17 tests' metadata for those that now PASS.
Contains fixes in PR #24518:
Updated the offscreen canvas rendering context to use the offscreen canvas' size. This involved upgrading several methods to accept u64 sizes.
Additionally, the code in OffscreenCanvas::SetWidth() and OffscreenCanvas::SetHeight() was updated to send CanvasMsg::Recreate to the canvas paint thread.
---
<!-- 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#24465 and fix#24536
<!-- Either: -->
- [X] There are tests for these changes – 17 were updated to PASS
Remove use of on_unimplemented
It errors in today’s Nightly:
```rust
error[E0557]: feature has been removed
--> components/script/lib.rs:9:12
|
9 | #![feature(on_unimplemented)]
| ^^^^^^^^^^^^^^^^ feature has been removed
error[E0658]: this is an internal attribute that will never be stable
--> components/script/dom/bindings/conversions.rs:77:1
|
77 | #[rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29642
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
error: aborting due to 2 previous errors
```
derive_common: Fix example in documentation
<!-- Please describe your changes on the following line: -->
The docstring for `propagate_clauses_to_output_type` has an indented chunk which is getting picked up as a doc-test. It's not meant to compile, so just mark it as ignored.
---
<!-- 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 #___ (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. -->
Clean-up post Taskcluster migration
The parts of the configuration that are require a separate deployment step and are not applied automatically when a PR lands in this repository have moved to https://github.com/servo/taskcluster-config
Add WebGL Transformfeedback support
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15
cc @mmatyas @jdm @zakorgy
---
<!-- 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] There are tests for these changes
<!-- 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. -->