Commit graph

311 commits

Author SHA1 Message Date
Ms2ger
6eb9607bb9 Don't define empty FooMethods traits. 2015-03-13 14:54:45 +01:00
Ms2ger
b213a80f80 Remove unused lifetime parameters to dictionaries.
They were used for Root members, but those no longer use lifetimes.
2015-03-13 14:49:36 +01:00
Chris Double
2af19b2675 Fix #2108 by renaming unwrap functions to native_from_reflector
As noted by @bholley. "unwrap" is confusing because we are
both stripping off wrappers *and* getting a native from a
reflector. Changing the "unwrap" usage to "native_from_reflector"
for clarity.

This renames 'unwrap' to 'native_from_reflector' and
'unwrap_jsmanaged' to 'native_from_reflector_jsmanaged'.
2015-03-12 19:15:12 +13:00
Zack Slayton
08ac0766ed Use new if let syntax wherever possible. Fixes #4153. 2015-03-10 09:18:55 -04:00
bors-servo
73e5bbec43 auto merge of #5054 : psdh/servo/scriptimplementation, r=jdm
Fixes #4089
2015-03-06 13:36:53 -07:00
Guro Bokum
bf26d61d5e ScriptTask::mouse_over_targets is not traced #4985 2015-03-06 20:22:41 +07:00
Prabhjyot Singh Sodhi
64ba4a914e implement missing steps from "prepare a script" algorithm
Fixes #4089
2015-03-06 03:16:59 +05:30
bors-servo
67548a6244 auto merge of #5127 : KiChjang/servo/partial-eq-jsref, r=Ms2ger
Fixes #5112, #3960
2015-03-05 01:15:44 -07:00
Josh Matthews
c816975750 Documentation and cleanup. 2015-03-03 16:25:40 -05:00
Josh Matthews
e2c4f5ed67 Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
Avi Weinstock
bcc27d9bd0 Replace borrow with borrow_for_gc_trace in JSTraceable::trace (Issue #4778). 2015-03-03 09:06:45 -05:00
Keith Yeung
a07a0cf39f Added type parameter to PartialEq on JSRef (fixes #5112, #3960) 2015-03-03 11:46:13 +08:00
Ms2ger
5a1e6b772c Fix string default values. 2015-03-02 20:54:55 +01:00
bors-servo
184d32b519 auto merge of #5103 : Ms2ger/servo/from_actual, r=jdm 2015-02-28 13:33:49 -07:00
bors-servo
5eaf1144c3 auto merge of #5099 : Ms2ger/servo/exceptions, r=saneyuki 2015-02-28 11:09:55 -07:00
Ms2ger
ca21675359 Use the correct lifetime bounds for FooCast::from_actual. 2015-02-28 19:06:04 +01:00
Ms2ger
62b2c65348 Add support for throwing TypeErrors from DOM implementations. 2015-02-28 18:20:42 +01:00
Ms2ger
fbf4d44674 Clarify the documentation for dom::bindings::error::Error variants. 2015-02-28 18:20:42 +01:00
Ms2ger
6e3c130e6c Inline DOMException::new_from_error. 2015-02-28 18:20:42 +01:00
Ms2ger
4873682a3c Rename FailureUnknown to JSFailed. 2015-02-28 18:20:41 +01:00
bors-servo
1f53d30f85 auto merge of #5094 : chmanchester/servo/binarynames, r=jdm 2015-02-28 09:57:58 -07:00
Ms2ger
d24a948142 Fix a typo in argument_type. 2015-02-28 16:41:38 +01:00
Chris Manchester
c81f1cc541 Add support for BinaryName attribute to servo's codegen (fixes #4435) r=jdm 2015-02-27 18:28:01 -08:00
Ms2ger
601e80fa43 Simplify RootCollection::unroot a bit. 2015-02-23 22:46:41 +01:00
Patrick Walton
55a0ee6ec7 script: Implement enough 2D canvas support to render basic SVGs such as the tiger. 2015-02-22 22:29:58 -05:00
Ms2ger
931d535f52 Mark some unused arguments as unused in bindings. 2015-02-22 17:54:08 +01:00
Ms2ger
c12b4029aa Only unwrap the object once when finalizing.
Previously, we had 'value' and 'this' locals, both storing a pointer to the
DOM object, for no good reason.
2015-02-22 16:32:36 +01:00
Prabhjyot Singh Sodhi
cc48797999 Fixing Intermittent failure in pages with timers
Fixes #4923
2015-02-22 00:27:16 +05:30
Ms2ger
10ddb86d61 Remove the implementation of ToJSValConvertible for JS<T>.
It is unused and doesn't serve a purpose.
2015-02-21 11:09:06 +01:00
bors-servo
172db80703 auto merge of #4882 : chmanchester/servo/stringifiers, r=Ms2ger 2015-02-20 13:01:02 -07:00
Chris Manchester
00f863b4fe Add stringifier method support to CodegenRust.py (fixes #1986)
Add a stringifier to URLUtils (Location). (fixes #4605)

wpt metadata updates for #4605
2015-02-20 11:35:16 -08:00
Ms2ger
6d30ec77c8 Replace uint/int by usize/isize in various places. 2015-02-20 14:45:47 +01:00
Ms2ger
9c863a6bd4 Pass isize to ptr.offset(). 2015-02-20 14:45:47 +01:00
Ms2ger
a3fedee46e Return usize from IDLInterface::get_prototype_depth.
It is used as an index into an array.
2015-02-20 14:45:47 +01:00
Ms2ger
21a1143dd1 Use u32 for reserved slot indices.
This is what the JSAPI expects.
2015-02-20 14:45:46 +01:00
Ms2ger
f75f279804 Stop casting the right-hand side of shifts to uint.
This is no longer required.
2015-02-20 14:45:46 +01:00
Ms2ger
81eab460b1 Use the try macro to initialize dictionaries. 2015-02-20 10:39:40 +01:00
Ms2ger
c58213b698 Remove the Option<Self> arguments from IDLInterface. 2015-02-19 09:52:48 +01:00
Prabhjyot Singh Sodhi
ca146ccfa6 Porting Gecko's JSToNativeConversionInfo changes to Servo's codegen
Fixes #4800
2015-02-18 19:37:17 +05:30
Ms2ger
0e11178d66 Replace the FooCast traits by structs.
This should allow us to remove most type annotations in the DOM.
2015-02-16 00:20:16 +01:00
Ms2ger
c54e79b2f2 Fix indentation in InheritTypes. 2015-02-16 00:19:18 +01:00
Ms2ger
746c3ebd7d Improve the formatting for FromJSValConvertible implementations in UnionTypes. 2015-02-15 23:18:37 +01:00
bors-servo
69259e9975 auto merge of #4910 : Ms2ger/servo/squirrel, r=jdm 2015-02-12 14:48:50 -07:00
bors-servo
6d1a2d90e5 auto merge of #4909 : saneyuki/servo/warn, r=jdm
follow up #4893
2015-02-12 14:06:49 -07:00
Ms2ger
b5440a6257 Replace squirrel_away_unique by boxed::into_raw. 2015-02-12 22:01:06 +01:00
Tetsuharu OHZEKI
dbb0f49bc7 DOMRefCell<T>.is_mutably_borrowed() should return the state correctly.
This method returned the result of `RefCell<T>.try_borrow().is_some()`.
But it meant whether the state **is not** BorrowState::Writing.

This wrong is introduced by [1], Before it revision, this method had
returned whether the state is BorrowState::Writing or not.

This doesn't change callers of this method because git blames ([3], [4]) says
that the caller is introduced by [2] and [2] is introduced before [1].

[1]: 86d609abaf
[2]: 49234484d6
[3]: 2cc08f289a/components/script/dom/servohtmlparser.rs
[4]: a7e29939a1/components/script/dom/bindings/cell.rs
2015-02-13 05:53:22 +09:00
Tetsuharu OHZEKI
552a418a33 Fix warnings about RefCell<T>.try_borrow(). 2015-02-13 05:40:46 +09:00
Ms2ger
7b1b030f8a Remove MutNullableJS::get_inner.
There should be no reason to call this.
2015-02-12 20:59:22 +01:00
Ms2ger
b3f93b25a5 Remove JS::unsafe_get.
The codegen users already migrated to Unrooted, and the layout users are
better off using LayoutJS.
2015-02-12 20:59:22 +01:00
Ms2ger
8ab7d37ef2 Add Unrooted::from_js.
There should not be a JS here; that is #2661. Until that's fixed, though,
it's better to encapsulate it.
2015-02-12 20:59:22 +01:00