rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Anthony Ramine
6ab7f64620
Return a reference in BrowserContext::active_window()
2015-10-19 09:36:53 +02:00
Anthony Ramine
409b5e3695
Return a reference in Document::window()
2015-10-19 09:36:52 +02:00
Anthony Ramine
264e943597
Return a reference in BrowserContext::frame_element()
2015-10-17 02:17:25 +02:00
Anthony Ramine
1f31d5b856
Return a reference in BrowserContext::active_document()
2015-10-17 02:07:52 +02:00
Eli Friedman
88a1cbb28b
Stop implementing Copy for JS<T>.
...
A copy of a JS<T> doesn't have the rooting properties of the original,
so it makes no sense for it to implement Copy.
2015-10-15 14:02:45 -07:00
Michael Wu
e733a7c46a
Support the updated spidermonkey bindings
2015-10-14 15:30: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
Manish Goregaokar
e94df1ed5c
Remove needless returns
2015-09-04 09:13:48 +05:30
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
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Ms2ger
a9671550ff
Update js.
2015-08-18 12:21:03 +02: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
Manish Goregaokar
fda3eb6327
Make struct part of unrooted_must_root handle type parameters
2015-07-22 00:01:26 +05:30
Ms2ger
7491728a9c
Rename BrowserContext to BrowsingContext.
2015-07-20 15:41:16 +02:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Ms2ger
3fbf016142
Silence a warning about BrowserContext.
2015-06-23 14:04:06 +02:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Anthony Ramine
1a30925cad
Remove Temporary::new()
...
Temporary::from_rooted() now takes an Assignable value.
2015-04-28 09:22:46 +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
c2e81be8a5
Stop using int/uint in script.
2015-04-03 20:47:53 +02:00
Manish Goregaokar
3479d3fa7f
Replace unsafe_blocks by unsafe_code.
2015-03-21 10:27:32 +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
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
Glenn Watson
1e0e98b63c
Implement window.frameElement, change window.parent to make use of it.
2015-02-07 06:46:29 +10:00
Ms2ger
d8c2c88bbd
Replace Root::deref by a custom get_unsound_ref_forever method.
...
This will hopefully make it clearer that this is not the correct function
to call.
2015-02-05 18:45:20 +01:00
Glenn Watson
0873e5c8ca
Implement window.parent for iframes.
2015-02-05 07:04:04 +10:00
Ms2ger
a0f5250cb8
Rename GetArrayIndexFromId to get_array_index_from_id.
2015-01-29 19:06:38 +01:00
Ms2ger
bcd9ca6081
Rename FillPropertyDescriptor to fill_property_descriptor.
2015-01-29 17:28:07 +01:00
Ms2ger
4b0c4e5ba2
Rename getPropertyDescriptor to get_property_descriptor.
2015-01-29 17:28:05 +01:00
Manish Goregaokar
b8fb725af2
raw_pointer_deriving -> raw_pointer_derive
2015-01-28 13:54:18 +05:30
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Tom Schuster
d54a45a2b1
Implement most of the important WindowProxy traps
2015-01-12 17:41:48 +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
bors-servo
141b5d038f
auto merge of #4526 : servo/servo/deref-1, r=Manishearth
...
This is a start towards fixing #3868 . Not all callers have been fixed yet, so the `Deref` implementation remains for now.
2015-01-02 09:22:51 -07: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
Ms2ger
740ee84809
Remove unsound Root::deref() call in BrowserContext::create_window_proxy.
2015-01-01 20:36:44 +01:00
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Manish Goregaokar
50c246bdc5
Fix warnings post-upgrade
2014-12-27 03:28:35 +05:30
Manish Goregaokar
d761877ef6
Add inheritance-checking lint
2014-12-27 02:53:35 +05:30
Ms2ger
919f2217f0
Implement dummy getOwnPropertyNames and enumerate traps.
2014-12-24 17:17:40 +01:00
Jack Moffitt
d1b433a3b3
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
2014-11-13 11:17:43 +10:00
Ms2ger
fff0491c01
Move the methods on bare Document onto DocumentHelpers.
2014-10-23 18:21:02 +02:00
Edit Balint
daf9e59869
Make DOM getters that return &JS<T> return Temporary<T> instead #3707
2014-10-22 19:05:25 +02:00
Manish Goregaokar
3f2cbb275b
Use #[dom_struct] everywhere
2014-10-16 10:20:18 +05:30
Tim Taubert
8825296869
Privatize Document
2014-10-13 13:25:43 +02:00
Tim Taubert
acd98a73a4
Simple privatizations
2014-10-13 11:13:12 +02:00
Tim Taubert
35f8270c64
Remove unnecessary deref()
s ( fixes #3586 )
2014-10-09 15:01:54 +02:00