Commit graph

174 commits

Author SHA1 Message Date
Ms2ger
339ca80f9c servo: Merge #2622 - Implement variadic arguments (from Ms2ger:variadic); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 1d35650d4fc3cd74f3e960f90b7c776818637ca9
2014-06-10 04:26:38 -04:00
Ms2ger
260822a25e servo: Merge #2611 - Synchronize the WebIDL parser with Gecko (from Ms2ger:webidl-parser-sync); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 0ff6a45709a3e46d9f2c5a3f4403fc95d08264e5
2014-06-09 22:19:44 -04:00
Manish Goregaokar
22cf5c3f68 servo: Merge #2613 - Extension methods, getResponseHeader(), an extra error, and make sync not crash (from Manishearth:xhr-wpt-methods); r=Ms2ger
For [XMLHttpRequest/open-method-case-sensitive.htm](https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/open-method-case-sensitive.htm), [XMLHttpRequest/XMLHttpRequest/open-method-insecure.htm](https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/open-method-insecure.htm), [XMLHttpRequest/XMLHttpRequest/open-method-responsetype-set-sync.htm ](https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/open-method-responsetype-set-sync.htm) in particular. `getResponseHeader()` is used by a lot of other tests (the harness echoes most of the metadata in the response headers, which is tested on this side)

The sync changes fixes half of the timeouts to give meaningful results.



Blocks #2525

Source-Repo: https://github.com/servo/servo
Source-Revision: 1f41eda3215cbb97499855ffb7a5170b488ba00a
2014-06-08 12:22:31 -04:00
Manish Goregaokar
c247d8b8ae servo: Merge #2573 - Allow union types to be used as return values (from Manishearth:union-return); r=Ms2ger
Blocks #2559

Source-Repo: https://github.com/servo/servo
Source-Revision: c787fde1ec6288d96988dcba9b4d82b8e6e06a56
2014-06-07 14:19:29 -04:00
Ms2ger
62cdaaaf9c servo: Merge #2599 - Improve types around CreateInterfaceObjects2 (from Ms2ger:constantspec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: eae9b943991cef4495bdc0b2bb5f8deae57cb835
2014-06-06 14:04:29 -04:00
Ms2ger
26108dea85 servo: Merge #2596 - Don't use mem::transmute for the argument to CreateProxyHandler (from Ms2ger:CreateProxyHandler-transmute); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: af9da5cc24b4f400bf728de5c5d0c239673d83c4
2014-06-06 12:34:58 -04:00
Jack Moffitt
0efdf108b8 servo: Merge #2538 - Upgrade Rust (from servo:rustup-20140528); r=SimonSapin
Not yet ready for merge, but you can start reviewing.

Still need to fix linux and some make check code.

Source-Repo: https://github.com/servo/servo
Source-Revision: b2e7e67087370e30a310bb3673b074c97c19d548

--HG--
rename : servo/src/components/style/common_types.rs => servo/src/components/style/properties/common_types.rs
rename : servo/src/components/style/properties.rs.mako => servo/src/components/style/properties/mod.rs.mako
rename : servo/src/components/util/debug.rs => servo/src/components/util/debug_utils.rs
2014-06-05 13:58:44 -04:00
Ms2ger
4defedfb42 servo: Merge #2558 - Move WebIDL unions into their own module (from Ms2ger:mod-unions); r=jdm
This will allow multiple unions to contain the same type.

Source-Repo: https://github.com/servo/servo
Source-Revision: d448e97c6ac7c73336056be875ca99e5d63d75c3
2014-06-03 12:58:23 -04:00
Ms2ger
9a432a9a20 servo: Merge #2550 - Support dictionary members without default values (from Ms2ger:default-handling); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 52a809259af6a07820589c42ea406765c2cfc5ee
2014-06-02 18:01:22 -04:00
Ms2ger
303dbfe060 servo: Merge #2551 - Rename BindingDeclarations to Bindings (from Ms2ger:bindings-rename); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 5ebe3302470ef0561d2b9fcf7c7b2030b2921c2d
2014-06-02 14:25:31 -04:00
Ms2ger
355a89864b servo: Merge #2547 - Add more dictionary codegen tests (from Ms2ger:dictionary-tests); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 488ac518e4d425e3d671eb1480df4502578b789e
2014-06-02 13:07:47 -04:00
Ms2ger
82824c6149 servo: Merge #2533 - Include modules with only callbacks in BindingDeclarations (from Ms2ger:callback-bindingdeclarations); r=jdm
This commit also includes improvements to the 'use' order in some of the
touched files.

Source-Repo: https://github.com/servo/servo
Source-Revision: 362af39b83b5eea56523bed8cc6e67c383e70a3d
2014-05-31 13:16:12 -04:00
Ms2ger
d26a773708 servo: Merge #2522 - Fix minor misformatting in codegen (from Ms2ger:codegen-cleanup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 5f5897f4e41259bec345d86cf068508ca9e2ea2f
2014-05-30 16:31:10 -04:00
Tetsuharu OHZEKI
3223916d32 servo: Merge #2515 - "JS<T>::from_raw" should accept "*T" instead of "*mut T" (from saneyuki:raw); r=jdm
Fix #2511

@jdm r?

Source-Repo: https://github.com/servo/servo
Source-Revision: da896b8299620ad31bcdc84d931ecdcb3efd6979
2014-05-30 13:16:09 -04:00
Ms2ger
e642799ed4 servo: Merge #2519 - Throw DOMExceptions where appropriate (fixes #2518) (from Ms2ger:exn); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 39e3c64ead997b3a8c6be6e188aad27fcbe3220b
2014-05-30 12:22:02 -04:00
Josh Matthews
40d0652682 servo: Merge #2204 - Implement basic inline event handler support (from jdm:inlineev); r=Ms2ger
Fixes #1238.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0886a36b5d5c1b08a128b62933f206f66561d7f6
2014-05-27 14:49:21 -04:00
Ms2ger
4f41f0d3e5 servo: Merge #2487 - Use *mut T for the T* pointers in SpiderMonkey (from Ms2ger:sm-mut); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: f057719bf88eb72daba799d59edce718221610ba
2014-05-26 14:25:35 -04:00
Ms2ger
9cfa16cd52 servo: Merge #2433 - Rust upgrade (from mozilla:rustup_20140511)
Source-Repo: https://github.com/servo/servo
Source-Revision: c753f3ee05a25b2bb756c3b0c3131eac7ad58f1a
2014-05-22 18:14:24 -06:00
Ms2ger
d795fd1b35 servo: Merge #2452 - Remove getDefaultRetval (from Ms2ger:getDefaultRetval); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 58283527bffbb13aaa080a46291251e3bcdce42d
2014-05-16 10:25:51 -04:00
Glenn Watson
3ab3c99489 servo: Merge #2446 - Remove unused imports for UnionTypes codegen. Fixes #2440 (from glennw:issue-2440); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 07faf6efa1c21b0aad9cc15c327f6bac7c95c6e1
2014-05-16 05:28:49 -04:00
Ms2ger
d31eddaedb servo: Merge #2394 - Cleanup instantiateJSToNativeConversionTemplate (from Ms2ger:instantiateJSToNativeConversionTemplate); r=jdm
This moves all the handling of optional arguments into `CGArgumentConverter`, and leaves `instantiateJSToNativeConversionTemplate` to only deal with the declaration of stack variables.

Source-Repo: https://github.com/servo/servo
Source-Revision: 48b1938ca3770f52187176e320cfdd148045a142
2014-05-14 00:25:17 -04:00
Cameron Zwarich
2117ef4b83 servo: Merge #2373 - Remove an unused field from CodegenRust.py (from zwarich:remove-default-visibility); r=Ms2ger
The defaultVisibility field was cloned from the C++ implementation,
where it tracks the difference between struct and class visibility.
Since no similar concept exists in Rust, it should be removed.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6d381959db18acc5c2f0c1891df8afe5df8372cb
2014-05-08 17:46:15 -04:00
Ms2ger
d2b40d13ed servo: Merge #2360 - Replace some ~[T] by Vec<T> (from Ms2ger:vec); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 15d3257a29125103e368787f7e9790ee4314b29f
2014-05-07 09:28:27 -04:00
Glenn Watson
4264c9043a servo: Merge #2354 - Rename from_unrooted to from_temporary. Fixes #2332 (from glennw:issue-2332); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 27bdc580ed5dab7e81a0b49060c01b32cad555cb
2014-05-06 21:31:27 -04:00
Ms2ger
6f7d93c89e servo: Merge #2343 - Add support for DOMString in unions (fixes #2324) (from Ms2ger:String-union); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8d1b9db5aa7d8271b9dabfcc2b0311964ecf11a3
2014-05-06 10:25:23 -04:00
Ms2ger
37492638e4 servo: Merge #2331 - Use a single JSContext per JSRuntime (from Ms2ger:global-cx-3); r=jdm
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.

However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.

Source-Repo: https://github.com/servo/servo
Source-Revision: d66197ae406e252c51bda48611ddfce78ecedb02
2014-05-06 09:58:33 -04:00
Ms2ger
9263d78f5f servo: Merge #2299 - Cleanup getJSToNativeConversionTemplate (from Ms2ger:getJSToNativeConversionTemplate-cleanup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: f642d5951a562570cbef052c03463ef5da2777be
2014-05-05 09:43:18 -04:00
Glenn Watson
1e040c311c servo: Merge #2320 - Prevent unused result warning in codegen. Always expect success for now (from glennw:codegen-warnings); r=jdm
Is it reasonable to always expect success here for now?

Fixes #2246.

Source-Repo: https://github.com/servo/servo
Source-Revision: 310d2a19bbc1b8933f05cbd77c79df155ac00d94
2014-05-05 01:22:17 -04:00
Josh Matthews
0c3a130356 servo: Merge #2101 - Implement a safe, mostly-sound rooting rooting strategy (from jdm:newroot_rebase); r=Ms2ger
As described in #1764, this strategy uses the following properties:
* DOM members are `JS<T>` types. These cannot be used with being explicitly rooted, but they are required for compiler-derived trace hooks.
* Methods that take DOM type arguments receive `&[mut] JSRef<T>`. These are rooted value references that are cloneable but cannot escape.
* Methods that return DOM values use `Unrooted<T>`. These are values that may or may not be rooted elsewhere, but callers must root them in order to interact with them in any way. One unsoundness hole exists - `Unrooted` values must be rooted ASAP, or there exists the danger that JSAPI calls could be made that could cause the underlying JS value to be GCed.
* All methods are implemented on `JSRef<T>`, enforcing the requirement that all DOM values are rooted for the duration of a method call (with a few exceptions for layout-related code, which cannot root values and therefore interacts with `JS<T>` and `&T` values - this is safe under the assumption that layout code interacts with DOM nodes that are in the tree, therefore rooted, and does not run concurrently with content code)

Source-Repo: https://github.com/servo/servo
Source-Revision: 731e66ff132e41cdc49bc5324c0e15be19c46ec2
2014-05-03 14:25:22 -04:00
Ms2ger
9ea9c1b17f servo: Merge #2295 - Add JSCLASS_DOM_GLOBAL to DOM global classes, and assert it is used (from Ms2ger:JSCLASS_DOM_GLOBAL); r=jdm
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.

Source-Repo: https://github.com/servo/servo
Source-Revision: 812d70942f74c793afabb8ff4fc120e92d586aaf
2014-05-03 05:37:15 -04:00
Manish Goregaokar
85f4f38077 servo: Merge #2292 - Webidl and basic implementation of XHR object (from Manishearth:xhr-webidl); r=Ms2ger
This just gets a working interface with dummy methods in place that can  be built on. I'll implement stuff as we go along.

Blocks #2282

Source-Repo: https://github.com/servo/servo
Source-Revision: 53777807f96e64c64f1ef995f54e630122856366
2014-05-03 04:37:11 -04:00
Tetsuharu OHZEKI
89e848b74f servo: Merge #2290 - Remove pub use globs in script.rs (from saneyuki:export); r=jdm
- Fix #2128
- Take over from #2220

I didn't change `InterfaceTypes.rs` to `type.rs` because `type` is very common name which might be troublesome.

Source-Repo: https://github.com/servo/servo
Source-Revision: b36b779d24c6f7425f630c18495dae4c6edec137
2014-05-01 23:34:39 -04:00
Ms2ger
2301c6bc01 servo: Merge #2286 - Implement ByteString (from Ms2ger:ByteString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c43f8c9ced7d00634f58db3e30bad57ba3fbc3c8
2014-05-01 16:16:52 -04:00
Ms2ger
ab2f6501fa servo: Merge #2268 - Various improvements to union codegen (from Ms2ger:unions); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: b2e64704e220f7cff165fd43e1eebea19657104d
2014-04-29 15:58:40 -04:00
Ms2ger
b9b09e6310 servo: Merge #2194 - Throw a TypeError when too few arguments are passed (from Ms2ger:typeerror-2); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 0bfbe06f4bd588e1b3d9c8d7137dde97fd0140ec
2014-04-28 13:19:36 -04:00
Ms2ger
c081ca0a0b servo: Merge #2244 - Rewrite the handling of optional arguments in getJSToNativeConversionTemplate (from Ms2ger:optional-rewrite); r=jdm
This moves all handling of `isOptional` (except `type.isCallback()`, which I believe @jdm is rewriting in #2204) into one place.

Source-Repo: https://github.com/servo/servo
Source-Revision: 32bceb3ae7c1549739f94e3dce60a6de7ce770a9
2014-04-28 10:46:46 -04:00
Ms2ger
e517faed1f servo: Merge #2237 - Use FromJSValConvertibla for union conversions (from Ms2ger:union-fromjsvalconvertible); r=jdm
With bonus codegen tests.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9f742a946226edf6cd93db0c864449471b5b1325
2014-04-28 04:01:36 -04:00
Lars Bergstrom
0c4d69cdc5 servo: Merge #2238 - Rust upgrade to April 10th, 2014 (from servo:rustup_20140410c); r=Ms2ger
r? @metajack

Note that all pending submodule PRs must be landed before this should be given r+.

Source-Repo: https://github.com/servo/servo
Source-Revision: 493aa2cdf30fb2ff5886c714030a20d714764b67
2014-04-27 18:52:39 -04:00
Ms2ger
ee27a69aaf servo: Merge #2231 - Remove the holderType return value of getJSToNativeConversionTemplate (from Ms2ger:remove-holderType); r=jdm
It is always None.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4942cc76bd2c88e5fdc2b4de4c1ac4576100b455
2014-04-25 10:28:13 -04:00
Ms2ger
38e95b1911 servo: Merge #2228 - Make getJSToNativeConversionTemplate return an expression (from Ms2ger:object-unwrapping-expressionify); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 691d82a92fa099cff3dc8becb3d2c823db76eb81
2014-04-25 09:19:14 -04:00
Ms2ger
f9f5e36b02 servo: Merge #2229 - Remove unused function getUnionAccessorSignatureType (from Ms2ger:getUnionAccessorSignatureType); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 27798980bf7f47fed7edf9fa506af903720612a6
2014-04-25 08:52:18 -04:00
Ms2ger
f83591d8a7 servo: Merge #2227 - Move assignments outside match expressions in JS-to-Rust conversion code (from Ms2ger:assign-outside-match); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 0745d656a3631fe4397e8ee50600754bd7466d53
2014-04-24 18:13:13 -04:00
Ms2ger
d5005d893e servo: Merge #2225 - Add support for dictionaries containing 'any' (from Ms2ger:any-dictionary); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2abd46a7b3135cac235bda8e9c6ed4db7ce92908
2014-04-24 17:22:16 -04:00
Josh Matthews
adad662c76 servo: Merge #2111 - Add WindowProxy support and basic browsing context concept (from jdm:browsercontext); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: bdcd8dd0c2fb9d94d3be60ebf525112417d17e51
2014-04-22 11:01:18 -04:00
Ms2ger
245ddf1be5 servo: Merge #2198 - Remove JSPageInfo::js_compartment (from Ms2ger:js_compartment); r=jdm
A js::rust::Compartment is little more than a glorified pointer to the
reflector of a window, so there's no good reason to use it. Instead, this
commit passes a JS<Window> directly when it's necessary.

This also means that we now have to use JS_DefineFunctions rather than
Compartment::define_functions; I believe the former is clearer to the reader
than the extra indirection involved in the latter calling through three
reopsitories.

This commit also simplifies ScriptTask::load to reuse the 'cx' local that is
in scope already, rather than refetching it through js_info.

Source-Repo: https://github.com/servo/servo
Source-Revision: 77b5c1f4f63c59ee88ad26363420fef6e2468ce1
2014-04-21 09:40:27 -04:00
Ms2ger
00a4a4eb02 servo: Merge #2167 - Introduce a get_dictionary_property function to reduce duplicated code in (from Ms2ger:get_dictionary_property); r=jdm
...the dictionary conversion codegen.

This also explicitly disallows dictionary members without a default value, as
the code for those doesn't currently compile.

This is the second step of my planned rewrite of the dictionary initialization
that will remove the default values we currently use to initialize the
dictionary struct in the 'new' function.

Source-Repo: https://github.com/servo/servo
Source-Revision: 28d481664c3b45a20f0825c3fb6c79c9eba7140f
2014-04-18 14:34:10 -04:00
Ms2ger
4fcb54bdf3 servo: Merge #2164 - Merge the 'new' and 'Init' functions for dictionaries (from Ms2ger:dictionary-init); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: e332f2f0fec23b2318589b08c2a1e8fb1557e672
2014-04-18 12:58:04 -04:00
Ms2ger
acb91e47c5 servo: Merge #2156 - Remove some dead code from codegen as found by pyflakes (from Ms2ger:codegen-deadcode); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 58efe0bf7586f175ac4323ab234e8f6ef53a6f7d
2014-04-18 10:28:11 -04:00
Ms2ger
34326f441a servo: Merge #2155 - Improve and test dictionary codegen (from Ms2ger:dictionary-codegen); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 099815683d11ffa1fbd91cf39b4aca14cc901632
2014-04-18 09:40:11 -04:00
Ms2ger
874facc2d7 servo: Merge #2154 - Improve codegen for enums (from Ms2ger:enumerated-codegen); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 15e0b487287ff47e0ecfe13c7fc442033ef71814
2014-04-18 09:16:16 -04:00