Commit graph

4324 commits

Author SHA1 Message Date
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
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
Keith Yeung
2bb95989c5 Implement default values for RequestInit 2016-09-21 11:50:53 -07:00
Keith Yeung
5729a4a3d4 Fix incorrect indentation 2016-09-21 11:50:52 -07:00
Keith Yeung
4c616dad90 Add crossorigin attribute and implement step 14 of prepare a script
Add WPT test for HTMLScriptElement crossOrigin IDL attribute
2016-09-21 11:50:51 -07:00
Keith Yeung
f566a8d44f Update step annotations for prepare a script 2016-09-21 11:49:47 -07:00
bors-servo
7b98c8a788 Auto merge of #13332 - servo:mozmap, r=jdm
Implement the MozMap type.

Fixes #13144.

<!-- 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/13332)
<!-- Reviewable:end -->
2016-09-21 10:09:58 -05:00
Taryn Hill
2cb5adf6c6 Implement minlength for text inputs 2016-09-21 07:54:39 -05:00
Ms2ger
2d83e5a788 Implement the MozMap type.
Fixes #13144.
2016-09-21 14:03:34 +02:00
Ms2ger
9a9ca45084 Introduce wrapInNativeContainerType. 2016-09-21 14:03:33 +02:00
Ms2ger
9371889a03 Use innerContainerType in getConversionConfigForType. 2016-09-21 13:44:31 +02:00
Ms2ger
b2fc80a847 Rename innerSequenceType to innerContainerType. 2016-09-21 13:42:35 +02:00
Ms2ger
e942f50e1b Handle unsupported types better in getUnionTypeTemplateVars. 2016-09-21 13:17:05 +02:00
Ms2ger
d1d2074d43 Improve handling of ConversionResult::Failure in unions. 2016-09-21 13:17:04 +02:00
Ms2ger
6023560863 Improve jsid_to_str's name and documentation. 2016-09-21 13:17:03 +02:00
bors-servo
7c0dfd07ad Auto merge of #13309 - anholt:webgl-fbo-prep, r=emilio
webgl: FBO support preparation

<!-- Please describe your changes on the following line: -->
Sending this PR now so that we can get the webrender patches merged.  This is prep for the webgl-fbo series, with one small fix for some conformance tests.

---
<!-- 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/13309)
<!-- Reviewable:end -->
2016-09-20 19:19:21 -05:00
Eric Anholt
87c9333abd webgl: Do validation that the framebuffer is complete for FBO operations.
Given that we can't make a complete FBO yet, just return false from
the status check.
2016-09-21 08:05:45 +10:00
Eric Anholt
b2c169274a webgl: Don't forget update WebGL's texture binding on unbind.
This doesn't appear to fix any testcases, but I noticed it when fixing
renderbuffers.
2016-09-21 08:05:45 +10:00
Eric Anholt
2d66840145 webgl: Don't forget to update the WebGL context's RB binding.
We need to track the RB in the DOM context for
getParameter(gl.RENDERBUFFER_BINDING), among others.
2016-09-21 08:05:45 +10:00
Eric Anholt
cc294fffcc webgl: Update the match for WebGLError's new InvalidFramebufferOperation. 2016-09-21 08:05:45 +10:00
Ying-Ruei Liang(KK)
55a2270e16 Bring referrer policy delivery to <a> and <link> via rel attribute 2016-09-20 21:17:37 +08:00
Alexandrov Sergey
3488d15022 fix JS IndexedGetter and NamedSetter bindings generation 2016-09-20 14:50:21 +03:00
Connor Brewster
e9b2f1b916 Replace current session entry for reloads 2016-09-19 14:23:03 -05:00
bors-servo
fe426f65b9 Auto merge of #13306 - Jenselme:13247-decode-utf8-with-utf8-lossy, r=Ms2ger
Decode UTF-8 with from_utf8_lossy in DedicatedWorkerGlobalScope

<!-- 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 #13247

<!-- Either: -->
- [X] There are tests for these changes: `./mach test-wpt /workers/semantics/encodings/004.worker` passes

<!-- 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/13306)
<!-- Reviewable:end -->
2016-09-19 04:07:14 -05:00
Julien Enselme
9adda6e38d Decode UTF-8 with from_utf8_lossy in DedicatedWorkerGlobalScope 2016-09-19 10:29:05 +02:00
Arthur Marble
5f961f9fd9 Fix my typo on commit. Rest of the fixes will be here soon. 2016-09-18 07:32:05 -05:00
Arthur Marble
b874e76455 Made fixes for PR. 2016-09-18 07:12:39 -05:00
Arthur Marble
7986423cd7 One last refactoring before fixing 2016-09-18 05:57:24 -05:00
Arthur Marble
883902bd97 Most of the code refactoring needed to be done is done with this commit. 2016-09-18 03:41:16 -05:00
Arthur Marble
dbec9d8454 More code refactoring (exampleVar to example_var) 2016-09-18 01:02:57 -05:00
Arthur Marble
5fa54177ca Refactored a bluetooth* related files from codeStyle to code_style. 2016-09-18 00:07:32 -05:00
Arthur Marble
55ff161ed5 Refactored a couple of files from codeStyle to code_style. 2016-09-17 20:31:46 -05:00
Arthur Marble
dd4907c985 Refactor isClosed_ to is_closed and relativeContentType to relative_content_type. 2016-09-17 20:31:46 -05:00
Arthur Marble
e7ffbf819a Replace typeString with type_string. 2016-09-17 20:31:46 -05:00
Arthur Marble
5ce3510a50 Refactored metaKey to meta_key where possible 2016-09-17 20:31:46 -05:00
Arthur Marble
bdbc04409d This commit refactors altKey to alt_key when possible. 2016-09-17 20:31:46 -05:00
Arthur Marble
fd0622a741 This commit refactors shiftKey to shift_key where possible. 2016-09-17 20:31:46 -05:00
Arthur Marble
77170a14bc This commit refactors ctrlKey to ctrl_key wherever possible. 2016-09-17 20:31:46 -05:00
Rahul Sharma
8b10cca91f implement ExtendableEvent as base type for ServiceWorker events 2016-09-17 20:58:46 +05:30
bors-servo
2fb4dd9ec3 Auto merge of #12703 - sjmelia:12343_test_activation, r=Manishearth
Fix Issue 12343: Add pref-gated methods and test for activatable element

<!-- Please describe your changes on the following line: -->
Add methods to activatable elements; gated by a preference, for use in servo-specific WPT tests.

I cargo-culted over the "redundant check" from #12322, I don't really understand the possible exploit.

Obvious flaw is the copypasta for each element. I understand that the webidl codegen will produce a trait for ActivatableElement, but I can't see how I can provide a default implementation for this? I guess otherwise could be an improvement to have each element just delegate to an Enter.../Exit... method on the Activatable trait?

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

…states

<!-- 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/12703)
<!-- Reviewable:end -->
2016-09-16 20:34:25 -05:00
bors-servo
8ccfffaa77 Auto merge of #13294 - 6112:referrer-typo-fix, r=jdm
Fix most typoes for: "referer" -> "referrer"

Replace most uses of the word "referer" with "referrer", except for `hyper::header::Referer`. Also update the unit tests to compile & pass after those changes.

---
<!-- 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 #13286

<!-- Either: -->
- [ ]  There are tests for these changes OR
- [X] These changes do not require tests because they're only typo fixes.

<!-- 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/13294)
<!-- Reviewable:end -->
2016-09-16 15:43:54 -05:00