Commit graph

5314 commits

Author SHA1 Message Date
Ms2ger
05942344b4 Disable EventSource until it is fully implemented.
This also causes a number of tests that currently time out to fail quickly.
2016-09-28 11:50:06 +02:00
bors-servo
c7e1a575a5 Auto merge of #13382 - glennw:headless, r=larsbergstrom
Add OSMesa headless mode, run WPT against Webrender.

<!-- 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/13382)
<!-- Reviewable:end -->
2016-09-27 21:46:13 -05:00
Glenn Watson
cdb69d4423 Add OSMesa headless mode, run WPT against Webrender, update tests. 2016-09-28 11:57:33 +10:00
bors-servo
040075ad08 Auto merge of #13358 - rjgoldsborough:form-action-url-11219, r=mbrubeck
Form action url 11219

First pass at fixing #10580.
I've added a new macro that returns a DomString with either the attr val or the doc url.
I then made the form element use that macro on the action attribute.
I also added a test that contains an iframe with a form and base url that submits to a page in
a resources directory.

I made all these changes based on https://github.com/servo/servo/pull/11219#issuecomment-223318881.

The only thing I'm confused on is how to change step 8. It looks to just be getting the action so I'm wondering if I need to change either step 9 or 10 instead?

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #10580 (github issue number if applicable).

- [X] There are tests for these changes OR

using that macro with the form action,
making the form submit process use base url,
adding tests.

<!-- 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/13358)
<!-- Reviewable:end -->
2016-09-27 15:28:09 -05:00
bors-servo
ec5ae8562d Auto merge of #13412 - gterzian:failure_if_no_metadata, r=jdm
Invoke failure steps if there's no metadata

Media element network response processing code should invoke failure steps if there's no metadata.

Fixes #13375.

<!-- 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/13412)
<!-- Reviewable:end -->
2016-09-27 12:49:56 -05:00
Jake Goldsborough
ce249d9384 adding macro to return string or url,
using that macro with the form action,
making the form submit process use base url,
adding tests.
2016-09-27 09:33:11 -07:00
Ms2ger
d207919a02 Pass the correct attribute to handle_stylesheet_url. 2016-09-27 17:46:36 +02:00
bors-servo
06bb57bdcb Auto merge of #13406 - Mylainos:issue-13377, r=jdm
Extract panic-catching for JS engine callbacks into a separate function

All of our generated code for script contains inline code like this:
```
let result = panic::catch_unwind(AssertUnwindSafe(|| {
    ...
};
match result {
    Ok(result) => result,
    Err(error) => {
        store_panic_result(error);
        return false;
    }
}
```
This PR change it to something like this:
```
wrap_panic(|| { ... }, false)
```

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

- [ ] 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/13406)
<!-- Reviewable:end -->
2016-09-27 09:58:42 -05:00
Gregory
3e3349599e checking for metadata in htmlmediaelement::response_complete
updated test expectations

reverting changes to webgl test
2016-09-27 19:36:36 +08:00
Ms2ger
6928fbfa31 Pass a MutableHandle to fill_property_descriptor. 2016-09-27 10:29:47 +02:00
bors-servo
ef1b594f48 Auto merge of #13422 - SecurityInsanity:master, r=KiChjang
Make Assign throw error on invalid url

Step 2 of: https://html.spec.whatwg.org/multipage/browsers.html#dom-location-assign says we should throw an error. This makes it do that.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13420  (github issue number if applicable).
- [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/13422)
<!-- Reviewable:end -->
2016-09-27 01:24:28 -05:00
bors-servo
d03f0a20cc Auto merge of #13405 - ashrko619:textencoder-encoding, r=Ms2ger
Removed support for UTF-16 in TextEncoder

<!-- 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 #13231  (github issue number if applicable).

<!-- 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/13405)
<!-- Reviewable:end -->
2016-09-26 22:19:40 -05:00
Ashwin R
67a94d81d1 removed support for UTF-16 in TextEncoder 2016-09-27 05:44:52 +05:30
Alexandrov Sergey
cf284cc035 implement HTMLOptionsCollection and add related items to HTMLSelectElement 2016-09-26 21:49:10 +03:00
Alexandrov Sergey
6bda471007 remove link to #5876 due to everything has been fixed in PR #13333 2016-09-26 21:49:09 +03:00
Mátyás Mustoha
e05a839d25 Update WebBluetooth to use Promises 2016-09-26 20:02:42 +02:00
Hugo Thiessard
4654dd91a8 Issue #13377 Extract panic-catching for JS engine callbacks into a
separate function
2016-09-26 19:20:22 +02:00
bors-servo
9b7708063a Auto merge of #13397 - aochagavia:dispatch-event, r=Ms2ger
Return an enum instead of a boolean from dispatch_event

Fixes #13196

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13196.
- [X] These changes do not require tests because the functionality hasn't changed

<!-- 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/13397)
<!-- Reviewable:end -->
2016-09-26 12:09:48 -05:00
Eric Coan
096c0362fe Make Assign throw error on invalid url 2016-09-26 11:03:22 -06:00
Adolfo Ochagavía
6c8bfdb774 Return an enum instead of a boolean from dispatch_event
Fixes #13196
2016-09-26 17:52:38 +02:00
Anthony Ramine
107b92cc62 Update the WebIDL parser 2016-09-26 13:17:12 +02:00
Anthony Ramine
4c084cefa3 Properly keep track of our union typedef support in WebIDL.py 2016-09-26 13:08:17 +02:00
bors-servo
d00639c55f Auto merge of #13416 - vigneshsarma:issue-13408, r=jdm
Replace instances of old ServiceWorker specification URL with new one

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

The old specification URL is
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/, which has
been replaced by the new one at https://w3c.github.io/ServiceWorker/.

---
<!-- 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 #13408 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because all the changes are in commented parts of the code.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

The old specification URL is
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ has
been replaced by the new one at https://w3c.github.io/ServiceWorker/.

<!-- 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/13416)
<!-- Reviewable:end -->
2016-09-25 10:12:30 -05:00
Vignesh Sarma K (വിഘ്നേഷ് ശ൪മ കെ)
3bf5813096 Replace instances of old ServiceWorker specification URL with new one
The old specification URL is
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/ has
been replaced by the new one at https://w3c.github.io/ServiceWorker/.
2016-09-25 20:32:32 +05:30
bors-servo
89804bb251 Auto merge of #13396 - jdm:FormData_iterable, r=jdm
Added FormData Iterable

Implement FormData's iterator
Rebased from #13104.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13020
- [X] There are tests for these changes (It adds `./mach test-wpt tests/wpt/web-platform-tests/XMLHttpRequest/formdata-foreach.html`)

Notice: Our `FormData` is implemented by `HashMap` ,  which is different from [Gecko's array implementation](3c6ff93c8f/dom/base/FormData.h (L160)). So our `FormData`'s iterator order is different from Gecko's, as there is no way to keep our key's original insertion order.

<!-- 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/13396)
<!-- Reviewable:end -->
2016-09-24 03:54:18 -05:00
bors-servo
2ba804e6db Auto merge of #13361 - Mylainos:issue-13350, r=Wafflespeanut
Report tidy error for space after (

<!-- Please describe your changes on the following line: -->
Add report in tidy for code which have a space after the `(` like `some_function( argument)`

---
<!-- 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 #13350 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/13361)
<!-- Reviewable:end -->
2016-09-23 22:16:57 -05:00
Chiu-Hsiang Hsu
652c578e15 Added FormData Iterable 2016-09-23 10:19:11 -04:00
Nikhil Shagrithaya
9d378ceb74 use .set_tokenlist_attribute to set rel content attribute in SetRel
Removed .ini files expecting crashes
2016-09-23 17:36:59 +00:00
Hugo Thiessard
0ac212afb1 Issue #13350 Report tidy error for space after ( 2016-09-23 14:01:58 +02:00
Jeena Lee
3b75d223f1 Enable OpenEndedDictionary in Headers
Expected wpt results are updated as well.
2016-09-22 15:01:34 -07:00
bors-servo
2b1a39c2ae Auto merge of #12830 - jdm:promises, r=Ms2ger
Implement promise bindings

This implements support for using Promises in WebIDL, executing promise callbacks in batches (equivalent to running all enqueued jobs from a setTimeout(0)), and attaching native callbacks to promise objects. This is the combined work of myself, @dati91, and @mmatyas based on the following prior work in Gecko:
* Codegen.py
* Promise.webidl
* Promise.cpp/Promise.h
* PromiseNativeHandler.h

This does not implement microtasks per #4283. This allows us to make progress on testing code that requires the use of Promises right now; the microtasks work is more complicated, but also largely orthogonal to implement.

Requires https://github.com/servo/mozjs/pull/89, https://github.com/servo/rust-mozjs/pull/287, and https://github.com/servo/rust-mozjs/pull/294.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4282
- [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/12830)
<!-- Reviewable:end -->
2016-09-22 15:23:23 -05:00
Josh Matthews
e9c0606454 Remove maybe_ prefix from Promise methods. 2016-09-22 16:21:23 -04:00
Josh Matthews
498ccd41e8 Support an equivalent of Trusted<T> for Rc<Promise> objects named TrustedPromise. 2016-09-22 16:16:59 -04:00
Josh Matthews
27d44c8d10 Add a simple API to reject promises with DOM error values. 2016-09-22 16:16:58 -04:00
Josh Matthews
ae81ab3972 Create meaningful tests for native promise handlers. 2016-09-22 16:16:56 -04:00
Josh Matthews
57b3ccd38c Support promises in workers. 2016-09-22 16:16:55 -04:00
Josh Matthews
ef501603bf Ensure Promise "reflector" is not GCed before the Rust object. 2016-09-22 16:16:54 -04:00
Josh Matthews
f89355b85d Add integration tests for interacting with promises from native code. 2016-09-22 16:16:53 -04:00
Josh Matthews
ab168204ed Support native promise callbacks. 2016-09-22 16:16:52 -04:00
Josh Matthews
7ba3172ce0 Useful APIs for resolving/rejecting from native code. 2016-09-22 16:16:51 -04:00
Mátyás Mustoha
fd778b4240 Enqueue promise jobs from SpiderMonkey callbacks, and execute them in batches. Implement native Promise APIs.
Add SpiderMonkey hooks for enqueuing promise jobs. Start porting various native Promise APIs.
2016-09-22 16:16:49 -04:00
Josh Matthews
a1091772ec Implement binding support for returning and accepting Promises in WebIDL. 2016-09-22 16:16:48 -04:00
bors-servo
d74f6adf54 Auto merge of #13066 - mskrzypkows:htmlselect_index, r=KiChjang
Implement indexed access on select elements

<!-- Please describe your changes on the following line: -->
Added methods for indexed access on select: SetLength, Length, Item, IndexedGetter

---
<!-- 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 #11763 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/13066)
<!-- Reviewable:end -->
2016-09-22 13:14:27 -05:00
bors-servo
b86420d693 Auto merge of #13351 - servo:rustup, r=Ms2ger
Update Cargo and Rust

<!-- 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/13351)
<!-- Reviewable:end -->
2016-09-22 12:10:05 -05:00
Ofek
ee149cdac7 implement WebGLRenderingContext::isEnabled 2016-09-22 13:44:35 +03:00
Maciej Skrzypkowski
670693ba7e Implement indexed access on select elements
refs #11763
2016-09-22 09:17:15 +02:00
bors-servo
73b2963509 Auto merge of #13333 - splav:JS-setters-fix#13327, r=jdm
fix JS IndexedGetter and NamedSetter bindings generation

<!-- Please describe your changes on the following line: -->
Fix JS IndexedGetter and NamedSetter bindings generation.

---
<!-- 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 #13327 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the test will be in PR for #13129 as currently these setters are used by nobody.

<!-- 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/13333)
<!-- Reviewable:end -->
2016-09-22 01:36:25 -05:00
Keith Yeung
07c9cfecec Add FetchMetadata and update corresponding methods 2016-09-21 14:26:03 -07:00
Keith Yeung
4dcf693a75 Use fetch infrastructure to load external scripts 2016-09-21 11:50:55 -07:00
Keith Yeung
d4816762fa Add fetch_async to PendingAsyncLoad, DocumentLoader and Document 2016-09-21 11:50:54 -07:00