Commit graph

41145 commits

Author SHA1 Message Date
Julien Tregoat
2742fd2bea Refactor ImageCache::find_image_or_metadata API. 2020-04-17 11:58:18 -04:00
bors-servo
7d1f968d52
Auto merge of #26166 - utsavoza:ugo/issue-23436/08-04-2020, r=jdm
Remove DomRefCell wrapper for CanvasState

<!-- 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 #23436
- [x] There are tests for these changes

The PR removes the DomRefCell wrapper for CanvasState from `CanvasRenderingContext2D` and `OffscreenCanvasRenderingContext2D`. The reason for keeping member wrappers in CanvasState instead of overall CanvasState wrapper itself is because I believe that removing member wrappers would make it rather difficult to refactor the internal CanvasState methods in order to cover certain edge cases.

[For example](https://github.com/servo/servo/issues/23436#issuecomment-611089157): Drawing a canvas inside of itself would require getting and providing certain parameters for source canvas such as `canvas_id` and `is_origin_clean` that are currently accessed through source canvas context. Also, we might run into similar issue when creating patterns using canvas.

<!-- 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. -->
2020-04-15 16:41:31 -04:00
bors-servo
f6f2b493f6
Auto merge of #26143 - jdm:transform-feedback, r=nox
Fix webgl transform feedback

This allows https://www.joshmatthews.net/webxr-particles/ to run in Servo. This change corresponds with the following spec text:
```
GL_INVALID_OPERATION is generated by glBeginTransformFeedback if no binding points would be used, either because no program object is active of because the active program object has specified no varying variables to record.
```

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26137
- [x] There are tests for these changes
2020-04-15 13:51:59 -04:00
bors-servo
9e2ca8b05e
Auto merge of #26188 - humancalico:bootstrap, r=jdm
add some missing dependencies to bootstrap.py

<!-- Please describe your changes on the following line: -->
This commit adds some missing dependencies to `bootstrap.py` to keep in sync with the packages on `README.md` which was causing `./mach build` to fail

---
<!-- 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

<!-- 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. -->
2020-04-15 11:57:23 -04:00
bors-servo
242a000f2f
Auto merge of #26189 - servo-wpt-sync:wpt_update_15-04-2020, r=servo-wpt-sync
Sync WPT with upstream (15-04-2020)

Automated downstream sync of changes from upstream as of 15-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-15 08:35:33 -04:00
WPT Sync Bot
b74bf3ef9a Update web-platform-tests to revision 08fb3cceabe444c32264fdb44db50672ebea8610 2020-04-15 11:08:34 +00:00
Akshat Agarwal
4ab2d59fea add missing dependencies 2020-04-15 15:34:06 +05:30
bors-servo
ce9f22a5e4
Auto merge of #26183 - tamird:patch-1, r=gterzian
Use hash_map::Entry to save a map lookup

A bit of golf noticed via https://medium.com/programming-servo/programming-servo-workers-at-your-service-db71e5943511.

r? @gterzian
2020-04-15 01:00:47 -04:00
bors-servo
23deec8c39
Auto merge of #26147 - jdm:linewidth, r=nox
Avoid GL errors with LineWidth commands

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26139
2020-04-14 18:54:00 -04:00
Tamir Duberstein
fac1e654d2
Use hash_map::Entry to save a map lookup 2020-04-14 18:17:46 -04:00
bors-servo
eb9e794729
Auto merge of #26182 - servo-wpt-sync:wpt_update_14-04-2020, r=servo-wpt-sync
Sync WPT with upstream (14-04-2020)

Automated downstream sync of changes from upstream as of 14-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-14 12:01:12 -04:00
bors-servo
54c7024ce0
Auto merge of #26181 - mrobinson:animations-refactor, r=emilio
style: Refactor some animations code

This change modifies the names of some methods to make it clearer what
they are doing. It also adds some clarifying comments to explain some
confusing behavior.

<!-- 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 they do not change behavior.

<!-- 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. -->
2020-04-14 09:49:42 -04:00
Martin Robinson
304b283811 style: Refactor some animations code
This change modifies the names of some methods to make it clearer what
they are doing. It also adds some clarifying comments to explain some
confusing behavior.
2020-04-14 13:40:43 +02:00
WPT Sync Bot
10cafa3df2 Update web-platform-tests to revision a4482f355e2848f4623cf46f521cb9b3bca56129 2020-04-14 11:10:36 +00:00
bors-servo
33a74a4f4e
Auto merge of #26164 - Manishearth:dirty-endsession, r=jdm
Dirty canvas when exiting immersive sessions

Fixes https://github.com/servo/servo/issues/26162, fixes servo/webxr#155

We basically end up in a situation where the main thread is asleep. It's unclear to me why it doesn't wake up after attempts to interact with the screen, but we stopped dirtying the canvas during the immersive session (https://github.com/servo/servo/pull/26077) so the main thread wasn't awake initially.

This is probably not the cleanest fix -- we really should not be ending up in situations where the main thread is perma-asleep -- however, we should be dirtying the canvas after exiting immersive mode _anyway_ since the contents need to be shown to the user, so this fix is still valid, even if it's not fixing the root cause.
2020-04-13 20:02:48 -04:00
Manish Goregaokar
453be48c94 Dirty layers when changing visibility state 2020-04-13 15:12:41 -07:00
bors-servo
37b555a2d6
Auto merge of #26168 - asajeffrey:xrlayers, r=Manishearth
Added first-cut implementation of XR layers

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

Starting on an implementation of https://immersive-web.github.io/layers/

This PR doesn't add any new functionality, just the plumbing.

---
<!-- 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] There are tests for these changes OR

<!-- 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. -->
2020-04-13 15:57:15 -04:00
Alan Jeffrey
fda8da0e9d Added first-cut implementation of XR layers 2020-04-13 13:57:58 -05:00
bors-servo
7ae11588dc
Auto merge of #26167 - dralley:skia-leftovers, r=SimonSapin
Remove some no-longer-necessary dependencies

Remove some bits left over from Skia and Ubuntu 14.04 support
2020-04-13 12:17:52 -04:00
bors-servo
804aa3fe39
Auto merge of #26175 - servo-wpt-sync:wpt_update_13-04-2020, r=servo-wpt-sync
Sync WPT with upstream (13-04-2020)

Automated downstream sync of changes from upstream as of 13-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-13 10:34:24 -04:00
WPT Sync Bot
c9a04ea515 Update web-platform-tests to revision ec1023a6b5f4dc6c8cbeb3507081e2ac3741adad 2020-04-13 11:07:48 +00:00
bors-servo
8cc619cfdb
Auto merge of #26111 - CYBAI:fix-origin-trustworthy, r=jdm
Update checking origin trustworthy align to spec

While reading the [spec of ` Is origin potentially trustworthy? `](https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy), I found our second step is wrong; then, I found Josh said we didn't check it with `https` because we didn't support https in tests yet (https://github.com/servo/servo/pull/13574#discussion_r89346191).

IIRC, we've supported https wpt tests now so it might be fine to change it to align with spec.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] 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. -->
2020-04-13 01:45:57 -04:00
Daniel Alley
a3bb64c33c Remove some old requirements
Remove some bits left over from Skia and Ubuntu 14.04 support
2020-04-12 22:41:42 -04:00
bors-servo
24a45248d4
Auto merge of #26174 - sstangl:fix-fedora-bootstrap, r=Manishearth
Add 'python3-devel' to the DNF bootstrap packages list

Bootstrapping on Fedora 31 fails with a missing <Python.h> header.
That header is provided by the 'python3-devel' package.

Note that Fedora 31 does not ship Python2 packages anymore due to Python2 EOL.

Prior to this patch on Fedora 31, running `python3 ./mach bootstrap` results in the following build error:

```
    running build_ext
    building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/psutil
    gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=570 -DPSUTIL_LINUX=1 -I/usr/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
        9 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/sstangl/dev/servo/python/_virtualenv3.7/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2w6ff301/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2w6ff301/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-pg5414df/install-record.txt --single-version-externally-managed --compile --install-headers /home/sstangl/dev/servo/python/_virtualenv3.7/include/site/python3.7/psutil Check the logs for full command output.
```

After this patch, `python3 ./mach bootstrap` succeeds.

- [X] These changes do not require tests because it is adding a missing dependency.
2020-04-12 22:26:04 -04:00
CYBAI
99a8ea26a1 Update checking origin trustworthy align to spec 2020-04-13 10:23:00 +09:00
Sean Stangl
3ba621e764 Add 'python3-devel' to the DNF bootstrap packages list
Bootstrapping on Fedora 31 fails with a missing <Python.h> header.
That header is provided by the 'python3-devel' package.
2020-04-12 13:47:01 -06:00
bors-servo
3abbfdf278
Auto merge of #26170 - Manishearth:enum-convertible, r=asajeffrey
Add FromJSValConvertible for enums

Fixes https://github.com/servo/servo/issues/26169

This adds FromJSValConvertible implementations for webidl enums, which allows them to be used within `sequence<>`, etc.

This also uses these implementations when converting arguments.
2020-04-12 11:47:43 -04:00
bors-servo
4bd4472e9d
Auto merge of #26173 - servo-wpt-sync:wpt_update_12-04-2020, r=servo-wpt-sync
Sync WPT with upstream (12-04-2020)

Automated downstream sync of changes from upstream as of 12-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-12 08:17:27 -04:00
WPT Sync Bot
e854d6a62a Update web-platform-tests to revision 1461434ba9b333a8f4ee0c9acfe9884ac5fbe112 2020-04-12 11:06:54 +00:00
bors-servo
32ca37d460
Auto merge of #26172 - servo-wpt-sync:wpt_update_11-04-2020, r=servo-wpt-sync
Sync WPT with upstream (11-04-2020)

Automated downstream sync of changes from upstream as of 11-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-11 11:12:38 -04:00
WPT Sync Bot
ce631f7691 Update web-platform-tests to revision cf719a4f5e4affb623044004bcc8a61be7b94404 2020-04-11 10:59:00 +00:00
Manish Goregaokar
242b7f8fdc Use FromJSValConvertible impls when converting arguments 2020-04-11 00:15:43 -07:00
Manish Goregaokar
10a13ffa20 Implement FromJSValConvertible on enums 2020-04-11 00:15:43 -07:00
Utsav Oza
bd8fbee12c Resolve mach build warnings 2020-04-10 23:02:31 +05:30
Utsav Oza
d98ade2a68 Remove DomRefCell wrapper for canvas_state from CanvasRenderingContext2D 2020-04-10 23:02:30 +05:30
Utsav Oza
4a730d1cd2 Remove DomRefCell wrapper for canvas_state from OffscreenCanvasRenderingContext2D 2020-04-10 23:02:30 +05:30
bors-servo
06803a2edb
Auto merge of #26165 - servo-wpt-sync:wpt_update_10-04-2020, r=servo-wpt-sync
Sync WPT with upstream (10-04-2020)

Automated downstream sync of changes from upstream as of 10-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-10 07:05:53 -04:00
WPT Sync Bot
970a34bb8e Update web-platform-tests to revision ea9dc9c56d87f0b84f3d4e95c92fc796a4d6751f 2020-04-10 11:05:40 +00:00
bors-servo
e43cadbc32
Auto merge of #26163 - dralley:remove-assertion, r=jdm
Remove assertion for negative value from get_uniform_location

closes #26150

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26150 (GitHub issue number if applicable)
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___
2020-04-10 05:11:15 -04:00
Manish Goregaokar
d146303f1d Dirty canvas when exiting immersive sessions 2020-04-09 22:25:27 -07:00
bors-servo
9fd668488e
Auto merge of #26071 - servo:rustup, r=nox
Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07)

~Blocked on https://github.com/rust-lang/rust/issues/70280~
2020-04-10 00:37:54 -04:00
Daniel Alley
865b538115 Remove assertion for negative value from get_uniform_location
closes #26150
2020-04-09 22:25:57 -04:00
bors-servo
455a99ca8d
Auto merge of #26154 - Manishearth:platform-object-overload, r=jdm
Do not filter out platform objects when doing dictionary conversions in overload resolution

https://heycam.github.io/webidl/#es-overloads

In step 12, the platform object check is for substep 4, but importantly it only matters if `V` implements the matching interface. If not, it should be able to fall back to substep 10 and attempt conversion to a dictionary.
2020-04-09 17:39:10 -04:00
Simon Sapin
1c0549ce7f Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) 2020-04-09 21:33:44 +02:00
Manish Goregaokar
58bab8a7e9 Add test for overloading with interface and dict 2020-04-09 12:31:13 -07:00
bors-servo
bc10c60710
Auto merge of #26155 - atouchet:ua, r=jdm
Update user agent strings

<!-- Please describe your changes on the following line: -->
Loading github.com in the latest nightlies gives an error about using an unsupported browser: https://help.github.com/articles/supported-browsers

This updates the Firefox version in the user agent string to see if it improves things.

---
<!-- 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. -->
2020-04-09 12:17:53 -04:00
bors-servo
5db25836a4
Auto merge of #26156 - servo-wpt-sync:wpt_update_09-04-2020, r=servo-wpt-sync
Sync WPT with upstream (09-04-2020)

Automated downstream sync of changes from upstream as of 09-04-2020.
[no-wpt-sync]
r? @servo-wpt-sync
2020-04-09 09:55:07 -04:00
WPT Sync Bot
17d194dd89 Update web-platform-tests to revision 6838f7e5fbddf9c77a93b0e8cd2e27c0fcfed86f 2020-04-09 11:02:30 +00:00
Alex Touchet
ba0d5cba9d
Update user agent strings 2020-04-08 23:58:46 -07:00
Manish Goregaokar
c24481ab9c Do not filter out platform objects when doing dictionary conversions
https://heycam.github.io/webidl/#es-overloads

In step 12, the platform object check is for substep 4, but importantly it only matters if `V` implements the matching interface. If not, it should be able to fall back to substep 10 and attempt conversion to a dictionary.
2020-04-08 23:15:57 -07:00