Commit graph

1032 commits

Author SHA1 Message Date
Tetsuharu OHZEKI
5f8f551c95 Add MouseEvent::new_uninitialized(). 2014-05-10 13:56:46 +09:00
Tetsuharu OHZEKI
ac288f6657 Add UIEvent::new_uninitialized(). 2014-05-10 13:55:19 +09:00
bors-servo
78a768ae5c auto merge of #2372 : mrobinson/servo/issue-1596, r=metajack
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 20:16:21 -04:00
Martin Robinson
300004f3e9 Use == instead of match for tests against a single enum value
The performance of using == should now equal that of match, so many
identity methods can be simplified to a single line.

Fixes #1596.
2014-05-08 17:11:00 -07:00
bors-servo
a28665d3fd auto merge of #2375 : zwarich/servo/progressevent-rename, r=metajack 2014-05-08 19:40:16 -04:00
Cameron Zwarich
d56a308524 Rename an unused parameter to silence a warning. 2014-05-08 16:31:14 -07:00
Cameron Zwarich
20fa4d7e11 Remove an unused field from CodegenRust.py.
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.
2014-05-08 13:59:53 -07:00
Manish Goregaokar
2f376a1104 Add ProgressEvent interface 2014-05-08 20:41:51 +05:30
bors-servo
86a6de209e auto merge of #2346 : gsingh93/servo/master, r=jdm 2014-05-07 18:58:18 -04:00
Gulshan Singh
fb0c433b70 Add Performance object to Window and implement Performance::Now() 2014-05-07 17:30:33 -04:00
Ms2ger
0ab3444af9 Add support for DOMString in unions (fixes #2324). 2014-05-07 17:30:32 -04:00
Ms2ger
87008a5ae1 Remove unused zip_copies. 2014-05-07 12:29:26 +02:00
Ms2ger
479c927a39 Use Vec in GetClientRects. 2014-05-07 12:27:14 +02:00
Glenn Watson
51ef2f06ba Rename from_unrooted to from_temporary. Fixes #2332. 2014-05-07 09:25:32 +10:00
bors-servo
8d1b9db5aa auto merge of #2343 : Ms2ger/servo/String-union, r=jdm 2014-05-06 10:25:23 -04:00
bors-servo
d66197ae40 auto merge of #2331 : Ms2ger/servo/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.
2014-05-06 09:58:33 -04:00
Ms2ger
590a8ac824 Add support for DOMString in unions (fixes #2324). 2014-05-06 15:51:17 +02:00
Ms2ger
8ea3cbf18a Enter a compartment when calling callbacks. 2014-05-06 12:16:03 +02:00
bors-servo
b14b2eca37 auto merge of #2325 : Ms2ger/servo/testbinding-default, r=jdm 2014-05-05 15:58:10 -04:00
Harry Maclean
6f310a5c20 Implement ChildNode.remove() 2014-05-05 14:04:25 -04:00
Ms2ger
0016b1839e Use a single JSContext per JSRuntime.
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.
2014-05-05 19:41:02 +02:00
bors-servo
f642d5951a auto merge of #2299 : Ms2ger/servo/getJSToNativeConversionTemplate-cleanup, r=jdm 2014-05-05 09:43:18 -04:00
Ms2ger
6cab06fee6 Use default methods to reduce code duplication for TestBinding. 2014-05-05 15:39:28 +02:00
Manish Goregaokar
1008a536a7 Fix some unused_mut/unused_result warnings 2014-05-05 15:43:29 +05:30
Ms2ger
262dc30c18 Assign into the argument binding directly in instantiateJSToNativeConversionTemplate. 2014-05-05 11:36:52 +02:00
Ms2ger
aed95dfd94 Move the assignment outside the if when dealing with optional arguments. 2014-05-05 11:36:52 +02:00
Ms2ger
d14efebb5c Move the assignment of 'None' in the no-argument-passed case into an else branch.
This is the only case where we assign into an argument local twice, so removing
it will allow us to make that binding immutable.
2014-05-05 11:36:52 +02:00
Ms2ger
cb2723c4ed Remove getJSToNativeConversionTemplate's initialValue return value.
This commit does not change the generated code.
2014-05-05 11:36:49 +02:00
Ms2ger
455465f3c6 Move the handling of default values in getJSToNativeConversionTemplate into handleOptional.
This is a first step towards moving responsibility for default values into the
caller, which should improve their code (in particular for the dictionary
codegen.

This also introduces a Dictionary::empty function, whose implementation is a
hack. The implementation will be improved once its codegen has access to the
raw default values.

Besides dictionaries, this commit does not change the generated code.
2014-05-05 11:29:46 +02:00
Ms2ger
e53c768b9e Use CGIfWrapper in instantiateJSToNativeConversionTemplate. 2014-05-05 11:21:13 +02:00
Ms2ger
2db1ce72f0 Remove references to unused substitution variables in getJSToNativeConversionTemplate. 2014-05-05 11:21:13 +02:00
Glenn Watson
71f3f5894e Prevent unused result warning in codegen. Always expect success for now. 2014-05-05 11:04:05 +10:00
Ms2ger
0ff8610727 Reorder some comparisons to avoid allocating strings for them. 2014-05-04 10:17:06 +02:00
Ms2ger
25542e3f7e Replace most ~"string"s with "string".to_owned(). 2014-05-04 09:39:07 +02:00
Ms2ger
243814022e Replace all ~"" with "".to_owned(). 2014-05-03 22:17:45 +02:00
Josh Matthews
91278da9dd Address review comments. 2014-05-03 14:18:31 -04:00
Josh Matthews
46a33b4b38 Fix up the virtual method unsoundness. 2014-05-03 14:18:31 -04:00
Josh Matthews
895e9ee37f Make dictionaries contain Root<T> values instead of JS<T>, ensuring that they will not be collected while the dictionary is alive. 2014-05-03 14:18:31 -04:00
Josh Matthews
0f2d0b1dc3 Address review comments. 2014-05-03 14:18:31 -04:00
Josh Matthews
7b3e6d1f21 Remove all root collections. 2014-05-03 14:18:31 -04:00
Josh Matthews
aaf0a61194 Store per-ScriptTask RootCollection in TLS and use that in favour of per-frame collections. 2014-05-03 14:18:31 -04:00
Josh Matthews
a09a4bd297 Root Temporary values for the duration of their lifetime. 2014-05-03 14:18:31 -04:00
Josh Matthews
522d3f167b s/Unrooted/Temporary/g 2014-05-03 14:18:31 -04:00
Josh Matthews
bbfed38168 Move stack roots into Root types instead of RootCollection, removing the aribtrary 10 roots per stack frame restriction. 2014-05-03 14:18:31 -04:00
Josh Matthews
109410900c Move all methods on T to JSRef<T> or JS<T> as appropriate. 2014-05-03 14:18:30 -04:00
Josh Matthews
7daa97c7e5 Remove abstract_self. 2014-05-03 14:18:30 -04:00
Josh Matthews
76783b029e Move WebIDL methods to traits implemented by JSRef types. 2014-05-03 14:18:30 -04:00
Josh Matthews
dfdda0098a Remove JS::get/get_mut to enforce sound rooting practices. 2014-05-03 14:18:30 -04:00
Josh Matthews
d7b96db33c Implement safe rooting strategy via Unrooted, Root, JSRef, and JS. 2014-05-03 14:18:30 -04:00
Josh Matthews
ffdc3f5b32 Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing. 2014-05-03 14:18:30 -04:00