Andriy Kunitsin
7301609c18
Changed dom_class type to Option<&'static DOMClass>
2015-10-09 19:57:22 +03:00
Ms2ger
6b160c6a29
Document RegisterBindings::RegisterProxyHandlers.
2015-10-07 12:22:15 +02:00
Ms2ger
03b04e5363
Add support for documenting CGAbstractMethods.
2015-10-07 12:21:59 +02:00
Anthony Ramine
e24b8ab644
Don't generate useless InheritTypes interfaces
...
Interfaces with no descendant need neither a Base trait nor upcast functions,
and interfaces with no ancestors neither a Derived trait nor downcast functions.
2015-10-02 16:15:12 +02:00
Corey Farwell
d8da5c20f6
Remove deprecated 'creator' WebIDL attribute
...
According to @Ms2ger, the 'creator' attribute was merged into 'setter'
2015-09-21 07:12:17 -04:00
Corey Farwell
3b99893eaa
Python 'is' operator should not be used to check value
...
'is' checks reference. '==' checks value
2015-09-20 12:39:32 -04:00
Corey Farwell
38bbdd80db
Remove parens around Python 'assert' statement
...
'assert' is a statement, not a function
2015-09-20 12:10:28 -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
Corey Farwell
a4027f0259
Link to Servo issue instead of Gecko bug
2015-09-10 10:54:30 +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
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
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
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
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
Anthony Ramine
ec2a6b24b1
Support default values for restricted float members ( fixes #7217 )
2015-08-15 14:45:26 +02:00
bors-servo
2e1ca10eea
Auto merge of #7199 - frewsxcv:codegen-if-let, r=Manishearth
...
Prefer if..let over if..is_some..unwrap in codegen
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7199 )
<!-- Reviewable:end -->
2015-08-13 15:35:21 -06:00
Corey Farwell
43429abce4
Avoid marking codegen method bodies as unsafe twice
...
`CGAbstractMethod` takes a couple boolean parameters, among others:
* `extern`: will mark the method as `unsafe` and `extern`
* `unsafe`: will wrap the method body in an `unsafe` block
Passing both as `True` should not mark it as `unsafe` twice.
Example from a generated `HTMLCollectionBinding.rs`:
Before:
```
unsafe extern fn get_length(..) -> u8 {
unsafe {
// code here
}
}
```
After
```
unsafe extern fn get_length(..) -> u8 {
// code here
}
```
2015-08-13 16:50:17 -04:00
Corey Farwell
7a774a198c
Prefer if..let over if..is_some..unwrap in codegen
2015-08-13 16:35:21 -04:00
Corey Farwell
a276bfa57c
Remove dead Python code in binding generating code
...
Fixes #6956
2015-08-05 09:17:30 -04: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
Ms2ger
e8cff1d2a2
Remove an obsolete comment I missed in #6804 .
2015-07-30 09:36:47 +02:00
Ms2ger
efa12e6963
Remove unrooted_must_root annotation from unions ( fixes #2661 ).
...
The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the
now unused annotation.
2015-07-28 16:22:41 +02:00
Akos Kiss
fa86ea4f6f
Add aarch64-unknown-linux-gnu support
...
* Adding dependencies
* Replacing `i8` with `libc::c_char` to build properly on platforms
where char is unsigned.
2015-07-23 22:52:17 +00:00
snf
7f152b665d
Add Clamp and EnforceRange support for webidl arguments.
2015-07-22 17:04:06 +02:00
bors-servo
a9f12da4f8
Auto merge of #6592 - frewsxcv:notimplementederror, r=Ms2ger
...
Use NotImplementedError for Python base class methods
From the Python docs:
https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError
"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6592 )
<!-- Reviewable:end -->
2015-07-21 11:28:21 -06:00
Ms2ger
ce4d442941
Move away from the repeat().take().collect() pattern.
...
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
Corey Farwell
10296e77dc
Use NotImplementedError for Python base class methods
...
From the Python docs:
https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError
"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."
2015-07-11 07:41:44 +09:00
Corey Farwell
0ec2375cab
Remove tidy blacklist for 'script/dom/bindings/*'
...
Recently, I found myself reading through the Python codegen scripts that
live in 'components/script/dom/bindings/*' and noticed that there were
many tidy violations: unnecessary semicolons, weird spacing, unused
variables, lack of license headers, etc. Considering these files are now
living in our tree and mostly maintained directly by contributors of
Servo (as opposed to being from upstream), I feel these files should not
be excluded from our normal tidy process. This commit removes the
blacklist on these files and fixes all tidy violations.
I added these subdirectories to the blacklist because they appear to be
maintained upstream somewhere else:
* "components/script/dom/bindings/codegen/parser/*",
* "components/script/dom/bindings/codegen/ply/*",
Also, I added a '# noqa' comment which tells us to ignore the
flake8 errors for that line. I chose to ignore this (instead of fixing
it) to make the work for this commit simpler for me.
2015-07-09 19:42:31 +09:00
Ms2ger
2f88b84e07
Remove *Cast::from_actual.
...
Since JSRef was removed, from_actual duplicates from_ref.
2015-07-04 12:55:01 +02:00