Commit graph

9615 commits

Author SHA1 Message Date
Utsav Oza
1c78728ff1 Parse location url relative to the entry settings object 2020-05-18 19:07:57 +05:30
CYBAI
6bc624001b Introduce import.meta hook for module script 2020-05-17 11:34:35 +09:00
bors-servo
1a74382603
Auto merge of #26541 - kunalmohan:copy-buffer-to-buffer, r=kvark,jdm
Validate copybuffertobuffer() + some spec update

The spec update includes renaming bindings to entries, adding CommandEncoderState and renaming GPUBufferSize to GPUSize64.

<!-- Please describe your changes on the following line: -->
r?@jdm @kvark

---
<!-- 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. -->
2020-05-15 23:41:34 -04:00
Kunal Mohan
1aeae47299 Validate copybuffertobuffer() + some spec update
The spec update includes renaming bindings to entries and
adding CommandEncoderState.
2020-05-15 22:55:08 +05:30
Simon Sapin
1f6efbf9e9 Correctly paint the CSS canvas’ background
https://drafts.csswg.org/css-backgrounds/#special-backgrounds

Fixes https://github.com/servo/servo/issues/25559
Closes https://github.com/servo/servo/pull/26121, as it is an alternative.
2020-05-15 13:37:09 +02:00
Kunal Mohan
e5065c7eb2 Share single gpu_id_hub among all threads in a process 2020-05-15 01:15:01 +05:30
bors-servo
329f081e6a
Auto merge of #26513 - jdm:webgl2-formats, r=asajeffrey
Reject incompatible webgl texture pixel data

The tests that would make these changes most visibly correct unfortunately rely on texImage3D which isn't implemented yet, so they error out too soon. However, when I comment out that code, these changes avoid a bunch of panics in the webgl thread because of invalid data type combinations being accepted, and removing the incorrect non-filterable texture fallback behaviour for webgl 2 when more texture formats are supposed to be filterable.

---
- [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
2020-05-13 18:33:37 -04:00
bors-servo
9eee0482c0
Auto merge of #26503 - mrobinson:fix-rooting, r=jdm
Fix an issue with the rooting of animating nodes

Make sure nodes removed from map of rooted animating nodes are rooted on
the stack before triggering event handlers. We also make sure not to
call `from_untrusted_node_address` on nodes that aren't guaranteed to be
rooted.

Fixes #26498.

---
<!-- 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 #26498.
- [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. -->
2020-05-13 16:43:36 -04:00
Josh Matthews
7151ee25c8 webgl: Reject incompatible 2d texture pixel data based on texture data type. 2020-05-13 16:22:31 -04:00
bors-servo
52d9fb57fb
Auto merge of #26434 - jdm:playground, r=Manishearth
Allow BabylonJS playground to load

These changes fix the JS errors that currently appear when loading the page. You can't use the editor, but the webgl canvas works just fine.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #26428 and fix #25478
- [x] There are tests for these changes
2020-05-13 15:40:23 -04:00
bors-servo
b2a6928224
Auto merge of #26491 - huangjiahua:fix, r=Manishearth
Handle cancelAnimationFrame() when called within a requestAnimationFr…

…ame() callback

<!-- Please describe your changes on the following line: -->
In order to handle `cancelAnimationFrame()` in the callback, the `raf_callback_list` is moved to
`current_raf_callback_list`, and each callback is cloned in the iteration of `current_raf_callback_list` to avoid "borrowed twice".

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

<!-- 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. -->
2020-05-13 14:38:04 -04:00
Josh Matthews
097a84671a dom: Implement current window event. 2020-05-13 14:36:32 -04:00
Josh Matthews
19f4be38d2 dom: Implement stub queryCommandSupported. 2020-05-13 14:36:32 -04:00
Josh Matthews
3abaff85f3 webgl: Mark float/half-float textures as filterable in webgl2. 2020-05-13 14:15:41 -04:00
Martin Robinson
0f1831e2fa Remove AnimatedProperty
This removes an extra layer of abstraction and allows Servo to share
more code with Gecko. In addition, we will need to handle raw
`AnimationValue` structs soon in order to fully implement "faster
reversing of interrupted transitions."
2020-05-13 11:02:52 +02:00
Martin Robinson
c4a38beee4 Fix an issue with the rooting of animating nodes
Make sure nodes removed from map of rooted animating nodes are rooted on
the stack before triggering event handlers. We also make sure not to
call `from_untrusted_node_address` on nodes that aren't guaranteed to be
rooted.

Fixes #26498.
2020-05-13 10:25:56 +02:00
huangjiahua
c253ad8399 Handle cancelAnimationFrame() when called within a requestAnimationFrame() callback 2020-05-13 15:41:09 +08:00
Manish Goregaokar
da3d2a8eff Handle StereoCapture in GetViewport() 2020-05-12 17:40:19 -07:00
Manish Goregaokar
b181e0c8ff Update webxr to support secondary capture view 2020-05-12 17:40:19 -07:00
bors-servo
ea4ae04655
Auto merge of #26335 - jdm:wrup, r=SimonSapin
Update webrender.
2020-05-12 14:56:19 -04:00
Martin Robinson
3b0619aedd Move most animation processing to script
This is preparation for sharing this code with layout_2020 and
implementing selective off-the-main-thread animations.

We still look for nodes not in the flow tree in the layout thread.
2020-05-12 10:22:14 +02:00
Josh Matthews
eb2f7f7f0a Convert all uses of UpdateResources api to use webrender transactions. 2020-05-11 17:41:56 -04:00
Alexandrov Sergey
50e15486b6 Implement EXT_frag_depth 2020-05-11 11:51:04 +03:00
Martin Robinson
4b4ea6483a Remove a TODO from the implementation of getComputedStyle
The spec is now clear that disconnected elements shouldn't return a
style.

Closes #6860.
2020-05-10 11:05:01 +02:00
Bastien Orivel
bdbfde9ec0 Don't send a load event when a loaded image is actually the placeholder
The image cache returns an `ImageCacheResult::ImageAvailable `the second
time you try getting the placeholder. This means that in some cases, the
loading of an image would fail, then the same image would get fetched
from the cache, the placeholder would be loaded from that but would be
seen as a normal image, firing a load event.

This made the tests in
`fetch/cross-origin-resource-policy/image-loads.html` fail depending on
their order.
2020-05-08 19:15:24 +02:00
bors-servo
6aec2c8594
Auto merge of #26450 - PeterZhizhin:add_referrerpolicy_to_list_of_relevant_mutations, r=jdm
Add referrerpolicy to list of relevant mutations

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

`img.referrerPolicy` change now mutates the image.
Not all `referrerPolicy` attribute changes result in an image update event.
Only valid changes are reflected.

All referrerpolicy tests inside `relevant-mutations.html` WPT test now pass.

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

<!-- Either: -->
- [x] These have tests:
```
./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html
```
2020-05-07 08:45:12 -04:00
PeterZhizhin
f44c2c9bc5 Added referrerpolicy as relevant mutation for img
This fixes #26388. referrerPolicy is now calls onload for image
mutations. Not all referrerPolicy attribute changes result in an image
update event. Only valid changes are reflected.

Referrerpolicy tests now pass.
2020-05-07 10:12:53 +03:00
Bastien Orivel
ec665d9dce Properly set the url on the Response object when the response is an opaqueredirect 2020-05-06 20:08:26 +02:00
bors-servo
b290ad95c1
Auto merge of #26407 - mrobinson:animation-restyle-model, r=jdm
Have animations more closely match the HTML spec

These two commits do two major things:

**Have animations ticks trigger a restyle**: This corrects synchronization issues with animations,
where the values used in layout are out of sync with what is returned by `getComputedStyle`.

**Tick the animation timer in script according to spec**: This greatly reduces the flakiness of
animation and transitions tests.

Fixes #13865.

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

<!-- 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. -->
2020-05-06 04:12:31 -04:00
Bastien Orivel
e18a3ad841 Separate values in Headers with ", ", not ","
Tests expect header values to be separated by that so this fixes a few
of them.
2020-05-06 00:11:34 +02:00
Bastien Orivel
aa43ce8cf3 Fix the redirected attribute for Response 2020-05-05 20:43:56 +02:00
Bastien Orivel
566147dab3 Strip request-body-header when redirecting from a POST to GET
This doesn't change any expectation because we're not setting
response.redirected properly so all the tests fail later on when it's
asserted to be true.

Fixes #25257
2020-05-05 20:43:55 +02:00
Martin Robinson
3a74013abc Start having animations conform to the HTML spec
This is a small step toward fixing #19242. The main idea is that the
clock for animations should advance as the event loop ticks. We
accomplish this by moving the clock from layout and naming it the
"animation timeline" which is the spec language. This should fix
flakiness with animations and transitions tests where a reflow could
move animations forward while script was running.

This change also starts to break out transition and animation events
into their own data structure, because it's quite likely that the next
step in fixing #19242 is to no longer send these events through a
channel.
2020-05-05 20:08:44 +02:00
bors-servo
a478aafa1f
Auto merge of #26399 - utsavoza:ugo/doc-fixes/03-05-2020, r=jdm
Update doc links and code snippet for trace implementation in JS-Servos-only-GC.md

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes update the outdated doc links and code snippet for trace implementation.
- [x] These changes do not require tests because these are doc fixes.
2020-05-05 12:11:14 -04:00
Martin Robinson
b585ce5b1f Use a restyle for animation ticks
This change corrects synchronization issues with animations, by
reworking the animation processing model to do a quick restyle and
incremental layout when ticking animations.

While this change adds overhead to animation ticks, the idea is that
this will be the fallback when synchronous behavior is required to
fulfill specification requirements. In the optimistic case, many
animations could be updated and applied off-the-main-thread and then
resynchronized when style information is queried by script.

Fixes #13865.
2020-05-05 15:13:35 +02:00
bors-servo
5e44327325
Auto merge of #26410 - utsavoza:ugo/issue-26287/04-05-2020, r=ferjm
Update window.open() to return fallible result

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #26287
- [x] There are tests for these changes
2020-05-05 04:40:51 -04:00
bors-servo
a5b37e7730
Auto merge of #26415 - atouchet:urls, r=jdm
Update some URLs

<!-- 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. -->
2020-05-04 17:12:09 -04:00
bors-servo
d1b7b756a7
Auto merge of #26413 - servo:jdm-patch-41, r=asajeffrey
Use PYTHON2 variable for script's codegen.

This makes the python2 dependency a bit more explicit.
2020-05-04 15:22:58 -04:00
Alex Touchet
5166cc35f4
Update some URLs 2020-05-04 10:26:35 -07:00
bors-servo
271ff16028
Auto merge of #26398 - Eijebong:fast-path-set-inner-html, r=jdm
Add a fast path in Element::SetInnerHTML when the value is small and trivial text

Inspired from gecko which has a similar fast path. This makes innerHTML
more than 10 times faster for this case.

Fixes #25892
2020-05-04 12:43:49 -04:00
Bastien Orivel
1b2464b4b6 Add a fast path in Element::SetInnerHTML when the value is small and trivial text
Inspired from gecko which has a similar fast path. This makes innerHTML
more than 10 times faster for this case.

Fixes #25892
2020-05-04 18:11:49 +02:00
Josh Matthews
0148cc5cf9
Update error message. 2020-05-04 11:52:49 -04:00
Josh Matthews
39fff93bef
Use PYTHON2 variable for script's codegen. 2020-05-04 11:52:22 -04:00
Utsav Oza
86a5cf75aa Update window.open() to return fallible result 2020-05-04 19:02:38 +05:30
Shamir Khodzha
492faa3105 fixed channels indexing in progress callback in BaseAudioContext.DecodeAudioData
Gstreamer backend returns channel as single bit mask (ie 1, 2, 4, 8, 32 etc).
Progress callback was using this mask as plain channel index, thus storing decoded
audio in wrong channel.
2020-05-04 00:48:51 +03:00
Utsav Oza
494ff6b66a Update doc links and code snippet for trace implementation 2020-05-03 19:03:33 +05:30
bors-servo
d08c4fff15
Auto merge of #26336 - szeged:mmatyas__webgl_fns_getparam4, r=jdm
Add support for WebGL2 MIN_PROGRAM_TEXEL_OFFSET

Improves the support of the WebGL2 `MIN_PROGRAM_TEXEL_OFFSET` property (ie. stores it as a signed integer) and adds support for querying it using GetParameter.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2

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

cc @jdm @zakorgy

Depends on #26333 because they touch the same test files.

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

<!-- 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-05-01 13:30:05 -04:00
Martin Robinson
3903c1fb98 Add support for animationend event
This is triggered when an animation finishes. This is a high priority
because it allows us to start rooting nodes with animations in the
script thread.

This doesn't yet cause a lot of tests to pass because they rely on the
existence of `Document.getAnimations()` and the presence of
`animationstart` and animationiteration` events.
2020-05-01 15:29:57 +02:00
bors-servo
39e4eb43c3
Auto merge of #26296 - ramyananth:master, r=jdm
Implementing createImageBitmap

<!-- Please describe your changes on the following line: -->
Implementing createImageBitmap method for canvas image source.

---
<!-- 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 #20650 (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. -->
2020-04-30 12:05:21 -04:00
Mátyás Mustoha
1431a389da Add support for WebGL2 MIN_PROGRAM_TEXEL_OFFSET
Improves the support of the WebGL2 `MIN_PROGRAM_TEXEL_OFFSET` property
(ie. stores it as a signed integer) and adds support for querying it
using GetParameter.

See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
2020-04-30 10:11:11 +02:00