Commit graph

293 commits

Author SHA1 Message Date
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
Anthony Ramine
63c4490e73 Kill the plugins crate and its clippy support
Sometimes clippy gets outdated by months, and its current support setup
means that each Servo component need to opt into it by depending on
the plugins crate manually, and not all components do that.
2017-02-21 11:50:36 +01:00
Anthony Ramine
3eed8a91a1 Move script lints to script_plugins
The plugins crate now just allows to hook into clippy from a single crate.
2017-02-16 18:37:14 +01:00
Anthony Ramine
8bcf36b9a5 Change #[privatize] into #[derive(DenyPublicFields)] 2017-02-15 10:24:01 +01:00
Anthony Ramine
c84cea995b Derive DomObject with a proc macro 2017-02-14 14:13:43 +01:00
Ms2ger
1563e12bb3 Remove a gate for the stabilized more_struct_aliases feature. 2017-02-06 10:33:51 +01:00
bors-servo
cbcafd18f4 Auto merge of #15189 - jdm:microtasks, r=nox
Implement microtask checkpoints

This generalizes the work previously done for Promise job callbacks. There is now a microtask queue that correctly processes all queued microtasks after each turn of the event loop, as well as after a scripted callback finishes executing, and after a classic script executes.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4283
- [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/15189)
<!-- Reviewable:end -->
2017-02-03 07:53:17 -08:00
Josh Matthews
32d4f84a30 Generalize promise job queue into solitary microtask queue. 2017-02-01 12:54:33 -05:00
Eric Anholt
57ba1646bc webgl: Convert non-raw TexImage sources to the requested format.
The code was returning RGBA8 data from the non-raw sources (HTML
canvas elements, JS ImageData, etc.), but we then validated and passed
that rgba8 data as if it was whatever format/datatype was specified in
TexImage2D/TexSubImage2D, so the pixels would come out as garbage.

It would seem like we could just rewrite the passed in format/datatype
for the TexImage call to be RGBA/UNSIGNED_BYTE, but that would leave
incorrect levels of precision if the internalformat didn't match the
format/datatype (and older desktop implementations often ignore the
internalformat in choosing their internal format, anyway).
2017-01-28 14:21:21 -08:00
bors-servo
8382aaae83 Auto merge of #15176 - nox:the-sadness, r=Ms2ger
Revert "Auto merge of #15136 - nox:mitochondria-finally-makes-it-into…

<!-- 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/15176)
<!-- Reviewable:end -->
2017-01-24 08:02:15 -08:00
Anthony Ramine
f1738ee266 Revert "Auto merge of #15136 - nox:mitochondria-finally-makes-it-into-the-tree, r=jdm"
This reverts commit ca6376a714, reversing
changes made to bb24fd3177.
2017-01-24 11:50:43 +01:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
Anthony Ramine
2002de441f Use mitochondria::OnceCell to store ScriptThread in TLS 2017-01-23 12:16:13 +01:00
Simon Sapin
71fb02953c Remove usage of phf_macros.
It’s a compiler plugin that uses unstable compiler APIs
that are not on a path to stabilization.

With this changes, there is one less thing that might break
when we update the compiler. For example:
https://github.com/sfackler/rust-phf/pull/101
2017-01-18 17:25:59 +01:00
Anthony Ramine
30f0553ac7 Introduce PendingScript
This moves scripts' loading results in Document, instead of maintaining them
behind a DOMRefCell in each HTMLScriptElement.
2017-01-11 17:37:19 +01:00
Imanol Fernandez
c5705bff50 WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
Simon Sapin
67aea3bba4 Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
Alan Jeffrey
7ace30f9bd An in-memory RNG that shares its file descriptor. 2017-01-05 13:51:53 +00:00
Bobby Holley
b9d99390ad Switch to crates.io for atomic_refcell. 2017-01-03 18:14:27 -08:00
Ms2ger
4fca766bbd Make the dom module private. 2016-12-22 16:06:23 +01:00
Ms2ger
86d59212fe Introduce a script::test module to expose the APIs needed for unit tests. 2016-12-22 15:58:53 +01:00
Emilio Cobos Álvarez
7582a2d59d
script: Move the stylesheet loading code from htmllinkelement to stylesheet_loader. Make it track subresource loads properly. 2016-12-16 16:57:20 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Anthony Ramine
e8c9c12b6e Remove usage of FnBox for animation frame callbacks (fixes #14416) 2016-12-06 13:15:09 -10:00
Anthony Ramine
0c64bd766a Refactor the locate a namespace algorithm 2016-12-01 11:55:14 +01:00
Rahul Sharma
114c491111 Initial work on job queues for service workers 2016-11-22 01:29:37 +05:30
bors-servo
22aebdf5d4 Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon

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

Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778.

Still wanted to get this in.

r? @SimonSapin

<!-- 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/14246)
<!-- Reviewable:end -->
2016-11-17 15:34:47 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Abelardo E. Mendoza
b372e7c98f script creates methods taking '*mut JSContext' unsafe
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01:00
bors-servo
579ab2d99c Auto merge of #13774 - KiChjang:event-source-constructor, r=jdm
Finish up the implementation of EventSource

Full implementation of EventSource, complete with closing and reopening streams.

Fixes #8925.

<!-- 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/13774)

<!-- Reviewable:end -->
2016-11-12 08:08:38 -06:00
Emilio Cobos Álvarez
a7cee44f59
script: Ensure script is initialized before running script.
Fixes #14154
2016-11-12 02:27:51 +01:00
Keith Yeung
2924726b0a Implement reestablishing the connection for EventSource
And remove unneeded fields in EventSourceContext
2016-11-11 14:50:47 -08:00
fokinv
d30bcbd339 Blacklisted items are removed when calling getServices/Characteristics/Descriptors. 2016-11-04 15:36:55 +01:00
bors-servo
738f0eb974 Auto merge of #14044 - servo:bluetooth, r=emilio
Split the bluetooth code out from the net crates.

<!-- 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/14044)
<!-- Reviewable:end -->
2016-11-03 15:04:43 -05:00
Ms2ger
4fbe415e80 Split the bluetooth code out from the net crates. 2016-11-03 16:45:07 +01:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Anthony Ramine
a9767333eb Remove #![feature(custom_attribute)] 2016-11-03 11:24:13 +01:00
Anthony Ramine
c4f27e42b7 Remove #![feature(custom_derive)] 2016-11-03 10:14:21 +01:00
bors-servo
c6e15f8ef2 Auto merge of #14028 - servo:rustup, r=nox,SimonSapin
Update Rust to 1.14.0-nightly (7c69b0d5a 2016-11-01)

<!-- 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: -->
- [ ] 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/14028)
<!-- Reviewable:end -->
2016-11-02 21:49:08 -05:00
Anthony Ramine
391296278d Make #[derive(JSTraceable)] a procedural macro 2016-11-03 01:10:35 +01:00
Simon Sapin
5bb4c6c884 Use heapsize_derive instead of heapsize_plugin 2016-11-03 01:10:32 +01:00
bors-servo
6ef46ab9e4 Auto merge of #13453 - metajack:media-query-list, r=jdm
Implement matchMedia and MediaQueryList

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

Fixes #13376.

<!-- 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/13453)

<!-- Reviewable:end -->
2016-11-02 14:51:12 -05:00
Jack Moffitt
138a0480fe Implement matchMedia and MediaQueryList
Fixes #13376.
2016-11-02 13:40:22 -06:00
Anthony Ramine
d6479c6f0f Update Rust to 1.14.0-nightly (c59cb71d9 2016-10-26) 2016-10-27 19:18:56 +02:00
Anthony Ramine
4b813e0bdc Merge script::parse and script::dom::servoparser 2016-10-11 16:42:01 +02:00
Anthony Ramine
1854566683 Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)
A cargo bump and a switch to serde_derive is needed to do this rustup.
2016-10-09 18:53:47 +02:00
Anthony Ramine
c5ab84638d Make TopTypeId an untagged union 2016-10-06 00:35:04 +02:00
Anthony Ramine
5f5266a3e5 Reorder features in script crate 2016-10-06 00:35:02 +02:00
Simon Sapin
fbde392c3d Revert "Make DOMRefCell use style’s copy of RefCell"
This reverts commit ec723057b2.
2016-10-04 18:35:01 +02:00
Simon Sapin
89a29a7f12 Use parking_lot::RwLock instead of DOMRefCell for PropertyDeclarationBlock 2016-10-04 18:34:59 +02:00