Josh Matthews
2340583e56
Differentiate between error and non-error event handlers per the spec.
2015-11-12 16:21:24 -05:00
rohan.prinja
6e774ea6eb
merge from master
2015-11-03 19:01:23 +09:00
David Zbarsky
0070adb71f
Use an Atom for Event.type
2015-11-01 09:42:11 -08:00
rohan.prinja
51df8e310b
rearrange imports to be in alphabetical order
2015-10-30 20:28:59 +09:00
rohan.prinja
9fd823e449
replace InheritTypes imports with inheritance imports
2015-10-30 20:26:30 +09:00
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Adam Szopa
88991013ab
Remove explicit lifetimes which can be elided.
2015-10-21 01:27:48 +02:00
Michael Wu
e733a7c46a
Support the updated spidermonkey bindings
2015-10-14 15:30:52 -04:00
Anthony Ramine
aab2c40389
Generate the TypeId enums in codegen
2015-10-14 18:45:35 +02:00
Anthony Urena
ba86131cd5
Refactor Error enum usage to consistently be qualified
2015-10-06 05:43:52 -04:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401
Fix reported test-tidy errors for unmerged import blocks
...
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Anthony Ramine
c25085f68a
Introduce [Abstract] to mark non-leaf interfaces
...
Some interfaces like Node, CharacterData and HTMLTableCellElement are never
instantiated directly, only their descendant interfaces are. Those are marked
with [Abstract] to set their type_id to None instead of having dummy values
in the TypeId enums.
2015-09-13 19:46:28 +02:00
Michael Wu
941f7dc04b
Move EventTargetTypeId/NodeTypeId to DOMClass
2015-09-12 01:09:46 +02:00
Manish Goregaokar
54c036cd66
Elide most 'a lifetimes
2015-09-04 08:55:51 +05:30
Corey Farwell
5ccb0d43ef
Merge adjacent identical impl
sections
...
Prior to #7416 and #7401 , many of these `impl` sections were not
identical
2015-08-28 10:30:42 -04:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
Anthony Ramine
c831c2c0a5
Remove helper traits
...
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:02 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Manish Goregaokar
b33c5427bc
Remove doublepointer in VirtualMethods, and from_borrowed_ref
...
Most of the heavy lifting done by:
```
$ ls *rs | xargs gawk -i inplace '/let .*: &&.*from_borrowed_ref/{sub("&&", "\\&");sub("_borrowed_","_");} {print $0}'
$ ls *rs | xargs gawk -i inplace "/impl.*VirtualMethods/{in_vm=1; sub(/<'a>/,\"\");sub(/&'a /,\"\")} /^}\$/{in_vm=0;} in_vm{\$0=gensub(/\\*self([^.])/,\"self\\\1\",\"g\"); sub(/from_borrowed_ref/,\"from_ref\")} {print}"
```
2015-08-27 02:14:48 +05:30
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
bors-servo
ff6a70fad3
Auto merge of #7241 - Wafflespeanut:event_handler, r=Ms2ger
...
Matching over event listeners and handlers; r=Ms2ger
... for #7065
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7241 )
<!-- Reviewable:end -->
2015-08-18 06:49:26 -06:00
Ravi Shankar
f3db59972a
Matching over event listeners and handlers; r=Ms2ger
...
fixup! Matching over event listeners and handlers; r=Ms2ger
2015-08-18 18:11:57 +05:30
João Oliveira
067a22a868
Replace uses of for foo in bar.iter()
,
...
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197 )
2015-08-18 01:46:11 +01:00
Josh Matthews
8620fe5995
Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks.
2015-08-03 23:05:00 -04:00
Bogdan Cuza
233a769c67
Add spec links
2015-07-28 13:28:41 +02:00
farodin91
27e760e28d
Implement FileReader.{readAsText,readAsDataUrl}. Fixes #6172
2015-07-23 22:33:51 +02:00
David Zbarsky
bc1eb97671
Remove some more unnecessary let bindings
2015-07-14 14:48:16 -04:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Ms2ger
c9f50f41b5
Stop using position_elem.
...
It is unstable and not really better than the stable alternative.
2015-06-27 23:39:21 +02:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
bors-servo
c3d242544e
Auto merge of #6308 - pcwalton:debloat-partialeq, r=nox
...
This makes the difference between selector matching scaling on the ARM
Cortex-A9 and not, because the auto-derived `PartialEq` implementation
blows out the 32KB I-cache. With this change, there is a 2x improvement
in selector matching over sequential when using all 8 cores. (More work
needs to be done; this is a start.)
r? any DOM expert
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6308 )
<!-- Reviewable:end -->
2015-06-12 21:04:05 -06:00
Patrick Walton
8c210e1a27
script: Make PartialEq
on element type IDs generate a lot less code.
...
This makes the difference between selector matching scaling on the ARM
Cortex-A9 and not, because the auto-derived `PartialEq` implementation
blows out the 32KB I-cache. With this change, there is a 2x improvement
in selector matching over sequential when using all 8 cores. (More work
needs to be done; this is a start.)
2015-06-12 15:00:02 -07:00
Corey Farwell
4f47b41fa7
Remove fnv & smallvec crate reexports from util
...
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.
These indirect dependencies through the util component are unnecessary.
This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
2015-06-10 07:14:55 -07:00
Philipp Hartwig
ab4059ca21
Use byte string instead of handcrafted byte array
2015-05-25 20:57:16 +02:00
Ms2ger
903305416a
Implement Clone for Copy types.
2015-04-28 23:31:10 +02:00
Ms2ger
a862479ca8
Remove as_slice() calls from script.
2015-04-26 10:52:55 +02:00
Manish Goregaokar
3479d3fa7f
Replace unsafe_blocks by unsafe_code.
2015-03-21 10:27:32 +01:00
Ms2ger
1604515fd9
Fix various build warnings.
2015-03-20 17:57:49 +01:00
Ms2ger
5f15eb5fbf
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
2015-03-18 13:18:31 -04:00
Gilles Leblanc
a1804effaf
Initialize trusted-ness of DOM events properly
...
Fixes #3740
2015-02-03 21:40:07 -05:00
Ms2ger
505159a464
Import the util crate as util rather than servo_util.
...
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
f8ac1777ff
Don't shadow lifetimes in script.
2015-01-28 13:48:28 +01:00
Josh Matthews
7fec73a432
Fix crash due to address significance for JSAPI things.
2015-01-28 01:13:32 +00:00
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Ms2ger
01ed338746
Move to to_owned rather than into_string.
...
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Ms2ger
edc1d89251
Deny unsafe blocks in script.
...
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00
Matthew Rasmus
020a767849
Fix Equiv related deprecation warnings
...
...except where we have our own implementations of Equiv.
2015-01-08 08:51:11 -08:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
Ms2ger
43eecf6e7a
Stop using ptr.is_not_null() in script.
...
This method is deprecated in rust master; removing its users in advance will
make a future rust upgrade smoother.
2015-01-01 22:19:34 +01:00