Commit graph

25052 commits

Author SHA1 Message Date
Alex Touchet
967601bade Remove some badges 2023-01-19 19:38:30 -08:00
bors-servo
f70857906d
Auto merge of #29250 - fabricedesre:no-deprecated-symbol-to-jsid, r=delan
Replace use of the deprecated RUST_SYMBOL_TO_JSID by SymbolId

<!-- Please describe your changes on the following line: -->

A simple replacement of a deprecated function, according to changes in https://github.com/servo/mozjs/pull/315

That removes the only build warning I saw when doing a clobber.

---
<!-- 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 no behavior change is expected.

<!-- 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. -->
2023-01-18 18:05:12 +01:00
bors-servo
c8d9aad3e3
Auto merge of #28880 - wusyong:fix-footer, r=delan
Fix absolute descendents being replaced when retreiving root

<!-- Please describe your changes on the following line: -->
The cause of #16410 is because calling `try_get_layout_root` will replace its `abs_descendants` even itself isn't absolute positioned. So I pushed them instead if the root isn't absolute. Also add a few docs and comments to help understand how block size of absolute flow is being calculated.

---
<!-- 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 #16410 (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes:
Reduced testcase from the issue.
```html
<style>
  html {
    min-height: 100%;
    position: relative;
  }
  div {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 25px;
    border: 1px solid black;
  }
</style>
<div>
</div>
```

<!-- 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. -->
2023-01-18 08:18:39 +01:00
bors-servo
a8db596d1e
Auto merge of #29236 - servo:application-json, r=jdm
Allow displaying content with "application/json" mime type

For me this allows the WPT test
performance-timeline/tentative/include-frames-one-remote-child.sub.html
to match expected results. The wptserver is sending a 404 JSON response
because the URL that the test requests is not found.

<!-- 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 #29136.
- [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. -->
2023-01-17 19:13:38 +01:00
The Capyloon Team
a9c0479a48 Replace use of the deprecated RUST_SYMBOL_TO_JSID by SymbolId 2023-01-16 19:14:01 +00:00
Martin Robinson
0d7284dc34 Allow displaying content with "application/json" mime type
For me this allows the WPT test
performance-timeline/tentative/include-frames-one-remote-child.sub.html
to match expected results. The wptserver is sending a 404 JSON response
because the URL that the test requests is not found.
2023-01-16 10:21:41 +01:00
Martin Robinson
e68ebd2617 Stringify unknown JavaScript objects in global exception handlers
When turning DOM exceptions into `ErrorInfo` always try to stringify
the JavaScript value, even if it's an object that isn't a `DOMException`
or native exception.  This means that exceptions that extend the `Error`
prototype are now stringified. The result is that test output for WPT
global assertion failures is more useful. For instance for the test
include-frames-from-child-same-origin-grandchild.sub.html:

Before:
```
uncaught exception: unknown (can't convert to string)
```

After:
```
uncaught exception: Error: assert_equals: expected 4 but got 3
```
2023-01-12 19:57:51 +01:00
bors-servo
1a60636274
Auto merge of #29229 - servo:intermittent-video-poster, r=jdm
Fix intermittency when loading poster images

Wait until a poster image is cached to in order to unblock document load. If not, the document may continue loading before the image is ready to use, leading to intermittency in test output. Now load is unblocked when getting the ImageResponse from the cache, which allows the code to properly unblock the load when the entire load fails or succeeds.

This reveals several false passes in the `object-view-box` test suite which were very flaky.

<!-- 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 #29204.
- [x] These changes fix #29188.
- [x] These changes fix #29179.

<!-- 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. -->
2023-01-12 02:04:09 +01:00
Martin Robinson
c021df027a Fix some build warnings
- Mark some instances of unused fields and variables as as allowed,
  when they are used for memory management.
- Remove the use of some deprecated function.s

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-01-11 12:50:36 +01:00
Martin Robinson
6defd7011b Fix intermittency when loading poster images
Wait until a poster image is cached to in order to unblock document load. If
not, the document may continue loading before the image is ready to use,
leading to intermittency in test output. Now load is unblocked when
getting the ImageResponse from the cache, which allows the code to
properly unblock the load when the entire load fails or succeeds.

This reveals several false passes in the `object-view-box` test suite
which were very flaky.

Fixes #29204.
Fixes #29188.
Fixes #29179.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-01-11 12:27:27 +01:00
Ivan Ukhov
0ac2cb08da Update truetype 2023-01-02 16:13:17 +01:00
Dirk Stolle
f2260e7c18 Fix some typos
Signed-off-by: Dirk Stolle <striezel-dev@web.de>
2022-12-17 03:22:34 +01:00
michaelgrigoryan25
6347bcf83f Replaced some Opts struct fields with shorthand initializers. 2022-12-06 21:01:27 +04:00
michaelgrigoryan25
3a99a733cd Removed unnecessary type bindings. 2022-12-06 20:41:32 +04:00
michaelgrigoryan25
269da66cfb Removed the commented code. 2022-12-01 18:27:59 +04:00
michaelgrigoryan25
83b41fdbf0 Replaced explicit Default implementation for Seed with derive. 2022-12-01 18:21:54 +04:00
bors-servo
901b76297d
Auto merge of #29079 - jdm:sm107, r=jdm
Upgrade to spidermonkey 107

This successfully loads servo.org and google.com on macOS, so that means it's time for tests!
2022-11-23 10:05:42 -05:00
Josh Matthews
4fffa67a6e Update bindgen and webxr. 2022-11-23 10:05:06 -05:00
Josh Matthews
60b3af4dad Update to newest merged spidermonkey. 2022-11-23 10:05:06 -05:00
Josh Matthews
f76bb20c2e Format. 2022-11-23 10:04:53 -05:00
Josh Matthews
76edfce6a7 Trigger new module error reporting behaviour. 2022-11-23 10:04:52 -05:00
Josh Matthews
bd77a4043c Changes for spidermomkey upgrade. 2022-11-23 10:04:50 -05:00
bors-servo
7175a5368a
Auto merge of #29085 - jdm:rustup, r=jdm
Update to latest nightly.

Fixes build issue in the latest nightly.
2022-11-21 01:29:20 -05:00
Josh Matthews
801dfeff17 Update to latest nightly. 2022-11-21 00:59:32 -05:00
bors-servo
73b066e1b5
Auto merge of #28967 - servo:jdm-patch-52, r=jdm
Add missing license files for servo_arc.

Fixes #28966.
2022-11-20 11:42:39 -05:00
Michael Mc Donnell
a3728b8ce2 Fix for loop over option warnings 2022-11-10 16:57:56 -08:00
bors-servo
d13aa55c2d
Auto merge of #29005 - BurtonQin:fix-double-lock, r=jdm
components/net: Fix a double-lock in image_cache

<!-- Please describe your changes on the following line: -->

Add fn `add_listener_with_store` which requires `self.store.lock()` before calling.
Use this function instead of `add_listener` on L555 because `self.store.lock()` is called before.

---
<!-- 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
- [X] These changes fix #29003 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the fix is straightforward.

<!-- 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. -->
2022-10-25 19:41:09 -04:00
bors-servo
2926f05f69
Auto merge of #29014 - yvt:patch/bump-rust-toolchain, r=jdm
chore: upgrade the Rust toolchain to `nightly-2022-10-13`

---
- [x] `./mach build -d` does not report any errors (prerequisite: #29009)
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

---
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are not functional changes
2022-10-23 18:54:43 -04:00
bors-servo
a8deb4d971
Auto merge of #29010 - atouchet:lic, r=jdm
Use SPDX license format

<!-- 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: -->
- [ ] `./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. -->
2022-10-16 13:18:24 -04:00
yvt
687ac6c77f fix(script_plugins): adapt to the new rustc lint API
<https://github.com/rust-lang/rust/pull/101986>
2022-10-16 19:19:13 +09:00
yvt
00f6b6f36e fix(script_plugins): Map::get_parent_item now returns OwnerId instead of LocalDefId
<https://github.com/rust-lang/rust/pull/102040>
2022-10-16 19:19:13 +09:00
yvt
66c03e3c96 fix(script_plugins): LintStore::register_late_pass now passes an extra arg to a given closure
<https://github.com/rust-lang/rust/pull/101501>
2022-10-16 19:19:13 +09:00
yvt
fbc1ae8533 fix(script_plugins): hir::BindingAnnotation::{Unannotated, Mutable} have been replaced by associated constants
<https://github.com/rust-lang/rust/pull/101241>
2022-10-16 19:19:13 +09:00
yvt
3fd4fd0388 fix(script_plguins): rustc_ast::ast::AttrKind::Normal fields are now boxed
<https://github.com/rust-lang/rust/pull/100441>
2022-10-16 19:19:12 +09:00
yvt
065c59665c fix(script_plugins): replace TyCtxt::{get_attrs -> get_attrs_unchecked}
[rust-lang/rust#95562][1] renames the existing method `get_attrs` to
`get_attrs_unchecked` and introduces a new method in its former place.
The new method takes an attribute name and returns attributes of that
name. It also checks that, if the attribute name is marked as local-
only, the given `DefId` is local as well to prevent misuses. The old
method, now named `get_attrs_unchecked`, returns all attributes of a
given `DefId`; thus it's "unchecked" in the sense that it's up to the
callers to be certain whether the attributes they are looking for are
local-only.

The new `get_attrs` method lacks the support for attribute names with
more than one path component, which is why we can't just migrate to the
new `get_attrs` method here. Although `get_attrs_unchecked` is marked
for future removal in the compile source code, there's a discussion
about [supporting][2] this use case.

[1]: https://github.com/rust-lang/rust/pull/95562
[2]: https://github.com/rust-lang/rust/pull/95562/files#r915537557
2022-10-16 19:19:12 +09:00
yvt
b4c1c972d4 fix(script_plugins): the visibility fields of rustc_hir::intravisit::FnKind are gone
<https://github.com/rust-lang/rust/pull/93970>
2022-10-16 17:02:14 +09:00
Alex Touchet
9822075277 Use SPDX license format 2022-10-10 15:48:05 -07:00
BurtonQin
1552e1baa2 components/net: Fix a double-lock in image_cache 2022-10-10 05:36:36 +00:00
yvt
2236c8f4e4 chore(deps): bump smallvec from 0.6 to 1.9 in all local packages
`smallvec ^0.6` no longer compiles after `nightly-2022-07-15` if the
`union` feature is enabled.
2022-10-10 03:03:22 +09:00
Josh Matthews
b7ab8ccef2
Add MIT license to servo_arc. 2022-09-06 09:12:24 -04:00
Josh Matthews
a610adce87
Add apache license to servo_arc. 2022-09-06 09:11:48 -04:00
bors-servo
0c740cf996
Auto merge of #28893 - EnnuiL:master, r=jdm
Update to image 0.24.2, implement WebP support

<!-- Please describe your changes on the following line: -->
This PR updates image to 0.24.2 and implements WebP support. I've been watching the progress on image-rs's WebP implementation, and from what I've seen, the situation has changed from "can only decode the luma channel from lossy WebPs" to pretty much full support (with image 0.24.2 implementing support for the extended WebP format).

Here are screenshots of it viewing the WebP page's example:
<details>
<summary>Screenshots</summary>

Servo viewing the main WebP gallery:
![A screenshot of Servo viewing the WebP Gallery](https://user-images.githubusercontent.com/85590273/167732100-957fe4a9-1752-491b-90e4-ffb2aa0552a4.png)
Servo viewing a lossless example from WebP's Lossless and Alpha Demonstration:
![A screenshot of Servo viewing the lossless version of the "Transparent compass card for overlays" example from WebP's Lossless and Alpha Demonstration](https://user-images.githubusercontent.com/85590273/167732333-d082c9d0-e390-49c1-bfb0-9ba3e717367c.png)
Servo viewing a lossy-with-alpha example from WebP's Lossless and Alpha Demonstration
![A screenshot of Servo viewing the lossy-with-alpha version of the "Transparent compass card for overlays" example from WebP's Lossless and Alpha Demonstration](https://user-images.githubusercontent.com/85590273/167731987-393f4931-4276-4cfb-94da-adacb07e5ca9.png)
</details>

This also changes the package name from `piston_image` to simply `image`. It appeared to be a piece of legacy from ages ago which can be safely changed now.

(PS: I'm still pretty new at Rust, please let me know if I have done any mistakes in the process)

---
<!-- 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 #20045 (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. -->
2022-08-15 18:16:23 -04:00
Teymour Aldridge
3e5cd8815d Fix some Clippy lints. 2022-08-04 00:13:36 +08:00
Ennui Langeweile
b2ea5f0160
Implement WebP support
This also updates the image crate to 0.24.2

Signed-off-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
2022-05-10 18:40:19 -03:00
Wu Yu Wei
f5a3d282fb Actually check if root is absolute positioned 2022-04-19 17:43:43 +08:00
Wu Yu Wei
b978f83e52 Add trace logs when assigning inline/block sizes 2022-04-17 16:18:32 +08:00
Josh Matthews
4b0e2ce485 Format. 2022-04-02 15:10:47 -04:00
Josh Matthews
f4271e9f3f Migrate to yeslogic's fontconfig bindings. 2022-04-01 23:51:57 -04:00
Josh Matthews
f8a44d0ad4 Remove env_logger duplicate. 2022-04-01 02:26:19 -04:00
Josh Matthews
1f272b7e88 fixup! Update arrayvec. 2022-04-01 02:16:21 -04:00