Corey Farwell
244af42d89
Use OS-agnostic filesystem paths in Python
...
This will eventually need to be done for #1908
2015-09-08 21:16:02 +02:00
bors-servo
ca36779a7e
Auto merge of #7547 - connorimes:move_script_profiling, r=jdm
...
Combine script profiling with profile crates. Fixes #7514 .
The script crate had its own built-in profiling which was basically doing the same thing as the profile crate. This wraps the internal profiling around the main profile functionality. Script-related tasks are now added to the ProfilerCategory enum.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7547 )
<!-- Reviewable:end -->
2015-09-08 09:32:56 -06:00
Connor Imes
d746835344
Combine script profiling with profile crates. Fixes #7514 .
2015-09-04 16:09:44 -05:00
Manish Goregaokar
e94df1ed5c
Remove needless returns
2015-09-04 09:13:48 +05:30
Manish Goregaokar
2e02ea38fc
Elide most 'b lifetimes
2015-09-04 09:02:12 +05:30
Manish Goregaokar
54c036cd66
Elide most 'a lifetimes
2015-09-04 08:55:51 +05:30
Corey Farwell
8792aa7fc0
Allow 'script' component to enter a 'built' state
...
After this pull request merged:
https://github.com/servo/servo/pull/7209
the 'script' component would never enter a 'built' state. In other
words, if one calls `mach build`, lets it complete, then calls `mach
build` again, the 'script' component would rebuild even though we
supposedly just built it. This was due to the `ParserResults.pkl`
getting placed in the `components/script` directory instead of the
output directory, causing cargo to think that there were unbuilt files.
2015-09-02 16:14:04 -04:00
Simon Sapin
40b4348824
Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01)
2015-09-02 09:22:17 +02:00
bors-servo
493da96cae
Auto merge of #7209 - frewsxcv:codegen-build-cleanup, r=metajack
...
Cleanup/refactor build scripts for DOM codegen
Prior to this commit, the script codegen makefile relied on an
intermediary pythonpath.py file that handled python dependencies and
incorporated a couple hacks to get the codegen building working. This
commit removes that intermediary file and attempts to make the script
codegen build process cleaner.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7209 )
<!-- Reviewable:end -->
2015-09-01 13:53:49 -06:00
bors-servo
15de679f11
Auto merge of #7468 - JoshTheGoldfish:Issue7460, r=jdm
...
Making test-tidy check that = have space after them
For issue #7460 . Need to ensure compatibility with #7390 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7468 )
<!-- Reviewable:end -->
2015-09-01 08:33:02 -06:00
erneyja
17663315dd
make test-tidy check that = have space after them
2015-09-01 07:18:19 -04:00
bors-servo
fea36ceb9a
Auto merge of #7466 - nox:rootedvec-from-iter, r=Ms2ger
...
Implement FromIterator<Root<A>> for RootedVec<JS<A>> (fixes #5117 )
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7466 )
<!-- Reviewable:end -->
2015-08-31 03:02:05 -06:00
Anthony Ramine
5cc36f0b91
Implement FromIterator<Root<A>> for RootedVec<JS<A>> ( fixes #5117 )
2015-08-31 10:11:29 +02:00
bors-servo
a855669d4f
Auto merge of #7455 - nox:rm-unused-warnings, r=jdm
...
Do not allow some warnings in codegen anymore
This fixes #395 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7455 )
<!-- Reviewable:end -->
2015-08-30 11:37:04 -06:00
Anthony Ramine
cf6975f2a3
Do not allow unreachable_code in codegen anymore
2015-08-30 17:25:05 +02:00
Anthony Ramine
3c1c315838
Do not allow dead_code in codegen anymore
2015-08-30 17:19:42 +02:00
Anthony Ramine
2c8638ea9e
Do not allow unused_parens in codegen anymore
2015-08-30 17:16:15 +02:00
Anthony Ramine
1064e7decc
Do not allow unused_mut in codegen anymore
2015-08-30 16:53:35 +02:00
Anthony Ramine
aaa7a86381
Do not allow unused_unsafe in codegen anymore
2015-08-30 16:53:20 +02:00
bors-servo
940bcadc13
Auto merge of #7432 - jdm:dashedprops, r=nox
...
Add dashed CSS properties in CSSStyleDeclaration
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7432 )
<!-- Reviewable:end -->
2015-08-30 08:20:57 -06:00
Corey Farwell
8f876a179a
Prefer JSTrue/JSFalse to 1/0
2015-08-28 22:03:01 -04:00
Josh Matthews
40806977b5
Add infrastructure for supporting dashed CSS property names on CSSStyleDeclaration.
2015-08-28 13:15:16 -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
bors-servo
532fd19d69
Auto merge of #7361 - jxs:master, r=Ms2ger
...
make dom_struct derive HeapSizeOf
closes #7357
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7361 )
<!-- Reviewable:end -->
2015-08-27 02:35:45 -06:00
bors-servo
a897795dab
Auto merge of #7387 - Yoric:2240-2, r=Ms2ger
...
Fixes #2240 - NamedGetter and NamedSetter do not assume that the arg is named `name`
I'm not totally sure about how to test this.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7387 )
<!-- Reviewable:end -->
2015-08-27 00:38:46 -06:00
bors-servo
98728a6c75
Auto merge of #7395 - Manishearth:doc-inherit, r=nox
...
Document InheritTypes
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7395 )
<!-- Reviewable:end -->
2015-08-26 20:56:02 -06:00
João Oliveira
8d86f89f63
Remove get_unsound_ref_forever function
...
closes #7383
2015-08-27 01:36:43 +01:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Manish Goregaokar
4ee5b664c2
Document InheritTypes
2015-08-27 04:35:50 +05:30
bors-servo
48945b0fc1
Auto merge of #7397 - Manishearth:doublepointer-meet-fire, r=nox
...
Remove doublepointer in VirtualMethods, and from_borrowed_ref
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7397 )
<!-- Reviewable:end -->
2015-08-26 15:01:12 -06:00
Manish Goregaokar
4678ec16bb
remove to_borrowed_ref, fix Activatable
2015-08-27 02:27:42 +05:30
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
David Rajchenbach-Teller
d3ab0c2909
Fixes #2240 - NamedGetter and NamedSetter do not assume that the argument is named name
2015-08-26 16:58:39 +02:00
Corey Farwell
5bf262770f
Don't use is
operatory to compare Python strings
...
`is` checks identity. `==` checks value. I can't think of a reason why
we would want the former in these scenarios.
More info:
* http://stackoverflow.com/a/1504742
* https://docs.python.org/2/reference/expressions.html#is
2015-08-22 10:22:47 -04:00
Corey Farwell
2ab43bea5d
Utilize Python context managers for opening/closing files
...
In some of these cases, files were not being closed
2015-08-21 11:15:17 -04:00
Corey Farwell
b11be4d253
Initial implementation of ownPropertyKeys proxy handler
...
Generates `SupportedPropertyNames` on DOM structs that should implement
it. Most of them are unimplemented now (which can be implemented in
later PRs), with the exception of `HTMLCollection`. Also added a couple
relevant WPT tests.
Closes #6390
Closes #2215
2015-08-20 11:58:42 -04:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
bors-servo
ef98e57429
Auto merge of #7230 - nox:required-dictionary-member, r=Ms2ger
...
Support required dictionary members (fixes #7216 )
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7230 )
<!-- Reviewable:end -->
2015-08-18 12:58:09 -06:00
Ms2ger
a9671550ff
Update js.
2015-08-18 12:21:03 +02:00
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
8bb853f643
Fix existing syntactics nits.
2015-08-16 10:30:43 -04:00
bors-servo
a2978f2add
Auto merge of #7236 - nox:dictionary-failure-code, r=Ms2ger
...
Fix dictionary member conversion failure (fixes #7231 )
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7236 )
<!-- Reviewable:end -->
2015-08-16 06:39:56 -06:00
Anthony Ramine
47e76ff4ab
Fix dictionary member conversion failure ( fixes #7231 )
2015-08-16 14:32:54 +02:00
Anthony Ramine
44aabbe64d
Support required dictionary members ( fixes #7216 )
2015-08-16 14:16:32 +02:00
Anthony Ramine
efe982392e
Update WebIDL parser
2015-08-16 14:16:31 +02:00
vectorijk
14ac1ef75a
remove ScriptListener
...
ref #7175
2015-08-16 01:34:55 -07:00
bors-servo
55e755e35a
Auto merge of #7233 - nox:default-float-value, r=Ms2ger
...
Support default values for restricted float members (fixes #7217 )
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7233 )
<!-- Reviewable:end -->
2015-08-15 10:59:44 -06:00
Anthony Ramine
ec2a6b24b1
Support default values for restricted float members ( fixes #7217 )
2015-08-15 14:45:26 +02:00
bors-servo
6a52ec9484
Auto merge of #7006 - Wafflespeanut:script_cleanup, r=jdm
...
Splitting ScriptMsg into various enums...
... for #3734 , which is also one of the oldest issues. (/cc @jdm)
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7006 )
<!-- Reviewable:end -->
2015-08-15 03:48:47 -06:00