David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Matt Brubeck
13072c7b0c
Remove string_cache dependency from util.
...
Move `namespace::from_domstring` from util to script::dom, because it is used
only in that crate.
2015-07-01 10:04:53 -07:00
Ms2ger
28086f3c75
Use Box::into_raw rather than boxed::into_raw.
...
The latter is deprecated.
2015-06-25 23:03:54 +02:00
bors-servo
57cc84b293
Auto merge of #6110 - klusark:NamedConstructor, r=Ms2ger
...
Implement Named constructors and the Image constructor for HTMLImageElement
I'm not sure if I like how I mostly just duplicated the code in CodegenRust.py, so that might need to be refactored.
Instead of just calling it Image, we might want to call it ConstructorImage, to make it clear that it's a constructor. Anyone have an opinion on that?
There seems to be a bug in the HTMLImageElement getter/setter as the value is 0 regardless of what I do. This seems to be unrelated to my commits, so I'll investigate that separately.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6110 )
<!-- Reviewable:end -->
2015-06-25 02:18:06 -06:00
Corey Farwell
1bd171e782
Remove unused js::JS_ARGV import in script component
2015-06-24 21:48:51 -07:00
Joel Teichroeb
012be81eab
Add support for NamedConstructor in webidls
2015-06-24 10:42:53 -07:00
bors-servo
6247a96761
Auto merge of #6223 - nox:merge-generic-functions, r=Ms2ger
...
Merge generic funs to share them across all bindings (fixes #2684 )
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6223 )
<!-- Reviewable:end -->
2015-06-24 03:54:56 -06:00
Anthony Ramine
a90983553b
Merge generic funs to share them across all bindings ( fixes #2684 )
2015-06-24 11:34:30 +02:00
Michael Wu
b7301ca06c
Fix some warnings caused by the SM upgrade
2015-06-19 22:07:08 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Daniel Le
15c4f7fe2d
Avoid casting in the callers
...
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray
Fix #6271
2015-06-06 12:22:18 +08:00
Josh Matthews
453679fd1f
Trace the prototype array on the global object.
2015-06-01 18:36:57 -04:00
ecoal95
b3ac346749
Add WebGLContextAttributes support
...
This commit also:
* Allows to return non-rootable dictionaries from
Codegen.
* Merges the two context types in an enum type.
2015-06-01 15:29:38 +02:00
Tamir Duberstein
a3d463093e
Avoid extra O(n) scan in validate_and_extract
...
Also `debug_assert!`s that `splitn` was called with the
correct `count` argument.
2015-05-26 13:26:26 -04:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00
Ms2ger
903305416a
Implement Clone for Copy types.
2015-04-28 23:31:10 +02:00
Anthony Ramine
7197052c0d
Uniformise root() methods
...
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Ms2ger
e8b02acb1d
Pass Atom to Attr:new for the prefix argument.
2015-04-27 12:20:23 -07:00
Ms2ger
4d41f1c991
Stop using the deprecated range function.
2015-04-22 20:26:40 +02:00
Ms2ger
49393a8762
Update some URLs.
...
The HTML spec's division into pages is not stable, so it is safer to use the
URL without a specific page (which will redirect).
2015-04-14 10:44:51 +02:00
Chris Paris
d2b0d5e040
Support callback interfaces with constants.
2015-04-11 09:34:44 -10:00
Anthony Ramine
7b4f6126c8
Add script::dom::utils::validate_and_extract()
...
Accidentally fixes bugs about Document::createElementNS() where the
implementation of "validate and extract" used to check whether the local name
extracted from the qualified name was "xmlns" instead of the qualified name
itself.
2015-04-08 10:22:30 +02:00
Anthony Ramine
abc01d598a
Add script::dom::utils::validate_qualified_name()
2015-04-08 10:22:28 +02:00
Anthony Ramine
c557736d26
Fix xml_name_type()
...
Names with a trailing colon are not qualified names.
2015-04-06 14:12:20 +02:00
Ms2ger
1604515fd9
Fix various build warnings.
2015-03-20 17:57:49 +01:00
Tim Cuthbertson
0052a27b1a
Free the interface prototype array when Window is finalized
...
Fixes #1871
2015-03-20 22:14:14 +11:00
Ms2ger
5f15eb5fbf
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
2015-03-18 13:18:31 -04: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
Ms2ger
6d30ec77c8
Replace uint/int by usize/isize in various places.
2015-02-20 14:45:47 +01:00
Ms2ger
b5440a6257
Replace squirrel_away_unique by boxed::into_raw.
2015-02-12 22:01:06 +01:00
Ms2ger
d752cdc44f
Rename CreateDOMGlobal to create_dom_global.
2015-01-29 19:40:39 +01:00
Ms2ger
d0627a2592
Remove unused IsConvertibleToCallbackInterface.
2015-01-29 19:40:38 +01:00
Ms2ger
69c4c8223c
Rename HasPropertyOnPrototype to has_property_on_prototype.
2015-01-29 19:12:40 +01:00
Ms2ger
59909efff1
Rename IsPlatformObject to is_platform_object.
2015-01-29 19:10:51 +01:00
Ms2ger
a0f5250cb8
Rename GetArrayIndexFromId to get_array_index_from_id.
2015-01-29 19:06:38 +01:00
Ms2ger
ab52927ac5
Use snake case for the local in get_property_on_prototype.
2015-01-29 19:04:26 +01:00
Ms2ger
747b6c4262
Rename GetPropertyOnPrototype to get_property_on_prototype.
2015-01-29 19:03:36 +01:00
Ms2ger
1af1302010
Use snake case for the local in initialize_global.
2015-01-29 19:01:10 +01:00
Ms2ger
04f5dea19f
Rename ThrowingConstructor to throwing_constructor.
2015-01-29 18:59:48 +01:00
Ms2ger
4d1cbae611
Use snake case for arguments to and locals in create_interface_prototype_object.
2015-01-29 18:59:02 +01:00
Ms2ger
23743e3c20
Rename CreateInterfacePrototypeObject to create_interface_prototype_object.
2015-01-29 18:57:53 +01:00
Ms2ger
ffaffd9df8
Rename Define{Constants, Methods, Properties} to define_{constants, methods, properties}.
2015-01-29 18:57:08 +01:00
Ms2ger
b336b024f7
Use snake case for arguments to and locals in create_interface_object.
2015-01-29 18:54:30 +01:00
Ms2ger
47cd2d7eb4
Rename CreateInterfaceObject to create_interface_object.
2015-01-29 18:53:22 +01:00
Ms2ger
38baa130d8
Use snake case for the arguments to do_create_interface_objects.
2015-01-29 18:51:56 +01:00
Ms2ger
d7af3da919
Rename CreateInterfaceObjects2 to do_create_interface_objects.
2015-01-29 18:48:48 +01:00
Ms2ger
23813577d1
Use snake case for the members of NativeProperties.
...
Note that the codegen uses the names of the Python fields to initialize the
Rust struct.
2015-01-29 18:41:30 +01:00
Ms2ger
b4b59df5e4
Rename GetProtoOrIfaceArray to get_proto_or_iface_array.
2015-01-29 18:29:07 +01:00
Ms2ger
bfddd1ec53
Replace the 'GlobalStaticData' free function by a 'new' static member function.
2015-01-29 18:27:31 +01:00