Commit graph

56 commits

Author SHA1 Message Date
Cullen Rhodes
2bd22f97ce servo: Merge #11329 - Report use statements that use {} with only one entry (from c-rhodes:11320); r=jdm
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 --faster` does not report any errors
- [X ] These changes fix #11320  (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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f9796fa696e9514280777398467696dd4f004b3
2016-05-27 07:11:17 -05:00
Anthony Ramine
35439b7531 servo: Merge #11308 - Implement [Func] (from nox:guarded); r=jdm
First part of #11292, this just includes support of `[Func]`.

Source-Repo: https://github.com/servo/servo
Source-Revision: 073c5e3b6b8950c01c9e5691925d24787fd06d53
2016-05-27 04:45:06 -05:00
Anthony Ramine
5aa3cb5ed3 servo: Merge #11326 - Move DOMString back to script (from nox:non-geckolib); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 6abcd793d780369767385b01b02ee725d6b10585
2016-05-24 02:07:29 -07:00
Emilio Cobos Álvarez
67d95b1def servo: Merge #11155 - codegen: Fix dictionary handling and semantics (from emilio:codegen-dict-keyword); r=Ms2ger
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 #11152 (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 #11152

Source-Repo: https://github.com/servo/servo
Source-Revision: 221db56b08e01157c97f5adba43799eeaee32f64
2016-05-13 02:47:08 -07:00
Zhen Zhang
38c9a9b49c servo: Merge #11076 - Implement File DOM object interface (from izgzhen:fileapi); r=Ms2ger
* Rewrite constructors of `Blob` and `File` with `DataSlice` as argument
* Update WebIDL of `Blob` and `File`
* Implement missing interfaces of `File` (However, due to lack of working `ArrayBuffer/ArrayBufferView` in `Blob`, so it still differs from spec)
* Update WPT test `File-constructor.html`

Source-Repo: https://github.com/servo/servo
Source-Revision: 392135bd0c2f512a0d632a7d76e667bc9af8f4a7
2016-05-11 10:28:05 -07:00
Josh Matthews
2e1e7b6406 servo: Merge #10081 - Support controlling interface and member visibility via preferences (from jdm:interfacepref); r=nox
This was easier to throw together than per-attribute/method support, and it gets rid of some nonstandard properties from our globals.

Fixes #7626.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 8255e74a61d62be94ef53caa9ebe6cd5082dcb4d
2016-05-02 11:35:38 -07:00
Arnaud Marant
dbd229e3c8 servo: Merge #10362 - Issue #10348 Implement StringMozPreference, string preferences, WPT test (from amarant:10348-string-preferences); r=jdm
I'm not exactly sure of the wanted semantics with boolean values.

Fixes #10348.

Source-Repo: https://github.com/servo/servo
Source-Revision: 17ffc6cf71278813885474b0135e268ac0eda081
2016-04-05 15:37:26 +05:01
Awal Garg
08dd4d94cd servo: Merge #10204 - Allow setting preferences to false in WPT tests (from awalgarg:fix10161); r=Manishearth
First patch to servo - apologies if I did something stupid :)

This is a fix for #10161. I have squashed the commits into one.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4cb626ae297b2132bcc2f4d4756772c1f8c09fc3
2016-03-27 00:17:55 +05:01
Peter
0b443ce56f servo: Merge #9786 - Fixed compile error in generated code, when webidl constructors have same number of args (from peterjoel:fix_codegen_is_array_like); r=jdm
One of the ways that generated code differentiates constructors is by comparing if the args are array-like. The generated code was calling a function `IsArrayLike` that no longer exists. I re-implemented it with a more rust-like naming scheme.

Source-Repo: https://github.com/servo/servo
Source-Revision: c37a0866608421d9e3afd67f0777e27091104f0f
2016-03-04 14:45:20 +05:01
zakorgyula
105f36d259 servo: Merge #9580 - Fixing issue with uniontypes not created with primitive types (from zakorgy:pythonfix); r=Ms2ger
Fixes #9531

Source-Repo: https://github.com/servo/servo
Source-Revision: 9778e5e84d95af1d1dadf71ad8a28701762bf8fc
2016-02-18 16:11:10 +05:01
Alexander Lopatin
6da1d8c042 servo: Merge #9543 - Fix #9508: Beautify our union enums constructors (from alopatindev:enums_constructors_codingstyle_fix); r=KiChjang
Solves #9508
@jdm Please review. Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: 28ecb0bba3fa395ed56bb2448a21e02c3ff88c8b
2016-02-07 05:30:57 +05:01
Emilio Cobos Álvarez
52314ac85d servo: Merge #9304 - webidl: Implement sequences in unions (from emilio:sequence-in-unions); r=nox
Unblocks #9053

Source-Repo: https://github.com/servo/servo
Source-Revision: 2f0daa1d47a2c720be241720b2083be4968404b6
2016-01-17 16:50:49 +05:01
Emilio Cobos Álvarez
59da8760a5 servo: Merge #9056 - Implement WebIDL sequence arguments (from emilio:sequence-args); r=nox
And use it for `WebGLRenderingContext#uniform1fv`.

Blocked on https://github.com/servo/rust-mozjs/pull/226

Fixes #544

Source-Repo: https://github.com/servo/servo
Source-Revision: c97d557720b2ef312b964534bd511d45161a2729
2016-01-12 22:58:30 +05:01
Chad Kimes
9899b01934 servo: Merge #9255 - Remove global fields from DOM objects (from ckimes89:remove-globalfield); r=nox
Fixes #9227

Source-Repo: https://github.com/servo/servo
Source-Revision: 53c4a782a0906c487139d4b6f3c62d9eca3f9f17
2016-01-12 18:03:37 +05:01
David Raifaizen
7cc47827e0 servo: Merge #8860 - Changing blob to use arc pointers in order to limit wasteful copying … (from craftytrickster:8801/blob-vec); r=jdm
Fixes #8801.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0fcee73ef38f65c1cb1ccf64608e16b4eaa25e53
2016-01-07 12:38:42 +05:01
Anthony Ramine
628d175690 servo: Merge #8147 - Implement weak-referenceable JS-managed objects (from nox:weakref); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e63b1e83d4acd272cdf293292f2a496455405098
2015-11-13 05:53:40 +05:01
Anthony Ramine
a0a6e0cd40 servo: Merge #8498 - Properly handle variadic arguments preceded by default values (from nox:fix-variadic-and-default-arguments); r=jdm
I broke that in #8197.

Source-Repo: https://github.com/servo/servo
Source-Revision: c44c73aa00ced6235266bd692833e22018f31138
2015-11-13 03:53:11 +05:01
Anthony Ramine
b98af75b92 servo: Merge #8197 - Support variadic interface arguments (fixes #8159) (from nox:variadic-interface-argument); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: f03a8261c58f650eda789b1f9f5363af6e15f59c
2015-11-11 19:03:26 +05:01
Ms2ger
7cb2a13f43 servo: Merge #8312 - Make DOMString a newtype around String, rather than a typedef (from Ms2ger:DOMString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abfd1fb1bf071961bc8a581927eaa96a2d3e2cba
2015-11-04 16:18:41 +05:01
rohan.prinja
e8b504412b servo: Merge #8221 - move modules around (from ajnirp:8130-reorganise); r=jdm
for #8130

Source-Repo: https://github.com/servo/servo
Source-Revision: daad09d44245228fba9118316937add71bec7c58
2015-11-04 02:27:02 +05:01
Ms2ger
4c8234b842 servo: Merge #8267 - Various improvements (from Ms2ger:cleanup); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 1dfc0481efd4687658ab34e68c883caeadd8b20f
2015-10-30 23:26:34 +05:01
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Brandon Fairchild
f7fb1e4b4a servo: Merge #7662 - Check for multiple import blocks separated by whitespace (from nerith:import); r=frewsxcv
Fixes #7381.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0d3c9223f09757124b1520c4f17e94fa8bbe249
2015-09-19 13:34:51 -06:00
Josh Matthews
e97b25662a servo: Merge #7432 - Add dashed CSS properties in CSSStyleDeclaration (from jdm:dashedprops); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 940bcadc134d1cf123518bebd84635b0053d6858
2015-08-30 08:20:57 -06:00
Anthony Ramine
c327bc7867 servo: Merge #7416 - Make the traits for the IDL interfaces take &self (from nox:methods-ref); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 71b277d5675556e61a82ae9dbf3105449c3a8275
2015-08-27 15:08:41 -06:00
João Oliveira
d39bd47b08 servo: Merge #7361 - make dom_struct derive HeapSizeOf (from jxs:master); r=Ms2ger
closes #7357

Source-Repo: https://github.com/servo/servo
Source-Revision: 532fd19d69fd11d06bca7539c722a46fab2c4419
2015-08-27 02:35:45 -06:00
Johann Tuffe
5c3a5a67f5 servo: Merge #7265 - Add alphabetical order check for use statements (from tafia:tidy-use); r=Ms2ger
close #7112

Source-Repo: https://github.com/servo/servo
Source-Revision: a5fbb2f2a6fa79755f975feff2435abb6a5dd0e9
2015-08-20 07:43:56 -06:00
Bogdan Cuza
b3e4dcef5f servo: Merge #7097 - Measure heap memory usage for more types. Fixes #6951 (from boghison:memtypes); r=jdm
Also adds HeapSizeOf implementations/derive for some types. I've used "Cannot calculate Heap size" as a reason everywhere, because my imagination is rather limited. If you'd like me to change this message for specific types, please write something like this: "Trusted - Cannot calculate Heap size for Trusted" so that it would be easier for me to replace them through a script :)

Source-Repo: https://github.com/servo/servo
Source-Revision: a03616f379c255cc6c9b6e1d04dd7d98bd9926ce
2015-08-13 13:16:14 -06:00
Bogdan Cuza
e9c4da1e57 servo: Merge #6699 - Tidy check for FooMethods in components/script/dom/*.rs and color for tidy (from boghison:tidyspec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 14ccb22e679722ed3374c8facec21adcf0f2b247
2015-07-28 08:56:39 -06:00
Michael Wu
7512d04e93 servo: Merge #6150 - Upgrade to Spidermonkey 39 (from servo:smupgrade3); r=mbrubeck
> Here it is.
>
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
>
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
>
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
>
> Generational GC works. SM doesn't work without it.
>
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
>
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
>
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
>
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
>
> This has been tested with the following zeal settings:
>
> GC after every allocation
> JS_GC_ZEAL=2,1
>
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
>
> Verify pre barriers
> JS_GC_ZEAL=4,1
>
> Verify post barriers
> JS_GC_ZEAL=11,1

Source-Repo: https://github.com/servo/servo
Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
2015-06-19 16:46:55 -06:00
Francesc Bautista
e5a8317929 servo: Merge #6284 - Fix #6242 testbinding add specialoperations (from fbau123:6242-testbinding-add-specialoperations); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 44a4b7886d05b6e219f71f958d913657b08eea7d
2015-06-09 17:12:43 -06:00
Anthony Ramine
b5ec349295 servo: Merge #5894 - Implement WebIDL attribute PutForwards (from nox:putforwards); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 29a43a00b39e544596e3bcce9bdfca2159313ba5
2015-05-07 09:07:12 -05:00
Anthony Ramine
6c157bacf0 servo: Merge #5779 - Implement the CSS interface (from nox:css-escape); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 1f9de5ee2ce4dc039b01e575d60a4fee41a0b8b8
2015-04-25 05:42:41 -05:00
Ms2ger
3dea48290b servo: Merge #5569 - Implement support for object in IDL (from Ms2ger:object); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3fb666cf606f835a9ab9165339e34023ab83a358
2015-04-07 13:32:02 -05:00
Tetsuharu OHZEKI
5bf2fed53e servo: Merge #5346 - Add bindings support for unrestricted float values (from saneyuki:binding); r=jdm
- Fix #707
- Take over from #5106

Source-Repo: https://github.com/servo/servo
Source-Revision: e77c4e2d76104855c42d1eee09caf36b61acccad
2015-03-25 01:09:47 -06:00
Ms2ger
16387caff8 servo: Merge #5208 - Implement USVString (from Ms2ger:USVString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 19cd87aefc24fa153fa013b5f96ae46de9a427fd
2015-03-13 14:30:49 -06:00
Chris Manchester
4e33e62e67 servo: Merge #5094 - Add support for BinaryName attribute to servo's codegen (fixes #4435) (from chmanchester:binarynames); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1f53d30f858a71206fce01116a3b1e5c199c1648
2015-02-28 09:57:58 -07:00
Ms2ger
3cee792603 servo: Merge #4766 - Import the util crate as util rather than servo_util (from Ms2ger:util); r=Manishearth
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27e0f16407629422b5e047e067d458142372c97e
2015-01-29 05:12:49 -07:00
Ms2ger
190438fa42 servo: Merge #4682 - Move to to_owned rather than into_string (from servo:to_owned); r=jdm
into_string has been removed from Rust.

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997
2015-01-20 07:54:46 -07:00
Matt McCoy
8fca9b5656 servo: Merge #4566 - Fixes #4164 Make Constructor and new functions take GlobalRef by value (from mattnenterprise:globalref-by-value); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7800d98728bfa1375ad8b6a2dac7f2f35603b6d1
2015-01-08 13:12:55 -07:00
Ms2ger
3d0a04c20a servo: Merge #4526 - Move away from Root::deref (from servo:deref-1); r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.

Source-Repo: https://github.com/servo/servo
Source-Revision: 141b5d038fad3c0c44a6f1b309b8ca9edea54580
2015-01-02 09:22:51 -07:00
Shing Lyu
7ddf0392f6 servo: Merge #4470 - Add "type" to Blob (from shinglyu:contentType); r=jdm
A follow-up for issue #1820, adds the optional "type" support.

Source-Repo: https://github.com/servo/servo
Source-Revision: 111a196e9d300164391d12ab292c1d4c0ef2b44a
2015-01-01 08:33:40 -07:00
Manish Goregaokar
e0c8a4271d servo: Merge #4173 - plugins: Autogeneration of Reflectable; Inheritance lint (from Manishearth:a-more-dom-struct); r=kmcallister
Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector.

A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.

Source-Repo: https://github.com/servo/servo
Source-Revision: 56d1b16d1b3a18d5ffa1d9c32562d3b209851711
2014-12-27 22:12:45 -07:00
Manish Goregaokar
905ce805f5 servo: Merge #4485 - Replace most to_string calls by into_string calls (from servo:into_string); r=Ms2ger
`str::to_string()` goes through a `Formatter`, `str::into_string()` is a direct copy and is apparently 5× faster.

This is a rebase of the boring and bitrot-prone parts of #4366.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9857ea26cb9ee262654bee97322dbbf373486bff
2014-12-27 06:51:44 -07:00
Glenn Watson
b185394a0f servo: Merge #4405 - Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d (from servo:rustup_20141124); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fbf42c951b2f53d91e2f32f8035484a07ea83493
2014-12-17 18:45:49 -07:00
Edit Balint
f458bd96e5 servo: Merge #4387 - Fixed codegen error regarding Uint8ClampedArray (from ebalint:codegen); r=Ms2ger
If we added a "readonly attribute Uint8ClampedArray arrayAttribute" in a webidl, codegen created the binding method like this: "fn ArrayAttribute(self) -> * mut JSObject;" but called it with a "*mut JSContext" parameter.

Source-Repo: https://github.com/servo/servo
Source-Revision: 38a4e71502f3b668ff322d9047af7ec8892312d3
2014-12-16 04:06:56 -07:00
Shing Lyu
8ddb629206 servo: Merge #4108 - Blob (from shinglyu:blob); r=jdm
Let's build this incrementally. I implemented a `Blob` that can hold a `DOMString`, and has `size` attribute and `slice(...)` method. I'll finish the rest in later PRs.

Source-Repo: https://github.com/servo/servo
Source-Revision: d2a67abea9f6acd7b0ea29a852bf5029aef3f405
2014-12-09 08:43:08 -07:00
Michael Booth
8b0b657cb0 servo: Merge #4156 - Updated reflect_dom_object to be passed by value fixes #4122 (from Michael03:master); r=Ms2ger
This fixes issue #4122

Source-Repo: https://github.com/servo/servo
Source-Revision: ed45aa9efd6cf238a83fcae6a772886df61771f7
2014-12-02 05:24:49 -07:00
Mukilan Thiyagarajan
f925eec2be servo: Merge #3941 - Allow passing arguments to setTimeout/setInterval callbacks (from mukilan:timeout-arguments); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 43b452f3b874c4bf0392ceaec27a0e40f18b5e34
2014-11-15 11:09:32 -07:00
Manish Goregaokar
4271b077f4 servo: Merge #3684 - Add #[dom_struct], inline autogenerated trace() methods (from Manishearth:dom_struct); r=jdm
This attribute implies #[jstraceable], #[privatize], and #[must_root].

Source-Repo: https://github.com/servo/servo
Source-Revision: 9af090006017747809f5f72a8870bd516b20f483
2014-10-15 23:24:20 -06:00