Commit graph

20001 commits

Author SHA1 Message Date
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
Fernando Jiménez Moreno
138c739205 Keep shared and js channels in sync 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
346d705c66 Do not skip buffer update during copyToChannel 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
a81389268a Throw IndexError if start_in_channel is equal to ArrayBuffer length 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
10e8ab3892 Apply start_in_channel to destination and not source during AudioBuffer.CopyToChannel 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
e0e1f5f900 Implement AudioBufferSourceOptions.AudioBuffer and always keep servo media audio buffer updated 2018-09-19 06:54:17 +02:00
Fernando Jiménez Moreno
5307766ed2 Check AudioBuffer options constraints 2018-09-19 06:54:16 +02:00
Fernando Jiménez Moreno
b8ade93538 Throw when trying to copy AudioBuffer data from or to a SharedArrayBuffer 2018-09-19 06:54:16 +02:00
Fernando Jiménez Moreno
e80ac0000f Fix AudioBuffer crash. Do not modify number of channels while moving from shared to js channels 2018-09-19 06:54:16 +02:00
bors-servo
a02c43dc67
Auto merge of #21712 - Manishearth:analysernode, r=ferjm
Implement AnalyserNode

<s>Needs https://github.com/servo/media/pull/127 to land (and a dependency
update)</s>

r? @ferjm

realtimeanalyser-fft-scaling.html, the test that actually checks for some level of FFT correctness, sadly doesn't work since we don't process nodes not connected to the destination.

However I locally fixed the test to work differently and it passed. We'll fix the processing model eventually.

<!-- 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/21712)
<!-- Reviewable:end -->
2018-09-18 18:59:07 -04:00
bors-servo
82e94e3b67
Auto merge of #21723 - servo:webgl, r=jdm
More drive-by WebGL and canvas fixes

<!-- 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/21723)
<!-- Reviewable:end -->
2018-09-18 11:06:51 -04:00
Manish Goregaokar
e9be179952 Set default channel count for AnalyserNode to 2
This was deliberately changed
(https://github.com/WebAudio/web-audio-api/pull/1397 ) but the tests
have not been updated
2018-09-18 18:18:36 +05:30
Manish Goregaokar
9dfc57878e Add createAnalyser 2018-09-18 18:18:36 +05:30
Manish Goregaokar
18b9ad9e5c AnalyserNode in script 2018-09-18 18:18:36 +05:30
Emilio Cobos Álvarez
60e28c61e5
Fix Servo build. 2018-09-18 11:52:39 +02:00
Anthony Ramine
900c3cc6b5 Implement gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL) 2018-09-18 11:48:34 +02:00
Emilio Cobos Álvarez
5ab81c4254
style: Make Servo build.
StrongRuleNode is really Sync.
2018-09-18 11:46:23 +02:00
Emilio Cobos Álvarez
4c97f68f3e
Fix tidy issues. 2018-09-18 11:46:01 +02:00
Manish Goregaokar
84ca681a78
servo_arc cleanups for publishing.
Differential Revision: https://phabricator.services.mozilla.com/D6034
2018-09-18 11:39:54 +02:00
Emilio Cobos Álvarez
22da3c22a2
style: Make LonghandId::flags an indexing operation.
I always see a bunch of time in our profiles in the iterator over the
declarations, this ensures it's not something dumb.

I suspect it's just a bunch of cache misses from walking the rule tree but in
any case this is consistent with the other getters we have and such.

Differential Revision: https://phabricator.services.mozilla.com/D5971
2018-09-18 11:39:48 +02:00
Emilio Cobos Álvarez
bc39f16b4b
style: Simplify CSSWideKeyword::parse.
Differential Revision: https://phabricator.services.mozilla.com/D5972
2018-09-18 11:39:42 +02:00
Emilio Cobos Álvarez
72ce653daf
style: Allow integer division inside calc() expressions.
Differential Revision: https://phabricator.services.mozilla.com/D5980
2018-09-18 11:39:36 +02:00
Emilio Cobos Álvarez
5cafac5d10
style: Remove DeclaredValue.
I think it used to be the case that all PropertyDeclaration variants had a
DeclaredValueOwned<T> inside. But that's no longer the case, so this abstraction
seems less useful now.

Differential Revision: https://phabricator.services.mozilla.com/D5978
2018-09-18 11:39:31 +02:00
Emilio Cobos Álvarez
4cd0f492f4
style: Deindent the non-css-wide-keyword-related code from cascade_property.
There's no good reason we construct a DeclaredValue as an intermediate step.

Differential Revision: https://phabricator.services.mozilla.com/D5977
2018-09-18 11:39:25 +02:00
Emilio Cobos Álvarez
c155efe7a5
style: Remove DeclaredValue::WithVariables.
We never construct it.

Differential Revision: https://phabricator.services.mozilla.com/D5976
2018-09-18 11:39:17 +02:00
Emilio Cobos Álvarez
d5ba19696a
style: Make ExtremumLength::valid_for static.
Differential Revision: https://phabricator.services.mozilla.com/D5975
2018-09-18 11:39:12 +02:00
Emilio Cobos Álvarez
8040c8bfec
style: Split apply_declarations into its own file, and without mako.
All that font code thrown out in the middle was making me mad.

There should be no change in behavior from this patch.

I ran rustfmt on the code but I corrected manually the following:

  https://github.com/rust-lang-nursery/rustfmt/issues/3025

Differential Revision: https://phabricator.services.mozilla.com/D5970
2018-09-18 11:39:06 +02:00
Anthony Ramine
fe6f53ffb4 Fix a small texSubImage2D bug 2018-09-18 10:49:31 +02:00
Anthony Ramine
8c100b23b1 Implement proper origin checks for WebGL textures (fixes #21522) 2018-09-18 10:33:42 +02:00
Anthony Ramine
36c8cd229e Remove Canvas2dMsg::DrawImageSelf
Now that all canvas share the same thread, it's useless to have a separate message
for that.
2018-09-17 16:24:01 +02:00
Anthony Ramine
9f7b746430 Specify capacity in CanvasData::read_pixels 2018-09-17 10:01:13 +02:00
Anthony Ramine
21e992bf40 Update azure
https://github.com/servo/rust-azure/pull/293
2018-09-16 20:53:38 +02:00
Anthony Ramine
f1e8eb640c Don't create 2D canvas contexts arbitrarily
Sometimes, the canvas still has no rendering context, in this case it represents
a transparent black rectangle.
2018-09-16 20:44:41 +02:00
Anthony Ramine
ed673f8070 Mark some canvas methods as unsafe
They use raw JS context pointers.
2018-09-16 20:44:41 +02:00
Emilio Cobos Álvarez
278ab8613f
style: Fix servo build and drop a FIXME there. 2018-09-15 19:19:18 +02:00
Emilio Cobos Álvarez
8aeaa3fc02
style: Remove a useless type bound. 2018-09-15 19:19:18 +02:00
Emilio Cobos Álvarez
da5283d066
style: Fix Gecko build. 2018-09-15 19:19:18 +02:00
Hiroyuki Ikezoe
3d909132ba
style: Implement any-hover and any-pointer media queries features.
Differential Revision: https://phabricator.services.mozilla.com/D3609
2018-09-15 17:57:29 +02:00
Hiroyuki Ikezoe
9354a42fc1
style: Add media feature keys for hover and pointer.
https://drafts.csswg.org/mediaqueries-4/#hover
https://drafts.csswg.org/mediaqueries-4/#pointer

In this patch series, we don't introduce any-hover and any-pointer media
features yet, but functionalities for them on each platform backends will be
introduced in this patch series, so eIntID_AllPointerCapabilities and relevant
stuff is added in this patch for the convenience that each platform backends
can be reviewed at once.

Differential Revision: https://phabricator.services.mozilla.com/D3296
2018-09-15 17:57:18 +02:00
Cameron McCormack
1f45fc0339
style: Update comments to no longer point to nsRuleNode.
There are a few mentions of nsRuleNode left but they are mostly
historical references so it makes sense to keep them.

Differential Revision: https://phabricator.services.mozilla.com/D5505
2018-09-15 17:57:12 +02:00
Brad Werth
6d57cbd881
style: Expand the Parser trait to allow anonymous CORS to be applied.
Depends on D5106

Differential Revision: https://phabricator.services.mozilla.com/D5341
2018-09-15 17:57:05 +02:00
Brad Werth
b96d44e329
style: Change Gecko_ImageValue_Create to take a CORS mode argument.
Differential Revision: https://phabricator.services.mozilla.com/D5106
2018-09-15 17:56:57 +02:00