Commit graph

262 commits

Author SHA1 Message Date
Corey Farwell
df29454b47 servo: Merge #12178 - Refactor util::prefs operations to be methods on static struct (from frewsxcv:prefs); r=emilio
<!-- 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
- [X] 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: b0a8ce5341f5148e36523fee0b0fcbc2684c0a68
2016-07-03 08:19:04 -07:00
Ms2ger
f660aeb599 servo: Merge #11883 - Some bindings improvements (from Ms2ger:bindings-refactor); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 00af25b6855b1c3cd2ddf5119478e9119efaffd9
2016-06-27 18:07:07 -05:00
Josh Matthews
b6061f6085 servo: Merge #11803 - Avoid unwinding into C stack frames (from jdm:catch-unwind); r=nox
Fix the biggest cause of #6462 by wrapping lots of JS->Rust transitions in catch_panic, and calling resume_panic after all Rust->JS transitions return.

Known issue:
* Finalizers can be called in response to any JS engine allocation that triggers a GC, so it's possible for a Rust object's Drop implementation that panics to leave an interrupted panic in TLS. This is why 30d8009 is part of this PR; the underlying problem is that there's no clear place to resume the panic after it is interrupted.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #6462 (github issue number if applicable).
- [X] There are tests for these changes OR

Source-Repo: https://github.com/servo/servo
Source-Revision: 87d991ebd24886051ad1131bdbe3b9019cb1c4b3
2016-06-22 08:36:01 -05:00
Jansen Jan
4da054ca26 servo: Merge #11214 - Support WindowProxy return values in bindings (from farodin91:windowproxy); 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 #10965 (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.

Source-Repo: https://github.com/servo/servo
Source-Revision: 08a55e29511a2b26b7ae26ebb0b9271f80e2a7bd
2016-06-10 10:53:35 -05:00
Anthony Ramine
b5c0573c3d servo: Merge #11620 - Implement [Unscopable] (fixes #11583) (from nox:unscopable); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: f56848a0e8a9137f128088d1dd0f86e11fad841a
2016-06-07 09:04:15 -05:00
Anthony Ramine
6c7df3f453 servo: Merge #11465 - Implement window.openURLInDefaultBrowser() (fixes #11292) (from nox:open); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 3052e4f478e660a60c01dcd2368607429d423e10
2016-05-27 12:03:56 -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
Anthony Ramine
2a7c8273fe servo: Merge #11231 - Update Rust to 1.10.0-nightly (cd6a40017 2016-05-16) (from servo:rustup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 82036b57c728578d9fd9b5991aabcf2b12eddb71
2016-05-17 07:04:12 -07:00
Anthony Ramine
81c5e4cfed servo: Merge #11188 - Use JS_NewStringCopyN for the representation of interface objects (from nox:n-better-than-z); r=Ms2ger
This removes the need for the final null byte and we can make NonCallbackInterfaceObjectClass::new safe again I guess.

Source-Repo: https://github.com/servo/servo
Source-Revision: 252b0d8fa53f0ffff247f38743627b6e5ffb74e9
2016-05-16 06:26:13 -07:00
Ms2ger
6d664715e1 servo: Merge #11173 - Stop using JSAutoRequest (from servo:requests); r=nox
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
- [X] These changes do not require tests because no functional change

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: ea84601bf08618254200b3faca055c36e9ff29b4
2016-05-13 06:41:22 -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
AgostonSzepessy
4fc3b7fe82 servo: Merge #9890 - update.sh downloads all *.py tests from mozilla central (from AgostonSzepessy:update-webidl-tests); r=nox
components/script/dom/bindings/codegen/parser/update.sh downloads all *.py tests from https://dxr.mozilla.org/mozilla-central/source/dom/bindings/parser/tests

Source-Repo: https://github.com/servo/servo
Source-Revision: b054cb82a6b50b07209c9a8670076d1d9ed61605
2016-05-09 05:04:57 -07:00
Anthony Ramine
da31a4c64f servo: Merge #10756 - Update SpiderMonkey (from servo:smup); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 2c69278067a23703b251a69c875bee49449c6bfc
2016-05-03 15:46:40 -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
Anthony Ramine
dbaf1869d4 servo: Merge #10819 - Refactor the call hook on non-callback interface objects (fixes #10744) (from nox:call-without-new); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a92a6360cf2833c405ec668ee144db5de44c15cf
2016-04-25 02:45:29 -07:00
Keith Yeung
db9fff8daa servo: Merge #10674 - Avoid generating parameter names that are Rust keywords (from KiChjang:codegen-avoid-rust-keywords); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: f93379ff4e33a74922b859ac2be14c43c58ec24f
2016-04-18 04:41:43 +05:01
Arnaud Marant
6bc6d2d94a servo: Merge #10545 - remove unreachable code in codegen (from amarant:unreachable-codegen); r=Ms2ger
code is unreachable after return, and identical to the upper block

Source-Repo: https://github.com/servo/servo
Source-Revision: 155e4052d150179ea8423a7ea626a84e25409718
2016-04-13 02:36:33 +05:01
Josh Matthews
7bc8e96798 servo: Merge #10288 - Enable dictionaries in WebIDL sequences. Fixes #10282 (from jdm:dictseq); r=nox
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: acaac52be7973cfbf6621796d4fb944fbfd343ff
2016-03-31 23:59:13 +05:01
Ben
0218098aa7 servo: Merge #10152 - Fix #9511. Export webidl enums using "pub use" (from jdm:9511-rebase); r=nox
Change typedef codegen to export the underlying enum itself, rather
than an alias. Works around https://github.com/rust-lang/rust/issues/31355

Rebase of #9691.

Source-Repo: https://github.com/servo/servo
Source-Revision: edcf24fd4d39e86548717ecdfe36e2f1df30daac
2016-03-24 10:11:44 +05:01
Guillaume Gomez
d5f008cc87 servo: Merge #10096 - Make all interface objects share the same funToString (from GuillaumeGomez:fun_to_string); r=nox
Fixes #9280

Source-Repo: https://github.com/servo/servo
Source-Revision: e95368df6297e664122da8ae15f25724be557353
2016-03-21 16:21:44 +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
Anthony Ramine
76517d377c servo: Merge #9652 - Lazily define interface objects on globals (fixes #6419) (from nox:lazy-interface-object); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: b188cb542e92f3490b049e8db8473c7e2acf6dc9
2016-02-25 21:13:11 +05:01
Anthony Ramine
125de5e009 servo: Merge #9067 - Make NamedNodeMap's named properties unenumerable (from nox:unenumerable-named-properties); r=jdm
https://dom.spec.whatwg.org/#dom-htmlcollection-item

Source-Repo: https://github.com/servo/servo
Source-Revision: 7192495e1a5ae24b62c61b718df38ee2f8803e03
2016-02-23 22:29:30 +05:01
Anthony Ramine
b008636747 servo: Merge #9728 - Preliminary commits for lazy interface objects in #9652 (from nox:lazy-preliminaries); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 3550993075a0dedb5857a421cf39c3e8942b30f8
2016-02-23 19:44:45 +05:01
Guillaume Gomez
1eea3df8a9 servo: Merge #9633 - All interface objects now share the same hasInstance (from GuillaumeGomez:has_instance); r=nox
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 267630779316d2291b10ed8e60d0f9f5f2100ab1
2016-02-19 19:20:33 +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
Ms2ger
19b3af46cf servo: Merge #9678 - Derive the Debug trait for WebIDL-generated enums (from servo:debug-enum); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 07cb6599d0829d2eccdd8a2a0cf46ff657901593
2016-02-18 09:22:57 +05:01
Anthony Ramine
66105be900 servo: Merge #9676 - Support [ExceptionClass] (from nox:domexception); r=KiChjang
Use it on DOMException.

Source-Repo: https://github.com/servo/servo
Source-Revision: 61f09cce4e7c1681fd1f7fbefada596316f06809
2016-02-17 18:22:47 +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
Prabhjyot Singh Sodhi
84cdb8c94c servo: Merge #9419 - generate typedefs in CodegenRust (from psdh:includeTypedef); r=nox
fixes #9384

Source-Repo: https://github.com/servo/servo
Source-Revision: a75f2cecda9b259dcfe576de53f690d9c96a36d8
2016-01-26 21:41:57 +05:01
Michael Rosenberg
2d8d6310cf servo: Merge #9430 - Fix issue #9411 - Do not generate empty WebIDL 'Constant' modules (from doomrobo:WebIDL-no-empty-const-modules); r=nox
Fixes issue #9411

Source-Repo: https://github.com/servo/servo
Source-Revision: a19b14313a333c5e895e481768237275f564044f
2016-01-26 15:11:16 +05:01
nxnfufunezn
28dd0cb227 servo: Merge #9413 - Move ConstantSpec, NonNullJSNative and define_constants from utils to interface (from nxnfufunezn:issue-9412); r=nox
Fixes #9412
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: e93a460db4902195ec64e6fe67817f9e3a7c1da9
2016-01-24 20:19: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
Anthony Ramine
46b9c7f311 servo: Merge #8954 - Fix prototypes of interface objects (fixes #2665) (from nox:protochain); r=Ms2ger
Callback interface objects' (i.e. NodeFilter's) prototype is now Object instead of
Function and non-callback interface objects' their proper ancestor, starting with
the Function prototype.

The function do_create_interface_objects is removed in favour of 4 functions:
create_callback_interface_object, create_interface_prototype_object,
create_noncallback_interface_object and create_named_constructors.

While this increases the amount of codegen'd code, this greatly improves the
readability of the code involved in this part of DOM, instead of having one function
doing 4 different things. We can always find a more adequate abstraction later.

NativeProperties and everything related to the interface objects have been removed
from the utils module.

Fixes #2665.

Source-Repo: https://github.com/servo/servo
Source-Revision: e977a6e69a06ad69e87cc235b4ede60f8fb3eca3
2016-01-12 21:31:47 +05:01
Corey Farwell
226d983d0f servo: Merge #9200 - Remove unneeded dict sorting functions in CodegenRust.py (from frewsxcv:unnecessary-sorting-functions); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 85792d281964858d3a9ff4fa46e2c7cd8700c03f
2016-01-11 02:12:42 +05:01
Guillaume Gomez
c2448b55aa servo: Merge #9146 - Generate PartialEq automatically (from GuillaumeGomez:generate_partial_eq); r=nox
r? @nox

Fixes #8804

Source-Repo: https://github.com/servo/servo
Source-Revision: 1096183cceea9ec78ab02caa33ee2d14668d977d
2016-01-04 00:08:10 +05:01
Anthony Ramine
c866440a7c servo: Merge #8993 - Slightly reduce the output of codegen (from nox:small-codegen-slimming); r=Ms2ger
Interfaces which we know are never instantiated can generate less code.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8dc4b8dcb927ba8f61b99d869efb688903504c07
2015-12-18 06:06:15 +05:01
Anthony Ramine
fc06cf52ab servo: Merge #8996 - Do not create modules from files with nothing to codegen (fixes #8711) (from nox:rm-empty-modules); r=frewsxcv
Fixes #8711.

Source-Repo: https://github.com/servo/servo
Source-Revision: d1ea209f0fb4951ee7cd773e448ee65968968d38
2015-12-16 20:37:37 +05:01
Anthony Ramine
d5b0ce5bfa servo: Merge #8055 - Remove all our patches to the WebIDL parser (from nox:rm-webidl-patches); r=Ms2ger
All the tweaks we need can just be made through Configuration.py.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9c4ca39ebe57502b74d75aa9d6953b017d884f54
2015-12-16 14:50:25 +05:01
Anthony Ramine
f502bfb306 servo: Merge #8991 - Merge CGClassConstructHook and CGClassNameConstructHook (fixes #8934) (from nox:clean-construct-hook); r=frewsxcv
Fixes #8934.

Source-Repo: https://github.com/servo/servo
Source-Revision: 59a354427923f1c4febd9b8bcd6692900aa10f98
2015-12-16 04:44:50 +05:01
Guillaume Gomez
994b1c9d37 servo: Merge #8986 - Fix invalid returned value for dictionary types (from GuillaumeGomez:patch-2); r=nox
part of #8882

cc @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 432087c0ea6a5a419273b448eec62eb7549ba242
2015-12-15 22:28:58 +05:01
Guillaume Gomez
421e148400 servo: Merge #8966 - Fix invalid dictionary inheritance (from GuillaumeGomez:patch-1); r=nox
Needed by #8882.

cc @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 201b5c98202fc6fbdd7478c650199777e5eb9dd8
2015-12-14 16:39:23 +05:01
Keith Yeung
277a5024e0 servo: Merge #8854 - Treat 'undefined' passed to optional JS arguments as missing (from KiChjang:undefined-as-missing); r=frewsxcv
@frewsxcv please don't hurt me for this.

I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments.

Fixes #8813.
Fixes #6558.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bab1cd7a4634618d18985d273c6997984919ecc
2015-12-13 10:12:56 +05:01
Josh Matthews
b54ed93b4a servo: Merge #8827 - Avoid a null-dereference using debug mozjs builds. This matches the e… (from jdm:debugmozjscrash); r=Ms2ger
…quivalent code upstream in Gecko.

Source-Repo: https://github.com/servo/servo
Source-Revision: 59029325c04d94af636e0b48478b00404afc4f7c
2015-12-08 11:42:53 +05:01
Anthony Ramine
192fe9ad11 servo: Merge #7988 - Implement [Unforgeable] (from nox:unforgeable); r=jdm
This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.

Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.

No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.

Source-Repo: https://github.com/servo/servo
Source-Revision: 20df7fb7c82a5501342ac85278294e4bcb5b1ab7
2015-12-03 10:34:05 +05:01
Anthony Ramine
0d9105190f servo: Merge #8751 - Remove unused slot in prototype object (fixes #8588) (from nox:rm-prototype-slot); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 29c42a9f78a20ddeb5aa89b79d578a039c087967
2015-11-30 18:58:57 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +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
Ms2ger
3890fca29d servo: Merge #8428 - Update js (from Ms2ger:conversions); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b40882093a306032d38ad02e30f0095e0a49ec21
2015-11-13 00:44:52 +05:01
Emilio Cobos Álvarez
1f31ca57ca servo: Merge #8412 - Add WebIDL sequence return values (from emilio:webidl-sequence-return); r=jdm
And use it for `WebGLRenderingContext::getSupportedExtensions`.
Part of #544

Source-Repo: https://github.com/servo/servo
Source-Revision: 12f6ba29a74029fa8c83cc7274181d441e1e52dd
2015-11-11 22:46:15 +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
Eli Friedman
86523168cb servo: Merge #8286 - Remove unnecessary uses of #[no_move] (from eefriedman:no-move); r=nox
The patch makes RootCollection a bit safer by making the StackRootTLS hold
it in place.

RootedVec was doing an extremely delicate dance and just hoping nobody
messed it up; switch to a Box to be safe.

CodeGenRust seemed to be using no_move for no particularly good reason.

Source-Repo: https://github.com/servo/servo
Source-Revision: 92f9e58310f1b7c3925882979ae9352967866b66
2015-11-08 12:22:00 +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
Nathan Froyd
0e1dc5b616 servo: Merge #8226 - unblock using JS_GC_ZEAL (from froydnj:gc-zeal); r=Ms2ger
I think these patches move the `JS_SetReservedSlot` call to the right place for #6057.  I'm not sure that the interface to `create_dom_global` is the best; passing a `JSVal` or a `*libc::c_void` seemed about equal, so I'd welcome feedback there.

Source-Repo: https://github.com/servo/servo
Source-Revision: 3efa74997626afb3eda0f34842a4969da468dff0
2015-10-28 16:55:36 +05:01
Nathan Froyd
cb4c680b95 servo: Merge #8040 - generate JIT argument type information for methods (from froydnj:codegen-arg-info); r=jdm
This enhances `CodegenRust.py` to output `JSTypedMethodJitInfo` structures where appropriate.  This brings a notable speedup to tests like Dromaeo's `dom-attr/getAttribute`, which improves by several orders of magnitude with these patches applied.

If there are tricks for addressing the XXX comments, I would appreciate hearing them.

I think this addresses all of #6904.

Source-Repo: https://github.com/servo/servo
Source-Revision: d1295e9e7d0acfa32a55827fa8e28a297dbcf214
2015-10-28 00:37:06 +05:01
Akos Kiss
5eb76ac9ed servo: Merge #8132 - Fix char types in script binding codegen (from akosthekiss:codegen-u8); r=Ms2ger
Use `libc::c_char` instead of `i8` for character data since that's more
portable. (Some architectures, e.g. AArch64, have unsigned characters,
i.e. `u8`.)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3342cd9531c1f3c0419a0733b73c65838780a0f7
2015-10-21 10:44:14 -06:00
Anthony Ramine
bb8125a3da servo: Merge #8041 - Introduce trait Castable (from nox:castable); r=jdm
Removes all those messy FooCast structures in InheritTypes.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
2015-10-21 07:57:32 -06:00
Corey Farwell
f73c951c58 servo: Merge #8059 - Fix formatting for variable in doc-comment within codegen (from frewsxcv:fix-codegen-docs); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b847e4dd778e49ba60c786da4aa77813dee8b553
2015-10-18 07:55:48 -06:00
Anthony Ramine
06fd534a1b servo: Merge #8020 - Generate all Derived implementations in codegen (from nox:codegen-derived); r=Ms2ger
Follow-up of #7873.

@Ms2ger r? :)

Source-Repo: https://github.com/servo/servo
Source-Revision: 417cf5738e4609f4b2e34e9e0c4f7ef68f087432
2015-10-15 12:53:08 -06:00
Anthony Ramine
9be943ec1a servo: Merge #7972 - Introduce DOMClass::heap_size_of (from nox:codegen-heapsize); r=Ms2ger
It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a0a91eba794af027723051c7f039cb22088aa65
2015-10-15 07:13:55 -06:00
Michael Wu
e4dfd5fc9a servo: Merge #7727 - Support the updated spidermonkey bindings (from michaelwu:update-bindings); r=jdm
Still need to finish the rust-mozjs update and make cargo use it, but it's close enough that I don't expect much to change on the servo side.

Some changes here
- bools are properly translated now
- char16_t is handled as u16 now
- JS_GlobalObjectTraceHook isn't mangled now
- JSJitInfo has been adjusted
- A const fn is used to generate bitfields in JSJitInfo
- Manually generating handles now requires calling an unsafe function. It's not actually required, but it's too much of a hassle to generate them manually now due to bindgen++ adding base classes now.

Source-Repo: https://github.com/servo/servo
Source-Revision: b34fd5bd7e55be1d577df5cf70b41af8a6cc716b
2015-10-14 14:48:44 -06:00
Anthony Ramine
d5038d123e servo: Merge #7873 - Generate the various TypeId enums in codegen (from nox:codegen-typeid); r=Ms2ger
This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node.

Source-Repo: https://github.com/servo/servo
Source-Revision: 32daa17d5cbcad02db0713e21e52410cdc60480e
2015-10-14 12:47:48 -06:00
Andriy Kunitsin
d8ffd6e1db servo: Merge #7948 - Changed dom_class type to Option<&'static DOMClass> to fix #7942 (from kunitsyn:master); r=Manishearth
I have a feeling that converting `Option<&T>` to `*const libc::c_void` could be less explicit.
Was there any way to do it shorter?

Source-Repo: https://github.com/servo/servo
Source-Revision: 9cccd98254191b1663dcaee9010eee63fa8074a3
2015-10-09 23:22:59 -06:00
Ms2ger
2127faec58 servo: Merge #7903 - Add support for documenting CGAbstractMethods (from Ms2ger:codegen-docs); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 745635a706223df3d0f6db927cf1f547d948be87
2015-10-07 06:20:20 -06:00
Anthony Ramine
c2667cecbc servo: Merge #7735 - Don't generate useless InheritTypes interfaces (from nox:rm-useless-casts); r=Ms2ger
Interfaces with no descendant need neither a Base trait nor upcast functions, and interfaces with no ancestors neither a Derived trait nor downcast functions.

Source-Repo: https://github.com/servo/servo
Source-Revision: 243647d15a48b2b7008657d321dead9912347d03
2015-10-05 06:09:56 -06:00
Corey Farwell
91eafe9f20 servo: Merge #7691 - Remove deprecated 'creator' WebIDL attribute (from frewsxcv:rm-creator-webidl-attribute); r=nox
According to @Ms2ger, the 'creator' attribute was merged into 'setter'

Source-Repo: https://github.com/servo/servo
Source-Revision: 291fa888326e743a1e59aa7c06d5288a0643cbb7
2015-09-21 05:45:30 -06:00
Corey Farwell
7eef01d9ec servo: Merge #7690 - Minor DOM codegen cleanup (from frewsxcv:codegen-cleanup); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: ec9aa9ace024470363ff227b97fb442a400fe496
2015-09-21 01:53:56 -06:00
Anthony Ramine
6953aa403a servo: Merge #7606 - Move the type_id fields to DOMClass (from nox:move-typeid); r=jdm
Cc @michaelwu.

Source-Repo: https://github.com/servo/servo
Source-Revision: d5ee58caf269779e86b2efc50ddf37d3e4eba9b9
2015-09-13 11:53:42 -06:00
Corey Farwell
54e55fc66f servo: Merge #7591 - Link to Servo issue instead of Gecko bug (from frewsxcv:servo-issue); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: d64331b7d27189e6620d7df61e82cf59e776a2ff
2015-09-10 02:56:11 -06:00
Anthony Ramine
43d95e4258 servo: Merge #7455 - Do not allow some warnings in codegen anymore (from nox:rm-unused-warnings); r=jdm
This fixes #395.

Source-Repo: https://github.com/servo/servo
Source-Revision: a855669d4ff3ff635cfb84c072ba68650525f275
2015-08-30 11:37:04 -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
Corey Farwell
2d6351b526 servo: Merge #7439 - Prefer JSTrue/JSFalse to 1/0 (from frewsxcv:jsfalse-jstrue); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 67cbda4be35a63222553ca806d475581030bea4e
2015-08-28 22:15:21 -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
David Rajchenbach-Teller
d56115cce8 servo: Merge #7387 - Fixes #2240 - NamedGetter and NamedSetter do not assume that the arg is named name (from Yoric:2240-2); r=Ms2ger
I'm not totally sure about how to test this.

Source-Repo: https://github.com/servo/servo
Source-Revision: a897795dabf8d84c2da2935c54346a75987bcec5
2015-08-27 00:38:46 -06:00
Manish Goregaokar
672b1a1667 servo: Merge #7395 - Document InheritTypes (from Manishearth:doc-inherit); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 98728a6c751a8959459f80286833152e21fa6cfc
2015-08-26 20:56:02 -06:00
Manish Goregaokar
8c0333b4f1 servo: Merge #7397 - Remove doublepointer in VirtualMethods, and from_borrowed_ref (from Manishearth:doublepointer-meet-fire); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 48945b0fc1b1f1bee77f6cb30ac10e17614ef283
2015-08-26 15:01:12 -06:00
Corey Farwell
815476c7cf servo: Merge #7315 - Don't use is operatory to compare Python strings (from frewsxcv:python-is); r=SimonSapin
`is` checks identity. `==` checks value. I can't think of a reason why
we would want the former in these scenarios.

More info:

* http://stackoverflow.com/a/1504742
* https://docs.python.org/2/reference/expressions.html#is

Source-Repo: https://github.com/servo/servo
Source-Revision: 60140ad2942ae5d73c22963775b8f7529965fdb4
2015-08-22 09:26:34 -06:00
Corey Farwell
38ac5971e8 servo: Merge #7305 - Utilize Python context managers for opening/closing files (from frewsxcv:python-context-managers); r=Ms2ger
In some of these cases, files were not being closed

Source-Repo: https://github.com/servo/servo
Source-Revision: 3a48e04caffa4ba25854a4190883d1985845a359
2015-08-21 09:30:06 -06:00
Corey Farwell
7fb2f8eb04 servo: Merge #7254 - Initial implementation of ownPropertyKeys proxy handler (from frewsxcv:own-property-keys); r=Ms2ger
Generates `SupportedPropertyNames` on DOM structs that should implement
it. Most of them are unimplemented now (which can be implemented in
later PRs), with the exception of `HTMLCollection`. Also added a couple
relevant WPT tests.

Closes #6390

Closes #2215

Source-Repo: https://github.com/servo/servo
Source-Revision: d2a8c278eaa159ceacffee767523d4ad0cf83da2
2015-08-20 10:00:44 -06:00
Anthony Ramine
3c5a2d72f0 servo: Merge #7230 - Support required dictionary members (fixes #7216) (from nox:required-dictionary-member); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: ef98e574297ed738f3b117c128bc578f623a35d5
2015-08-18 12:58:09 -06:00
Anthony Ramine
f79b4bd4b2 servo: Merge #7236 - Fix dictionary member conversion failure (fixes #7231) (from nox:dictionary-failure-code); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a2978f2add3a9c828b7bb701cb2d04318e5c0b45
2015-08-16 06:39:56 -06:00
Anthony Ramine
ea3b1cdfb8 servo: Merge #7233 - Support default values for restricted float members (fixes #7217) (from nox:default-float-value); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 55e755e35ac8622a80cbebe3395aae44a0239b4f
2015-08-15 10:59:44 -06:00
Corey Farwell
1b3761b963 servo: Merge #7199 - Prefer if..let over if..is_some..unwrap in codegen (from frewsxcv:codegen-if-let); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2e1ca10eeaf6a62326c1b864345f624ed2974a52
2015-08-13 15:35:21 -06:00
Corey Farwell
9ea1ff0919 servo: Merge #7196 - Avoid marking codegen method bodies as unsafe twice (from frewsxcv:double-unsafe); r=jdm
`CGAbstractMethod` takes a couple boolean parameters, among others:

* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block

Passing both as `True` should not mark it as `unsafe` twice.

Example from a generated `HTMLCollectionBinding.rs`:

Before:

```
unsafe extern fn get_length(..) -> u8 {
    unsafe {
        // code here
    }
}
```

After

```
unsafe extern fn get_length(..) -> u8 {
    // code here
}
```

Source-Repo: https://github.com/servo/servo
Source-Revision: 289decb064b44937f570fdc299de9af961296dd6
2015-08-13 15:00:37 -06:00
Corey Farwell
975ba6831a servo: Merge #6993 - Remove dead Python code in binding generating code (from frewsxcv:rm-dead-codegen); r=Ms2ger
Fixes #6956

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ed2df3de704261399942b82a047a6a757501d53
2015-08-07 04:51:31 -06:00
Josh Matthews
2f1aaef81d servo: Merge #6874 - Start reporting memory usage for Window and all nodes in all DOM tree… (from jdm:domreporting); r=njn
…s for frame treese in script tasks.

This underreports by a significant amount, since only Document, Window and CharacterData (ie. text) nodes are fully represented. That being said, every HTML element in the tree is measured, but only counted as a Node. It's easy to improve this, it just requires adding the appropriate HeapSizeOf derives and increasing the granularity of `measure_memory_for_eventtarget`. google.com shows a dom-tree value of 0.24 MB for me at the moment.

r? @nnethercote

Source-Repo: https://github.com/servo/servo
Source-Revision: 84e25befdd97cf74fb00707dbe150d59d980e977
2015-08-03 21:24:41 -06:00
Ms2ger
cb152d0eb4 servo: Merge #6846 - Remove an obsolete comment I missed in #6804 (from Ms2ger:2661-comment); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c5060fce9fa6e4b5b06ffd76d1e52bb74d00461c
2015-07-30 06:10:56 -06:00
Ms2ger
e4397aa49e servo: Merge #6809 - Remove unrooted_must_root annotation from unions (fixes #2661) (from Ms2ger:unrooted_must_root); r=metajack
The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the
now unused annotation.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7adc336aaacfb5e544a9c8c4e0387afa457e5d72
2015-07-29 13:20:20 -06:00
Akos Kiss
b185c71656 servo: Merge #6718 - Add aarch64-unknown-linux-gnu support (from akosthekiss:aarch64-support); r=jdm
* Adding dependencies
* Replacing `i8` with `libc::c_char` to build properly on platforms
  where char is unsigned.

Source-Repo: https://github.com/servo/servo
Source-Revision: b386d7ae444af868907b9faff44e8432469160bd
2015-07-23 17:17:18 -06:00
snf
062b7d8932 servo: Merge #6582 - Add Clamp and EnforceRange support for webidl arguments (from servo:clamp-enforce-range); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 36d732a60a39140806b4113d58a6b00e6b1931da
2015-07-22 11:03:05 -06:00
Corey Farwell
a5ddc4d3c6 servo: Merge #6592 - Use NotImplementedError for Python base class methods (from frewsxcv:notimplementederror); r=Ms2ger
From the Python docs:

https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError

"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."

Source-Repo: https://github.com/servo/servo
Source-Revision: a9f12da4f8a48daa197ff8bbc2021009fe6e2711
2015-07-21 11:28:21 -06:00
Ms2ger
2fa4baeb5d servo: Merge #6621 - Move away from the repeat().take().collect() pattern (from Ms2ger:repeat); r=SimonSapin
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.

Source-Repo: https://github.com/servo/servo
Source-Revision: 556c0e1509cb48b90f492bcf0f25d0ed14b015d1
2015-07-14 02:42:26 -06:00
Corey Farwell
78f93158a2 servo: Merge #6580 - Remove tidy blacklist for 'script/dom/bindings/*' (from frewsxcv:lint-codegen); r=Ms2ger
Recently, I found myself reading through the Python codegen scripts that
live in 'components/script/dom/bindings/*' and noticed that there were
many tidy violations: unnecessary semicolons, weird spacing, unused
variables, lack of license headers, etc. Considering these files are now
living in our tree and mostly maintained directly by contributors of
Servo (as opposed to being from upstream), I feel these files should not
be excluded from our normal tidy process. This commit removes the
blacklist on these files and fixes all tidy violations.

I added these subdirectories to the blacklist because they appear to be
maintained upstream somewhere else:

* "components/script/dom/bindings/codegen/parser/*",
* "components/script/dom/bindings/codegen/ply/*",

Also, I added a few '# noqa' comments which tells us to ignore the
flake8 errors for that line; they are mostly for unused/undefined
variables. I chose to ignore these (instead of fixing them) to make the
work for this commit simpler for me.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d2a340633dcc73e458a8454b78e26ba93511d37
2015-07-09 07:55:27 -06:00
Ms2ger
d7892fb4aa servo: Merge #6549 - Remove *Cast::from_actual (from Ms2ger:from_actual); r=nox
Since JSRef was removed, from_actual duplicates from_ref.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0298c92670bee90c06f98fac2e8469d1238d1bd4
2015-07-03 22:56:17 -06:00
David Winslow
b9c1f245a1 servo: Merge #6529 - Refactor #[jstraceable] to #[derive(JSTraceable)] (from dwins:master); r=Manishearth
fixes #6524.  I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.

Source-Repo: https://github.com/servo/servo
Source-Revision: bbb39082e0f640400546d2084a450a8675820a82
2015-07-01 18:27:40 -06:00