Commit graph

6383 commits

Author SHA1 Message Date
Gregory Terzian
31da37fa6c stopping tokenizer if parser is aborted 2018-07-29 16:42:59 +08:00
Gregory Terzian
e49c8e7f26 spec compliant active parser concept 2018-07-29 16:42:59 +08:00
Gregory Terzian
f2ee941da2 Introduce DOMTracker, cancel eventsource fetch when aborting document load 2018-07-29 16:42:59 +08:00
Gregory Terzian
ff62ca7c01 implement window.stop, improve aborting document load 2018-07-29 16:42:54 +08:00
Anthony Ramine
3e8c2d659a Implement gl.getUniform() 2018-07-18 21:37:41 +02:00
bors-servo
a69c117da2
Auto merge of #21187 - tigercosmos:fetch, r=jdm
Make fetch() API use same-origin credentials by default

<!-- 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 #21146 (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/21187)
<!-- Reviewable:end -->
2018-07-16 22:46:30 -04:00
tigercosmos
af3741ab26 Make fetch() API use same-origin credentials by default 2018-07-17 10:28:24 +08:00
bors-servo
3003e6f897
Auto merge of #21184 - servo:webgl, r=jdm
Use active uniforms data to implement gl.uniform* checks

<!-- 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/21184)
<!-- Reviewable:end -->
2018-07-16 19:46:05 -04:00
Anthony Ramine
476640c3ab Use active uniforms data to implement gl.uniform* checks 2018-07-17 01:26:44 +02:00
Emilio Cobos Álvarez
fde93a60fe
style: Fix build and unit tests. 2018-07-16 19:44:19 +02:00
Anthony Ramine
e7631cea61 Move ANGLE name shenanigans to WebGL thread 2018-07-16 10:16:30 +02:00
Anthony Ramine
cbac5d05be Store active uniforms on the DOM side 2018-07-16 10:16:29 +02:00
Gregory Terzian
baef63becd use remote-event task source in EventSource 2018-07-13 13:56:46 +08:00
bors-servo
8988d674d0
Auto merge of #21126 - gterzian:tasksource_specific_cancelation, r=jdm
Introduce "per task source" cancellation

<!-- 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 #21119 (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/21126)
<!-- Reviewable:end -->
2018-07-10 08:23:34 -04:00
Gregory Terzian
671627e97e introduce "per task source" ignoring of tasks 2018-07-10 13:42:28 +08:00
bors-servo
82213cce6f
Auto merge of #21120 - paavininanda:HTMLSourceElementIDL_attributes, r=jdm
Exposing HTMLSourceElement IDL attributes

<!-- 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: -->
- [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/21120)
<!-- Reviewable:end -->
2018-07-09 20:47:09 -04:00
Anthony Ramine
ef7d495838 Properly implement the checks for gl.renderbufferStorage (fixes #20563) 2018-07-09 15:27:51 +02:00
Anthony Ramine
fc0e403fb0 Implement attribute aliasing check (fixes #21136) 2018-07-09 15:27:49 +02:00
bors-servo
41e105733c
Auto merge of #21129 - servo:webgl, r=emilio
Implement instanced WebGL drawing calls (part of #20791)

This is half of #20599. The check for drawElements is a bit more complex to implement.

<!-- 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/21129)
<!-- Reviewable:end -->
2018-07-08 04:45:37 -04:00
Anthony Ramine
4e6eea221a Implement instanced WebGL drawing calls (part of #20791) 2018-07-08 10:44:45 +02:00
Anthony Ramine
0aefffc5bf Correctly implement the vertex buffer checks in drawArrays
This is half of #20599. The check for drawElements is a bit more complex
to implement.
2018-07-08 10:44:45 +02:00
Anthony Ramine
f0ca100e87 Return an empty typed array from gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS) 2018-07-08 10:44:42 +02:00
Anthony Ramine
31774e9203 Implement gl.getParameter(gl.MAX_VIEWPORT_DIMS) 2018-07-08 10:14:10 +02:00
Anthony Ramine
0e6bec65bb Return typed arrays from gl.getParameter (fixes #20655) 2018-07-08 10:11:44 +02:00
Anthony Ramine
6996d1ce36 Fix gl.getShaderSource and gl.getShaderInfoLog
It only returns null if there was an error, and the only error isn't
implemented yet.
2018-07-08 10:11:44 +02:00
Anthony Ramine
0e93f06d8d Pass more GL limits to the ANGLE shader compiler 2018-07-08 10:11:44 +02:00
Manish Goregaokar
cceaede96a Make (dictionary)::empty() safe
It currently works by constructing from null (which will throw a runtime
error if there are non-defaultable members).

This changes it so that we no longer need a JSContext to construct this,
so it can be safely constructed. In the case of non-defaultable members,
this method simply does not exist.
2018-07-06 13:10:56 -07:00
bors-servo
c90737e6c8
Auto merge of #21118 - servo:webgl, r=emilio
Store vertex attribs data in DOM and optimise GetVertexAttrib

This is not an extremely useful change on its own but those things need to be stored on the DOM side to implement some draw checks anyway.

<!-- 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/21118)
<!-- Reviewable:end -->
2018-07-05 08:21:45 -04:00
Anthony Ramine
15389586d9 Make gl.useProgram(null) do the right thing 2018-07-05 14:20:47 +02:00
Anthony Ramine
fc593c68c5 Store active attribs in DOM and optimise active attributes APIs 2018-07-05 14:20:47 +02:00
Anthony Ramine
0e2e834d18 Fix gl.linkProgram() signature 2018-07-05 14:20:47 +02:00
Anthony Ramine
cde6023ed4 Store vertex attribs data in DOM and optimise GetVertexAttrib 2018-07-05 14:20:47 +02:00
Anthony Ramine
0814bd6699 Rename VertexAttribs::set_from to VertexAttribs::clone_from 2018-07-05 14:20:47 +02:00
Anthony Ramine
0018e5e6ba Refactor some vertex attrib checks 2018-07-05 14:20:47 +02:00
Anthony Ramine
f108a3e797 Introduce VertexAttribData 2018-07-05 14:20:47 +02:00
Anthony Ramine
5d43f1c9bd Rename BoundAttribBuffers to VertexAttribs and make it store a slice 2018-07-05 14:20:44 +02:00
bors-servo
3c43fa6b1d
Auto merge of #21105 - Manishearth:dom-inheritance-assert, r=nox
Assert that DOM structs have the correct first field

Not having the right field can lead to fun bugs like https://github.com/ferjm/servo/pull/1 where the struct gets mis-reinterpreted as what should be its parent (but is not layout-wise)

<!-- 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/21105)
<!-- Reviewable:end -->
2018-07-03 12:52:12 -04:00
Manish Goregaokar
ad198993b1 Assert that DOM structs have the correct first field
DOM structs embed their parent type as their first field. This
introduces a `.parent()` method to the DOM struct that returns its first
field, and codegens a type assert that ensures that `.parent()` returns
the parent struct.

This generates:

On `#[dom_struct]`:

```rust
impl HasParent for Type {
    type Parent = ParentType;
    fn as_parent(&self) -> ParentType {
        &self.first_field
    }
}
```

In the codegen files:

```rust
impl Type {
    fn __assert_parent_type(&self) {
        let _: &ParentType = self.as_parent();
    }
}
````
2018-07-03 09:39:29 -07:00
paavininanda
5f77b60c3a Making getters and setters 2018-07-03 01:34:22 +05:30
Emilio Cobos Álvarez
36495d677f
Remove unused code for parsing a sizes attribute.
We have `SourceSizeList` in
components/style/values/specified/source_size_list.rs which does the job and is
tested via WPT in Gecko.
2018-07-01 10:53:42 +02:00
Emilio Cobos Álvarez
719209316c
Fix servo build. 2018-07-01 00:54:30 +02:00
Emilio Cobos Álvarez
895946bb18
layout: script: Fix build. 2018-06-23 20:34:10 +02:00
Anthony Ramine
02b8766e75 Implement EXT_blend_minmax 2018-06-22 14:10:56 +02:00
Anthony Ramine
124fe69818 Properly enable EXT_shader_texture_lod 2018-06-22 12:20:22 +02:00
bors-servo
388a6f80ac
Auto merge of #21074 - jonathanKingston:toggle-attribute, r=Manishearth
Implement support for Element.toggleAttribute

Copy implementation following from [Firefox implementation](https://bugzilla.mozilla.org/show_bug.cgi?id=1469592) of soon to be standardised [Element.toggleAttribute](https://github.com/whatwg/dom/pull/656). [Other implementers agreed to ship](https://github.com/whatwg/dom/issues/461)

---
<!-- 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 don't fix an issue however the wpt-tests will merge soon and will cause an issue etc.

<!-- Either: -->
- [X] There are tests for these changes **(coming soon in wpt from Firefox and I tested them on this patch)**

<!-- 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/21074)
<!-- Reviewable:end -->
2018-06-21 03:54:23 -04:00
Jonathan Kingston
a271c615f7 Implement support for Element.toggleAttribute 2018-06-21 02:06:32 +01:00
bors-servo
8f84f893a7
Auto merge of #21072 - servo:webgl, r=emilio
Implement checks for vertex attribs enabled as arrays without a bound buffer

<!-- 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/21072)
<!-- Reviewable:end -->
2018-06-20 10:19:38 -04:00
Anthony Ramine
fc3dd7cefc Implement checks for vertex attribs enabled as arrays without a bound buffer 2018-06-20 15:59:06 +02:00
bors-servo
e231a68acf
Auto merge of #21050 - jonathanKingston:fix-replacability-of-window-attrs, r=jdm
Allow supported window attributes to be replacable.

As seen in https://github.com/servo/servo/pull/21045 some Window attributes don't support JavaScript from being able to shadow and replace their values.

This PR adds all other attributes I could find that are supported by servo to be replaceable.

---
<!-- 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: -->
- [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/21050)
<!-- Reviewable:end -->
2018-06-19 18:11:06 -04:00
bors-servo
0226a1a4ad
Auto merge of #21062 - tigercosmos:ggg, r=emilio
textarea minLength/maxLength

<!-- Please describe your changes on the following line: -->
 textarea minLength/maxLength

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

<!-- 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/21062)
<!-- Reviewable:end -->
2018-06-19 12:46:56 -04:00