Commit graph

8631 commits

Author SHA1 Message Date
marmeladema
ce3778afcc Remove some usage of unsafe code in iterator.rs 2019-08-09 00:02:09 +01:00
marmeladema
b08a3e6217 Remove some usage of unsafe code in AudioBuffer 2019-08-09 00:02:09 +01:00
marmeladema
4a5f51e079 Remove some usage of unsafe code in Permissions 2019-08-09 00:02:09 +01:00
marmeladema
8968286aa1 Don't mark new methods as unsafe in code generation 2019-08-09 00:02:09 +01:00
marmeladema
914bda9cd4 Remove some usage of unsafe code in CustomElementRegistry 2019-08-09 00:02:08 +01:00
marmeladema
0ecab7bbe0 Remove some usage of unsafe code in FileReader 2019-08-09 00:02:08 +01:00
marmeladema
5ca3dd9d05 Remove some usage of unsafe code in XMLHttpRequest 2019-08-09 00:02:08 +01:00
marmeladema
1d92796b03 Remove some usage of unsafe code in HTMLCanvasElement 2019-08-09 00:02:08 +01:00
marmeladema
d1282dc8cc Remove some usage of unsafe code in History 2019-08-09 00:02:07 +01:00
marmeladema
51e22fbc26 Remove some usage of unsafe code in Promise 2019-08-09 00:02:07 +01:00
Simon Sapin
c38c964f1b Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
bors-servo
6429fbeeff
Auto merge of #23891 - gterzian:fix_raf_flodding, r=asajeffrey
WebXr: allow for only a single raf message, until callbacks execute

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

See https://github.com/servo/webxr/issues/34

---
<!-- 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/23891)
<!-- Reviewable:end -->
2019-07-30 10:37:35 -04:00
Gregory Terzian
358b82279f allow for only a single raf message, until callbacks execute 2019-07-30 17:12:59 +08:00
bors-servo
8e7daa77b6
Auto merge of #23856 - servo:stylo-engines, r=nox
Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}

Renaming the variable helped make sure I looked at every use.

Also auto-generate relevant parts of `CSSStyleDeclaration.webidl`, to make libscript compile accordingly.

<!-- 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/23856)
<!-- Reviewable:end -->
2019-07-30 02:40:38 -04:00
Simon Sapin
0215d09ccb Generate apis.html and css-properties.json for docs as part of crates’ build scripts
… rather than as an extra step after `cargo doc`.
This helps always using the correct set of CSS properties
(for layout 2013 v.s. 2020).
2019-07-30 08:37:33 +02:00
bors-servo
73784246b8
Auto merge of #23887 - servo:jdm-patch-47, r=asajeffrey
Use origin of final HTTP response as document origin

I discovered surprising problems when loading pages from http://joshmatthews.net that load same-origin images and try to use them as webgl textures. Since there's a redirect from joshmatthews.net to www.joshmatthews.net, the images are not considered same-origin in Servo because the document stores the origin for the original request's URL, rather than the origin of the response that is received after processing any redirections.

<!-- 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/23887)
<!-- Reviewable:end -->
2019-07-29 23:20:53 -04:00
Josh Matthews
bfd9bbe82a Use origin of final HTTP response as document origin. 2019-07-29 21:58:58 -04:00
bors-servo
9043f247d9
Auto merge of #23839 - Manishearth:end-improve, r=asajeffrey
Improve session test lifecycle code

Requires https://github.com/servo/webxr/pull/25

Fixes https://github.com/servo/servo/issues/23796, hopefully

r? @asajeffrey

<!-- 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/23839)
<!-- Reviewable:end -->
2019-07-29 21:27:52 -04:00
bors-servo
bde4cb476e
Auto merge of #23886 - servo:jdm-patch-46, r=asajeffrey
Avoid panic during shutdown when Blobs exist

Observed when closing the UWP app when https://www.joshmatthews.net/demos/lamp.html is the active document.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because no real shutdown 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/23886)
<!-- Reviewable:end -->
2019-07-29 18:42:28 -04:00
Manish Goregaokar
d996d3c1eb Improve session test lifecycle code 2019-07-29 15:37:17 -07:00
Josh Matthews
9e18166550
Don't panic if file manager thread is unreachable when cleaning up Blobs. 2019-07-29 16:03:29 -04:00
Simon Sapin
ddb4e369dd Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020}
Renaming the variable helped make sure I looked at every use.
2019-07-29 17:37:03 +02:00
Simon Sapin
f1300bb98b Auto-generate CSSStyleDeclaration.webidl for CSS properties based on the style crate 2019-07-29 17:37:03 +02:00
Josh Matthews
8f5c37c0b5 Don't panic if WebGL thread can't be reached during finalization. 2019-07-29 10:09:24 -04:00
Alan Jeffrey
c757a9c009 Get XR sessions to track the draw texture, so we render the XR framebuffer rather than the default canvas framebuffer 2019-07-28 10:24:38 -04:00
Alan Jeffrey
133a17e15c Replace use of callbacks in webxr by channels 2019-07-26 23:36:13 -05:00
bors-servo
8ec28978cd
Auto merge of #23777 - jdm:webgl-main-thread, r=asajeffrey
Support running WebGL in its own thread or on the main thread.

This is the final missing piece to support WebGL in ANGLE on Windows. ANGLE doesn't support multiple GL contexts on separate threads using the same underlying Direct3d device, so we need to process all GL operations for WebGL on the same thread as the compositor. These changes try to retain enough flexibility to support both approaches so we can get WebGL working on Windows ASAP.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23697
- [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/23777)
<!-- Reviewable:end -->
2019-07-26 09:16:34 -04:00
bors-servo
2981fe87ce
Auto merge of #23855 - sreeise:media_frag_string, r=ferjm
Changed DOMString usages to string in MediaFragmentParser

<!-- Please describe your changes on the following line: -->
Changed `DOMString` usages to `String`/`&str`.

---
<!-- 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 #23834 (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/23855)
<!-- Reviewable:end -->
2019-07-26 08:22:09 -04:00
Josh Matthews
a2ca3ddbd9 Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -04:00
Josh Matthews
410d5bc772 Update SpiderMonkey bindings for Windows arm64 crash fix. 2019-07-25 20:23:21 -04:00
sreeise
598d343854 Changed DOMString usages to string in MediaFragmentParser 2019-07-25 13:34:18 -04:00
bors-servo
7adf022dfa
Auto merge of #23837 - cburgos:bugfix/link_called-update, r=jdm
update link_called when link function called.

<!-- Please describe your changes on the following line: -->
On call of WebGLProgram::link update link_called to true

---
<!-- 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 #23722  (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/23837)
<!-- Reviewable:end -->
2019-07-24 20:20:14 -04:00
marmeladema
88cacfb009 Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
marmeladema
2c5d0a6ebc Convert CGTraitInterface to use safe JSContext instead of raw JSContext 2019-07-24 08:24:50 +01:00
marmeladema
808fa65aef Convert internal methods to handle safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
marmeladema
2fb3f1f983 Callbacks now uses safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
marmeladema
6e4caf1153 DefineDOMInterfaceMethod now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:22 +01:00
marmeladema
aa0e4f5c76 GetPerInterfaceObject methods now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:22 +01:00
marmeladema
0a5a9bc7bc CreateInterfaceObjects now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
marmeladema
35dc5320ab Wrap(Global)Method now takes a SafeJSContext instead of a JSContext
as first argument.
2019-07-24 08:18:21 +01:00
marmeladema
cd0eb88a3e ConstructorEnabled now takes a SafeJSContext instead of a JSContext
a first argument. The function cannot be made safe because of call
to unsafe function is_exposed_in.
2019-07-24 08:18:20 +01:00
marmeladema
dbcd8d7af2 Add safe JSontext wrapper around unsafe RawJSContext 2019-07-24 08:18:20 +01:00
marmeladema
5d85f60f7d Rename JSContext from js::jsapi to RawJSContext 2019-07-24 08:18:19 +01:00
bors-servo
7ffe65e672
Auto merge of #23745 - georgeroman:implement_get_element_property_wd_command, r=jdm
Implement GetElementProperty wd command

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

<!-- 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/23745)
<!-- Reviewable:end -->
2019-07-23 21:24:57 -04:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
George Roman
e34a15c5ef Implement GetElementProperty WebDriver command 2019-07-23 23:19:08 +03:00
bors-servo
dcce668d3a
Auto merge of #23820 - georgeroman:link_text_selectors_for_find_element_wd_commands, r=jdm
Implement Link and PartialLink text selectors for FindElement and related WebDriver commands

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

<!-- 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/23820)
<!-- Reviewable:end -->
2019-07-23 14:36:10 -04:00
Christopher Burgos
bae975258d update link_called when link function called. 2019-07-23 12:03:24 -04:00
bors-servo
7afe2153e8
Auto merge of #23814 - Manishearth:events, r=asajeffrey
Partial support for events in WebXR

Needs https://github.com/servo/webxr/pull/20

r? @asajeffrey

<!-- 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/23814)
<!-- Reviewable:end -->
2019-07-23 09:44:59 -04:00
bors-servo
fdbb317d7a
Auto merge of #23774 - sreeise:media_fragment_parser, r=ferjm
Media fragment parser

<!-- Please describe your changes on the following line: -->
Media fragment parser for audio and video.

---
<!-- 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 #22366 (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/23774)
<!-- Reviewable:end -->
2019-07-23 05:00:01 -04:00