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
89a5e2b3d0
Auto merge of #7433 - frewsxcv:formdata-get, r=nox
...
Cleanup, refactor FormDataMethods::Get
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7433 )
<!-- Reviewable:end -->
2015-08-30 07:00:33 -06:00
Corey Farwell
8f876a179a
Prefer JSTrue/JSFalse to 1/0
2015-08-28 22:03:01 -04:00
Corey Farwell
b0d2194a4a
Cleanup, refactor FormDataMethods::Get
2015-08-28 16:29:11 -04:00
Ms2ger
cf55d3191d
Send the start and end half of a TimelineMarker to the devtools PullTimelineMarkers thread together.
2015-08-28 20:48:07 +02:00
bors-servo
72125f070d
Auto merge of #7391 - jdm:prefs, r=Ms2ger
...
Replace catch-all experimental flag with fine-grained boolean prefere…
…nces initialized from a JSON document.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7391 )
<!-- Reviewable:end -->
2015-08-28 10:08:32 -06:00
bors-servo
2f227a034a
Auto merge of #7431 - frewsxcv:dom-methods-cleanup, r=Ms2ger
...
Merge adjacent identical `impl` sections
Prior to #7416 and #7401 , many of these `impl` sections were not
identical
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7431 )
<!-- Reviewable:end -->
2015-08-28 08:49:00 -06:00
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
Josh Matthews
a3ee9b5dd9
Replace catch-all experimental flag with fine-grained boolean preferences initialized from a JSON document.
2015-08-28 10:30:04 -04:00
Simon Sapin
006dd1002f
Fix CharacterDataMethods to count UTF-16 code units, not code points.
2015-08-28 11:58:38 +02:00
Simon Sapin
95a252a650
Refactor script::textinput to count UTF-8 bytes rather than code points.
2015-08-28 11:57:40 +02:00
benshu
1e6a2f08fc
Time distribution across script event categories.
2015-08-28 00:52:41 +02:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
bors-servo
8c301c291a
Auto merge of #7389 - frewsxcv:implement-nihilistic-methods, r=nox
...
Implement 'do nothing' methods on Window and Document
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7389 )
<!-- Reviewable:end -->
2015-08-27 12:30:28 -06:00
Corey Farwell
bf50145fbd
Implement 'do nothing' methods on Window and Document
2015-08-27 13:13:10 -04:00
Anthony Ramine
2a028f66a2
Remove AttributeHandlers
...
On components/script/*.rs:
# Remove imports.
/^ *use dom::element::\{.*AttributeHandlers/ {
s/\{AttributeHandlers, /\{/
s/, AttributeHandlers//g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::element::\{?AttributeHandlers\}?;$/d
# Remove AttributeHandlers.
/^pub trait AttributeHandlers \{$/,/^\}$/D
# Patch AttributeHandlers methods.
/^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ {
s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/
/^ *fn /s/\(self([,)])/\(\&self\1/
/^ *fn.*\(&self/s/fn/pub fn/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:04 +02:00
Anthony Ramine
aa83643507
Remove reference to helper traits from documentation
2015-08-27 16:59:04 +02:00
Anthony Ramine
c0cff59df8
Remove SinkHelpers
...
Method get_or_create() is now directly on servohtmlparser::Sink.
2015-08-27 16:59:03 +02:00
Anthony Ramine
275907f256
Remove dead code that surfaced when moved outside helper trait
2015-08-27 16:59:03 +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
Corey Farwell
6650636063
Mention tracking issue for implementing document.all
2015-08-26 18:19:26 -04:00
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
bors-servo
186c1d14d5
Auto merge of #6880 - dzbarsky:rAF, r=jdm
...
Don't try to unwrap the result of requestAnimationFrame callback
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6880 )
<!-- Reviewable:end -->
2015-08-26 08:13:11 -06:00
bors-servo
06ba2167ba
Auto merge of #7360 - wilmoz:ErgonomicSignature, r=Ms2ger
...
Make handle_potential_webgl_error more ergonomic
https://github.com/servo/servo/issues/7358
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7360 )
<!-- Reviewable:end -->
2015-08-26 05:21:42 -06:00
wilmoz
363183d12a
Make handle_potential_webgl_error more ergonomic
2015-08-25 13:04:55 -05:00
wilmoz
63851f2650
Forbid multiline imports
2015-08-25 12:27:42 -05:00
ecoal95
6341c77700
webgl: Implement multiple calls and improve error detection
...
This commit implements WebGL's:
* cullFace
* frontFace
* enable
* disable
* depthMask
* colorMask
* clearDepth
* clearStencil
* depthFunc
* depthRange
* hint
* lineWidth
* pixelStorei
* polygonOffset
* texParameteri
* texParameterf
* texImage2D (partially)
It inlines a lot of OpenGL calls to keep the file
`components/canvas/webgl_paint_task.rs` as small as possible while
keeping readability.
It also improves error detection on previous calls, and sets node damage
on the canvas in the drawing calls.
It adds a `TexImage2D` reftest, even though it's not enabled because:
* WebGL paints the image when it loads (asynchronously), so the reftest doesn't wait for it and it finishes early
* If we change the source for the base64 src of the image it works as expected in non-headless mode, but the test harness locks
2015-08-25 17:16:46 +02:00
João Oliveira
77e8d3071c
Move RegisterBindings::RegisterProxyHandlers call into script::init
...
closes #7336
2015-08-24 18:41:39 +01:00
bors-servo
fa06a96f8a
Auto merge of #7334 - servo:active, r=SimonSapin
...
Parse :active pseudo-class selector.
This is #7258 with a spec link added in doc-comment.
The pseudo-class is never matched, but this can still help with stylesheets like `a:hover, a:active { color: something }` where failing to parse one pseudo-class makes the entire selector list invalid.
I filed #7333 about actually making it match.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7334 )
<!-- Reviewable:end -->
2015-08-24 04:23:13 -06:00
Simon Sapin
daedee844f
Add spec link for the IN_ACTIVE_STATE flag.
2015-08-24 11:45:41 +02:00
João Oliveira
1829c72061
remove PrivateCSSStyleDeclarationHelpers trait from Element,
...
call get_inline_style_declaration and
get_important_inline_style_declaration inline
closes #7319
2015-08-23 14:15:21 +01:00
bors-servo
6e06cae44a
Auto merge of #7288 - mdibaiee:computedstyle-element, r=Ms2ger
...
Fix #7268 - getComputedStyle should take `Element`, not `HTMLElement`
This is my first patch, I hope I'm doing it right.
About the test, do you think this is enough and reliable?
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7288 )
<!-- Reviewable:end -->
2015-08-22 20:43:45 -06:00
bors-servo
60140ad294
Auto merge of #7315 - frewsxcv:python-is, r=SimonSapin
...
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
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7315 )
<!-- Reviewable:end -->
2015-08-22 09:26:34 -06: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
Mahdi Dibaiee
b7d25159d3
Fix #7268 - getComputedStyle should take Element
, not HTMLElement
2015-08-22 15:16:15 +04:30
Kyle Zentner
45b7ee9bdb
Parse flex-direction CSS property.
2015-08-21 15:59:16 -07: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