Commit graph

8329 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
0ff9ecc18a add a fixme message of not implemented mode 2018-10-08 16:11:59 +02:00
Víctor Manuel Jáquez Leal
c8bc9c8740 htmlmediaelement: typo 2018-10-08 16:11:59 +02:00
Anthony Ramine
05ef233097 Add a couple of bug links 2018-10-08 13:13:24 +02:00
Anthony Ramine
551c405b0f Avoid ctx.getImageData in canvas.toDataURL 2018-10-08 12:19:10 +02:00
Anthony Ramine
77c28bdfc9 Abstract some stuff common to ctx.getImageData and ctx.putImageData 2018-10-08 11:39:09 +02:00
Pyfisch
0ccaa7e1a9 Use keyboard-types crate
Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331
2018-10-07 22:39:00 +02:00
Simon Sapin
1f7ebfc8a2 Make mach test-unit not recompile components after mach build
Previously, the `tests` feature flag of the `embedder_traits` crate
caused it and every crate recursively depending on it to be built twice.

This feature flag was used to provide a specific set of "resources"
when running tests. Instead, this commits overrides the `main()` function
of the test harness to change resources at runtime before running any test.

This is done by adding a dependency that has `name = "test"` in its
`[lib]` section of `Cargo.toml`. This overrides the crate found by
`extern crate test;` in code generated by `rustc --test`.
2018-10-07 13:27:23 +02:00
Anthony Ramine
e62dbabb46 Handle some transparent black cases in ctx.getImageData 2018-10-07 02:52:06 +02:00
Anthony Ramine
241dba064d Align ctx.createImageData and ctx.getImageData with the spec 2018-10-06 11:41:48 +02:00
Anthony Ramine
75e6f5dfaa Avoid copying pixels in ctx.putImageData sometimes 2018-10-06 02:59:25 +02:00
Anthony Ramine
19f40cdf0b Introduce ImageData::get_rect
We use that to send only the pixels that will be actually drawn to the
canvas thread in CanvasRenderingContext2d::PutImageData.

We also make the canvas thread byte swap and premultiply colours in-place.
2018-10-06 01:12:05 +02:00
Anthony Ramine
784fbb2bc1 Merge some byte swap/premultiply functions in their own crate 2018-10-06 01:11:55 +02:00
bors-servo
987e376ca7
Auto merge of #21868 - servo:webgl, r=jdm
Improve ctx.putImageData

<!-- 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/21868)
<!-- Reviewable:end -->
2018-10-05 11:09:46 -04:00
Anthony Ramine
82c7d71811 Improve gl.putImageData
This commit should allow us to send smaller blobs to the canvas thread,
I made it into its own commit just to try=wpt.
2018-10-05 17:07:58 +02:00
Anthony Ramine
3d910feb3a Align canvas.putImageData with spec
The arguments are supposed to be long values, not floats.
2018-10-05 17:07:56 +02:00
Simon Sapin
a846ed1654 Upgrade to rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04)
CC https://github.com/rust-lang/rust/issues/54846
2018-10-05 15:06:29 +02:00
Anthony Ramine
62ea3c093a Move canvas.putImageData checks to the DOM side 2018-10-05 00:35:39 +02:00
Anthony Ramine
5efbeea61c Reindent the WebGL 2 case of canvas.toDataURL 2018-10-03 10:44:36 +02:00
Anthony Ramine
cfd446218b Slightly clean up the final URL creation in canvas.toDataURL 2018-10-03 10:43:41 +02:00
Simon Pieters
9b74f0af24 Remove the HTMLTable{Header,Data}CellElement interfaces
Fixes #17222.
2018-10-02 19:23:02 +02:00
Anthony Ramine
a3392610c3 Make HTMLCanvasElement::get_size return a Size2D<u32>
The changes keep trickling down.
2018-10-02 14:21:06 +02:00
Anthony Ramine
b8dbf2dddd Implement JSTraceable for Size2D<u32> 2018-10-02 14:21:06 +02:00
Anthony Ramine
435d4d9f25 Implement JSTraceable for (A, B, C, D) instead of (T, T, T, T) 2018-10-02 14:21:06 +02:00
Josh Matthews
06bca43aee script: Optionally store backtraces when throwing DOM exceptions. 2018-10-01 16:04:56 +02:00
Josh Matthews
5dc80dd07a webgl: Add feature to store backtraces for each WebGL API call for easier debugging. 2018-10-01 10:43:13 +02:00
bors-servo
9ee8890a72
Auto merge of #21506 - ferjm:webaudio.wpts, r=Manishearth
Fix some WebAudio WPTs

- [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/21506)
<!-- Reviewable:end -->
2018-09-25 13:21:37 -04:00
bors-servo
81fe52bd9a
Auto merge of #21757 - ferjm:offlineaudiocontext.constructor, r=jdm
Check constraints in both overloaded OfflineAudioContext constructors

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are WPTs tests for these changes and this should fix the remaining OfflineAudioContext failures.

<!-- 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/21757)
<!-- Reviewable:end -->
2018-09-25 12:02:36 -04:00
Fernando Jiménez Moreno
bc6586a9d0 Throw if time given to AudioScheduledSourceNode.stop is negative 2018-09-25 17:16:17 +02:00
Fernando Jiménez Moreno
bbc3565900 Use buffer_set flag for AudioBufferSourceNode buffer setter 2018-09-25 17:16:17 +02:00
sumit0190
8148b1b46f Add framebuffer check for mark_as_dirty, #21691 2018-09-24 08:59:00 -04:00
bors-servo
647796ede6
Auto merge of #21784 - servo:jdm-patch-33, r=nox
Use standard buffer format for DEPTH_STENCIL

This makes the Going Home title display for me on my Pixel 2.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21763
- [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/21784)
<!-- Reviewable:end -->
2018-09-23 06:38:27 -04:00
Josh Matthews
2ea6e9c813
webgl: Use standard texture format for WebGL-specific DEPTH_STENCIL format. 2018-09-21 18:40:49 -04:00
Josh Matthews
46f4b18722
webgl: Restore active texture if it's changed while deleting a texture. 2018-09-21 15:22:12 -04:00
bors-servo
fc0c191246
Auto merge of #21680 - paavininanda:relevant_mut, r=jdm
Adding all the relevant mutations

<!-- 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 a subset of #11416

<!-- Either: -->
- [x] These changes do not require tests

<!-- 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/21680)
<!-- Reviewable:end -->
2018-09-20 18:16:55 -04:00
bors-servo
302e2cf5a4
Auto merge of #21647 - AgustinCB:fix-space-leak-when-pipeline-is-closed, r=asajeffrey
Fix space leak when pipeline is closed

Add a new control message to drop remove worklets.

Implement `Drop` for `Worklet` and get the worklet thread pool. Use that
pool to send `ExitWorklet` to all the threads with the id of the
`Worklet` that it's dropping.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #17442
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because I don't know how to add a test for this :(

If you consider this needs a test, could you point me out on how to write (and run!) one in this project? I gave this a couple tries, but I wasn't very successful.

<!-- 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/21647)
<!-- Reviewable:end -->
2018-09-20 15:35:19 -04:00
paavininanda
3f24d67928 Adding relevant mutations and new test results 2018-09-20 23:59:31 +05:30
bors-servo
ac331c6663
Auto merge of #21750 - Manishearth:biquad, r=ferjm
Implement BiquadFilterNode

A bunch of tests still fail but some of it may be a timing issue, looking at it the tests are *at least* affected by https://github.com/servo/servo/issues/21659 (changing how they work to avoid problems from that does not make them pass but does change the exact value of the error), so I feel like I should fix that first before investigating these.

r? @ferjm

<!-- 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/21750)
<!-- Reviewable:end -->
2018-09-20 11:01:53 -04:00
Manish Goregaokar
daf85918e3 Fix GainNode constructor for gain audioparam 2018-09-20 20:23:29 +05:30
Manish Goregaokar
bb61487d8f Add createBiquadFilter() 2018-09-20 20:23:29 +05:30
Manish Goregaokar
1be41686d3 Implement BiquadFilterNode 2018-09-20 20:23:29 +05:30
Fernando Jiménez Moreno
13b5774017 Check constraints in both overloaded OfflineAudioContext constructors 2018-09-20 15:46:47 +02:00
Anthony Ramine
60c93cfabe Validate GLSL names (fixes #21287) 2018-09-20 15:00:47 +02:00
Anthony Ramine
a3d8b5d2d3 Fix the error when calling getProgramInfoLog on a deleted program (#20561) 2018-09-20 11:31:54 +02:00
Anthony Ramine
943f95fe47 Remove some misplaced framebuffer validations 2018-09-20 11:31:54 +02:00
nupurbaghel
7ab5df1106 implement missing steps for complete api 2018-09-20 03:13:32 +00:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
bors-servo
2ca7a13473
Auto merge of #21746 - llogiq:update-smallvec, r=emilio
This updates the smallvec crate and enables the union feature

We had a mix of 0.6.2 and 0.6.5 (which is the current release), this unifies to the latest version. It also enables the union feature which removes the discriminant, reducing memory usage.

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

<!-- 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/21746)
<!-- Reviewable:end -->
2018-09-19 15:44:03 -04:00
bors-servo
b1c6281d3c
Auto merge of #21353 - DanxiongLei:damonlei_fix, r=jdm
fix(webgl): fix issue https://github.com/servo/servo/issues/21352

If we have a bounded framebuffer previously, which is not the one to delete.
we would not change the !binding, but we would change the GLSide with Command::BindFramebuffer(Default).

change it to:

check the id before sending the Command

---

- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes fix #21352

- [ ] There are tests for these changes OR
- [x] These changes do not require tests because `it's obviously simple.`

<!-- 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/21353)
<!-- Reviewable:end -->
2018-09-19 13:36:24 -04:00
Fernando Jiménez Moreno
4a927b5b78 Rustfmt audiobuffer.rs 2018-09-19 07:28:12 +02:00
Andre Bogus
34b5d8fbe8 This updates the smallvec crate and enables the union feature
We had a mix of 0.6.2 and 0.6.5 (which is the current release),
this unifies to the latest version. It also enables the union
feature which removes the discriminant, reducing memory usage.
2018-09-19 07:16:30 +02:00