Commit graph

7583 commits

Author SHA1 Message Date
Josh Matthews
778b48fa47 webgl: Implement component narrowing checks for CopyTexImage2D. 2019-09-20 01:28:22 -04:00
Josh Matthews
7e4cf13f5b webgl: Support RGB color attachments for complete framebuffers. 2019-09-20 01:28:22 -04:00
Josh Matthews
46b1d8faee webgl: Report invalid operations for more APIs that can't use an incomplete framebuffer. 2019-09-20 01:28:21 -04:00
bors-servo
89d0b0233a
Auto merge of #24176 - jdm:no-gleam, r=asajeffrey
Replace use of gleam in webgl with sparkle.

Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by https://github.com/servo/servo/pull/24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24176)
<!-- Reviewable:end -->
2019-09-12 16:08:58 -04:00
bors-servo
4e9967b43e
Auto merge of #24148 - asajeffrey:script-prefetch, r=jdm,nox
Prefetch img, scripts and stylesheets during parsing

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

Eagerly tokenize html input, and scan for `script` and `img` tags which can be prefetched into the cache. This allows resources to be loaded concurrently, which would otherwise be loaded sequentially due to being blocked by script execution. On the cloth webgl demo, this takes the time-to-paint down from 732ms to 560ms.

---
<!-- 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 #3847
- [x] These changes do not require tests because it's a perf improvement

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24148)
<!-- Reviewable:end -->
2019-09-11 15:28:05 -04:00
Alan Jeffrey
2e6f14ffea Responding to review comments 2019-09-11 12:13:41 -05:00
Alan Jeffrey
49a5e84fb1 Responding to review comments 2019-09-11 11:40:50 -05:00
Josh Matthews
1cefae7181 Replace use of gleam in webgl with sparkle. 2019-09-11 11:40:04 -04:00
Alan Jeffrey
1aeb97b281 Prefetch img and scripts during parsing 2019-09-10 16:13:49 -05:00
Víctor Manuel Jáquez Leal
c6df00343b Enable video frames as OES textures
This patch parametrizes WR to handle OES textures if the incoming
frame wraps one.

It requires the update of servo-media package and the according
WR parametrization.
2019-09-10 13:15:39 +02:00
bors-servo
7a67261dce
Auto merge of #24142 - CYBAI:warn-module-script, r=jdm
Show warning when module scripts are ignored

The first five commits are `cherry-pick`-ed from the module script PR.
I think it might be also good to have this PR first so that reviewers can focus on module script things on that PR!

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24089
- [x] These changes do not require tests because it just ignored module scripts (or should we turn on module script tests in this PR and update those test expectation to TIMEOUT?)

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24142)
<!-- Reviewable:end -->
2019-09-06 07:36:26 -04:00
CYBAI
95ddfb3930 Show warning when the script is a module
The warning can be removed in #23545.
2019-09-06 13:35:40 +09:00
CYBAI
70c5cfdbdb Add type_ for script origin to distinguish module or classic 2019-09-06 13:35:40 +09:00
CYBAI
19eb2392f5 Rename ClassicScript to ScriptOrigin
This is basically revert 965370c0bf. After introducing module script, we
can reuse this struct and add field to see the type of script.
2019-09-06 13:35:40 +09:00
CYBAI
608c44f103 Rename ScriptContext to ClassicContext 2019-09-06 13:35:39 +09:00
CYBAI
47d8c572ce Recognize module as script type 2019-09-06 13:35:39 +09:00
CYBAI
96ed5ac84d Update spec step number 2019-09-06 12:44:37 +09:00
bors-servo
da237b4517
Auto merge of #24144 - stephenmuss:event-src-element, r=jdm
Event src element

<!-- Please describe your changes on the following line: -->
This builds on top of the work done in https://github.com/servo/servo/pull/22918

---
<!-- 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 #22880
- [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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24144)
<!-- Reviewable:end -->
2019-09-05 23:41:15 -04:00
bors-servo
8eddb60150
Auto merge of #24137 - gterzian:fix_error_throwing_on_unknown_js_arg, r=jdm
Codegen: throw type error when encountering an unknown argument

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

FIX #24130

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24137)
<!-- Reviewable:end -->
2019-09-05 13:39:52 -04:00
drexler
d721dcbd45
implement historical srcElement attribute for Event interface 2019-09-05 22:29:48 +10:00
Gregory Terzian
5149aefd85 codegen: throw type error when encountering an unknown argument 2019-09-05 18:29:02 +08:00
bors-servo
d430317825
Auto merge of #24109 - gterzian:fix_performance_entry_buffer_leak, r=asajeffrey
Performance: limit buffer size, clear on pipeline exit

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

Part of https://github.com/servo/servo/issues/24074

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24109)
<!-- Reviewable:end -->
2019-09-04 22:02:12 -04:00
bors-servo
4260063220
Auto merge of #24094 - asajeffrey:webxr-depth-n-stencil, r=jdm
Create depth and stencil attachments for XRWebGLLayer

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

Creates depth and stencil attachments for an XRWebGLLayer if requested.

---
<!-- 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 #24082
- [x] These changes do not require tests because not sure how we'd test for this

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24094)
<!-- Reviewable:end -->
2019-09-04 14:20:29 -04:00
Gregory Terzian
6d1136a37d performance: clear and disable buffer on pipeline exit
use existing buffer max size
2019-09-04 13:38:37 +08:00
bors-servo
4f4e219e54
Auto merge of #24044 - Eijebong:img-element-spec-update, r=jdm
Remove <img>'s historical progress events

Fixes #24011

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24044)
<!-- Reviewable:end -->
2019-09-02 21:29:14 -04:00
bors-servo
ae6d88f667
Auto merge of #24097 - saschanaz:default-tojson, r=Manishearth
Add [Default] toJSON() to performance interfaces

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

Enable `[Default] toJSON()` lines that were previously commented out.

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24097)
<!-- Reviewable:end -->
2019-09-01 21:27:01 -04:00
Kagami Sascha Rosylight
5695ee94a5 Add [Default] toJSON() to performance interfaces 2019-09-01 23:23:57 +09:00
Bastien Orivel
eb9c9fbb95 Remove <img>'s historical progress events
Fixes #24011
2019-09-01 16:10:11 +02:00
Alan Jeffrey
a0cb841d2a Create depth and stencil attachments for XRWebGLLayer 2019-08-28 19:20:15 -05:00
Alan Jeffrey
b6cf6c0450 Better error detection when creating an XRWebGLLayer 2019-08-28 19:19:31 -05:00
bors-servo
3ade7b680d
Auto merge of #24072 - gterzian:ensure_docs_drop, r=asajeffrey
Ensure documents drop when a pipeline exits

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

minimalist companion/alternative to https://github.com/servo/servo/pull/24047
---
<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24072)
<!-- Reviewable:end -->
2019-08-28 08:55:17 -04:00
Gregory Terzian
344684a2f2 ensure documents drop when a pipeline exits 2019-08-28 00:16:22 +02:00
Bastien Orivel
ec6b478775 Update Window::open and document::open parameters to match the spec
Fixes #24012
2019-08-24 17:22:44 +02:00
bors-servo
f21d116069
Auto merge of #24018 - Manishearth:wherever-you-are, r=asajeffrey
Allow setting near/far clip planes

needs https://github.com/servo/webxr/pull/41

r? @asajeffrey

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24018)
<!-- Reviewable:end -->
2019-08-23 11:45:38 -04:00
Manish Goregaokar
0d79b2beaf Allow setting near/far clip planes 2019-08-23 08:01:21 -07:00
Simon Sapin
98e4a53b72 Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15) 2019-08-23 08:23:21 +02:00
bors-servo
cacd4ed4e2
Auto merge of #23997 - collares:audiobuffersourcenode, r=ferjm
Implement missing functionality of AudioBufferSourceNode

<!-- Please describe your changes on the following line: -->
This is a tiny PR to support [Media #293](https://github.com/servo/media/pull/293). Last time I ran WPT there was only one failing AudioBufferSourceNode test (which I will debug later this week). Once I rebased, however, I started getting unrelated servo-media build failures:

```
error[E0599]: no method named `shutdown_audio_context` found for type `std::sync::Arc<servo_media::ServoMedia>` in the current scope
   --> components/script/dom/baseaudiocontext.rs:566:14

error[E0599]: no method named `shutdown_player` found for type `std::sync::Arc<servo_media::ServoMedia>` in the current scope
    --> components/script/dom/htmlmediaelement.rs:1866:18
```

I wanted to get this PR up so https://github.com/servo/media/pull/293 can be tested. When the unrelated build failures are fixed, I will run `./mach update-wpt` and update this PR.

---
<!-- 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` only reports unrelated errors (broken servo/media master?)
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #22363

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23997)
<!-- Reviewable:end -->
2019-08-22 20:57:49 -04:00
Gregory Terzian
34008a317b introduce a pipeline namespace installer 2019-08-21 14:20:01 +02:00
bors-servo
4275420a56
Auto merge of #23844 - saschanaz:tojson, r=Manishearth
Support default toJSON in WebIDL

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

Ported related lines from gecko.

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23844)
<!-- Reviewable:end -->
2019-08-20 17:27:14 -04:00
Mauricio Collares
a21aa052d0 AudioBufferSourceNode: Send loop messages 2019-08-20 11:42:16 -03:00
Mauricio Collares
e8d3b9753f AudioBufferSourceNode: Support start parameters (offset, duration) 2019-08-19 14:36:31 -03:00
Mauricio Collares
992e7ba630 AudioBuffer: Track sample rate 2019-08-19 14:36:30 -03:00
bors-servo
4f4c2be144
Auto merge of #24000 - ferjm:update.servo.media.shutdown, r=jdm
Update servo-media. Remove implicit shutdown requests. It all happens…

… automagicly now

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24000)
<!-- Reviewable:end -->
2019-08-19 08:07:47 -04:00
Fernando Jiménez Moreno
507a1e4370 Update servo-media. Remove implicit shutdown requests. It all happens automagicly now 2019-08-19 09:55:00 +02:00
bors-servo
00a9f30773
Auto merge of #23951 - georgeroman:return_errorstatus_from_webdriverhandlers, r=jdm
Return ErrorStatus from webdriver_handlers

<!-- Please describe your changes on the following line: -->
With `webdriver 0.40`, `ErrorStatus` implements `Deserialize`. Now we can accommodate for multiple errors occuring in `webdriver_handlers`.

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

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23951)
<!-- Reviewable:end -->
2019-08-19 02:10:41 -04:00
George Roman
d7b9fede99 Return ErrorStatus from webdriver_handlers 2019-08-18 15:30:55 +03:00
Gregory Terzian
8482d2e781 restructure content process shutdown ack with threaded sender, without layout 2019-08-17 16:03:07 +02:00
Simon Sapin
9392180007 Update to url 2.0 2019-08-17 10:03:44 +02:00
bors-servo
ff3f3d30c7
Auto merge of #23966 - mmatyas:webgl_backtrace_buildfix, r=jdm
Fix build error when using the 'webgl_backtrace' feature

This patch fixes a build error that happens when building with `--features webgl_backtrace`.

However, while working on this I've noticed that calling `Backtrace::new()` instantly causes a segmentation fault. This didn't happen with the example code of [the package](https://crates.io/crates/backtrace) though, so I wasn't sure where to report this (maybe related: [backtrace-rs/#150](https://github.com/rust-lang/backtrace-rs/issues/150), [backtrace-rs/#189](https://github.com/rust-lang/backtrace-rs/issues/189)).

cc @alexcrichton @jdm

---

- [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 ___
- [x] These changes fix an issue that happens with a compile time feature not tested by the CI

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23966)
<!-- Reviewable:end -->
2019-08-16 04:29:55 -04:00
bors-servo
60c1908874
Auto merge of #23919 - tdelacour:ISSUE-21803, r=jdm
ISSUE-21803: Implement ConstantSourceNode audionode

<!-- Please describe your changes on the following line: -->
More or less followed the steps outlined in `components/script/dom/mod.rs` (and also used the [previous PR](https://github.com/servo/servo/pull/23152) on this issue as reference). Updated `wpt` tests as well.

---
<!-- 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 #21803 (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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23919)
<!-- Reviewable:end -->
2019-08-15 18:05:33 -04:00