Commit graph

4397 commits

Author SHA1 Message Date
bors-servo
d42235ee90 Auto merge of #13485 - mathieuh:xhr-event, r=jdm
Make readystatechange fire more often (fixes #13481)

<!-- 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 #13481 (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/13485)
<!-- Reviewable:end -->
2016-10-04 09:46:11 -05:00
bors-servo
b80769dbf5 Auto merge of #13571 - servo:simplify-fetching, r=nox
Simplify fetching code.

<!-- 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/13571)
<!-- Reviewable:end -->
2016-10-04 08:05:44 -05:00
Ms2ger
aa48ec7628 Remove Document::add_blocking_load. 2016-10-04 13:11:03 +02:00
Ms2ger
8d01baaf44 Remove unused Document::prepare_async_load. 2016-10-04 11:27:45 +02:00
Ms2ger
59689475af Avoid PendingAsyncLoad in fetch_async. 2016-10-04 11:17:05 +02:00
Ms2ger
e8e4a570ba Remove duplicated definition of 'doc'.
The same line exists higher up in the function.
2016-10-04 10:32:23 +02:00
Mathieu Hordesseaux
fe8749eae6 Make readystatechange fire more often (fixes#13481) 2016-10-03 16:32:12 +02:00
Imanol Fernandez
a07d6b37cc Fix WebGL tests & Implement WebGLRenderingContext::{validateProgram, getProgramInfoLog, disableVertexAttribArray}, r=emilio 2016-10-03 16:17:19 +02:00
bors-servo
522734de22 Auto merge of #13554 - nox:cleanup-global, r=<try>
Some cleanups related to globals
2016-10-03 04:48:13 -05:00
Anthony Ramine
dd5c527689 Replace ScriptHelpers by GlobalRef methods 2016-10-03 11:42:21 +02:00
Anthony Ramine
2f465265d1 Refactor WorkerGlobalScope::report_an_error 2016-10-03 09:22:20 +02:00
Anthony Ramine
f892008907 Remove GlobalRef::history_traversal_task_source 2016-10-02 23:06:54 +02:00
Anthony Ramine
3d719aafa6 Remove GlobalRef::dom_manipulation_task_source 2016-10-02 23:06:50 +02:00
Anthony Ramine
ffe712a103 Reorganise the BluetoothUUID utility functions 2016-10-02 23:06:33 +02:00
Anthony Ramine
4ccdbccdd7 Move workers' pipeline IDs to WorkerGlobalScope 2016-10-02 23:06:30 +02:00
bors-servo
3eb6fc4818 Auto merge of #13525 - servo:empty-href, r=emilio
Ignore stylesheet links with an empty href.

<!-- 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/13525)
<!-- Reviewable:end -->
2016-10-02 13:02:14 -05:00
Anthony Ramine
fce0a8e7cf Reorganise CGDescriptor
Group some codegen operations together.
2016-10-02 16:51:59 +02:00
Tom Huibregtse
abfbcfe9c4 Rename hyper import and update as HttpMethod 2016-10-01 20:38:45 -05:00
bors-servo
36222cf543 Auto merge of #13531 - wldcordeiro:measure-hashset-mem, r=jdm
Remove ignore-heap-size comment to enable memory measurement on HashSet

Remove the ignore-heap-size comment to enable the memory measurement.

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

- [x] These changes do not require tests because they just enabled memory measurement

@jdm the build fails, and I'm not so sure why. Assistance please? 😄

<!-- 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/13531)
<!-- Reviewable:end -->
2016-10-01 12:05:13 -05:00
bors-servo
0c80ac9a1b Auto merge of #13428 - szeged:wbt_promise, r=jdm
Update WebBluetooth to use Promises

<!-- Please describe your changes on the following line: -->
Initial patch to support promises in WebBluetooth.
This will allow us to use the expected syntax in webpages.

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

<!-- 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/13428)
<!-- Reviewable:end -->
2016-10-01 06:18:59 -05:00
Jan Zerebecki
95a7482d26 Remove same-origin-data-url flag from fetch implementation
The spec removed it. Check the scheme instead, data is always same origin now,
except for workers.
This also updates the comments to make step numbers match the spec.
Closes #13362
2016-10-01 00:27:03 -07:00
Wellington Cordeiro
f12a7526a4 Remove ignore-heap-size comment to enable memory measurement on HashSet 2016-09-30 12:07:39 -06:00
bors-servo
ec4f61e538 Auto merge of #13449 - servo:fill_property_descriptor, r=jdm
Pass a MutableHandle to fill_property_descriptor.

<!-- 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/13449)
<!-- Reviewable:end -->
2016-09-30 05:06:15 -05:00
Ms2ger
e2f5ce4893 Ignore stylesheet links with an empty href. 2016-09-30 11:23:45 +02:00
Ms2ger
ebbf9fd4d5 Deindent the main part of handle_stylesheet_url. 2016-09-30 10:58:45 +02:00
bors-servo
7fe688b8e9 Auto merge of #13461 - servo:media, r=Manishearth
Pass the correct attribute to handle_stylesheet_url.

<!-- 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/13461)
<!-- Reviewable:end -->
2016-09-30 01:21:08 -05:00
bors-servo
c212234258 Auto merge of #13508 - tschneidereit:fix-sh-methods-codegen, r=emilio
Fix codegen for iterable's forEach method

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

The `forEach` method installed on iterable DOM interfaces uses SpiderMonkey's self-hosted implementation of `Array.prototype.forEach`, but it has the wrong value for `nargs`, causing failing asserts in debug and wrong behavior in release builds.

Fixes #13451

<!-- 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/13508)
<!-- Reviewable:end -->
2016-09-29 20:21:32 -05:00
Jeena Lee
3216009731 Implement the Fetch method 2016-09-29 08:19:41 -07:00
bors-servo
a03a5e814a Auto merge of #13345 - malisas:malisa-bodyAPI, r=jdm
implement Body for dom::Response and dom::Request

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

This PR adds dom::Response and dom::Request's `Text()`, `Blob()`, `Json()`, and (part of the) `FormData()` functions, part of the [Body mixin](https://fetch.spec.whatwg.org/#body). The corresponding tests have also been updated as passing.

@jeenalee also contributed to this PR, primarily the `Blob()`, `Json()`, and `FormData()` implementations.

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

<!-- 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/13345)
<!-- Reviewable:end -->
2016-09-29 06:19:59 -05:00
Till Schneidereit
9a8f520047 Fix codegen for iterable's forEach method
The `forEach` method installed on iterable DOM interfaces uses SpiderMonkey's self-hosted implementation of `Array.prototype.forEach`, but it has the wrong value for `nargs`, causing failing asserts in debug and wrong behavior in release builds.

Fixes #13451
2016-09-29 12:35:11 +02:00
Malisa Smith
a5e5cd0e9e impl Body mixin for dom::Response and dom::Request 2016-09-28 22:10:53 -07:00
bors-servo
0ee35a3b34 Auto merge of #13475 - servo:disable-eventsource, r=Manishearth
Disable EventSource until it is fully implemented.

This also causes a number of tests that currently time out to fail quickly.

<!-- 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/13475)
<!-- Reviewable:end -->
2016-09-28 14:50:44 -05:00
bors-servo
341fb72fc9 Auto merge of #13431 - nox:webidl, r=Ms2ger
Update the WebIDL parser

<!-- 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/13431)
<!-- Reviewable:end -->
2016-09-28 07:07:16 -05:00
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