Commit graph

442 commits

Author SHA1 Message Date
Anthony Ramine
d4f809f95e Fix generation of nullary callbacks 2015-04-26 16:49:43 +02:00
Ms2ger
a862479ca8 Remove as_slice() calls from script. 2015-04-26 10:52:55 +02:00
bors-servo
1f9de5ee2c Auto merge of #5779 - nox:css-escape, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5779)
<!-- Reviewable:end -->
2015-04-25 05:42:41 -05:00
Anthony Ramine
7e7b421db9 Fix generation of static JS methods
They now take a global argument.
2015-04-25 12:23:39 +02:00
bors-servo
ac0645c236 Auto merge of #5767 - glennw:image-cache, r=larsbergstrom,jdm
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5767)
<!-- Reviewable:end -->
2015-04-22 19:16:46 -05:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
bors-servo
43e664cda1 Auto merge of #5801 - Ms2ger:range, r=pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5801)
<!-- Reviewable:end -->
2015-04-22 18:24:21 -05:00
Mátyás Mustoha
a8343a0750 Canvas: implement global composition and blending. 2015-04-22 20:54:27 +02:00
Ms2ger
4d41f1c991 Stop using the deprecated range function. 2015-04-22 20:26:40 +02:00
Ms2ger
04b532e1fb Store a Runtime object in ScriptTask. 2015-04-22 11:17:09 +02:00
Josh Matthews
d0704d1797 Documentation. 2015-04-16 11:46:42 -04:00
Josh Matthews
01e66035ff Implement sync XHR by creating and spinning on-demand event loops. 2015-04-16 11:46:40 -04:00
Josh Matthews
5c7be5c9c3 Make async XMLHttpRequest requests use async network events. 2015-04-16 11:46:39 -04:00
Mátyás Mustoha
ccfff159e7 Canvas: added lineCap and lineJoin support. 2015-04-14 18:26:41 +02:00
bors-servo
f7c3544d75 Auto merge of #5659 - aneeshusa:add-range-errors-use-for-textencoder-textdecoder, r=jdm
Fixes #5620, and adds a few extra test cases.

Currently waiting on a few upstream PRs in rust-encoding to land.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5659)
<!-- Reviewable:end -->
2015-04-14 09:44:21 -05:00
Ms2ger
49393a8762 Update some URLs.
The HTML spec's division into pages is not stable, so it is safer to use the
URL without a specific page (which will redirect).
2015-04-14 10:44:51 +02:00
Corey Farwell
5eaa922045 Update WHATWG links to use HTTPS
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
bors-servo
1f9c2f9b34 Auto merge of #3726 - ChrisParis:callback-constants, r=jdm
This addresses https://github.com/servo/servo/issues/3149. The immediate purpose is to support the constants in NodeFilter. The changes mostly follow the current Gecko Codegen.py. The main gist is that the generation of certain code artifacts is now gated by hasInterfaceObject() or hasInterfacePrototypeObject(), rather than by isCallback().
2015-04-13 14:34:39 -05:00
Guro Bokum
97714ec5ed Firefox timeline integration #4957 2015-04-13 21:08:07 +07:00
bors-servo
b019df8927 Auto merge of #5633 - jdm:codegencleanup, r=Ms2ger
r? @Ms2ger
2015-04-12 03:37:05 -05:00
Chris Paris
d2b0d5e040 Support callback interfaces with constants. 2015-04-11 09:34:44 -10:00
Josh Matthews
9619390ece Clean up CGImports a bit more. 2015-04-10 10:31:44 -04:00
Ms2ger
d46db6d7f1 Resume tracing our collections of roots.
The second JS_SetExtraGCRootsTracer call clobbered the first, so
trace_collections was no longer being called.
2015-04-10 14:53:18 +02:00
bors-servo
596091e32c Auto merge of #5619 - jdm:bindglob, r=Manishearth
r? @Ms2ger
2015-04-10 04:41:46 -05:00
Aneesh Agrawal
f3aee90b06 Add Rust code for RangeErrors.
Implementation is alongside that of TypeErrors.
Note: the jsapi codes are reused for our own purposes, namely
distinguishing error_numbers in the get_error_message callback. See
comments in components/script/dom/bindings/error.rs for details.
2015-04-10 01:49:14 -04:00
Josh Matthews
81ba72d99c Remove glob import from generated bindings. Fixes #1788. 2015-04-09 12:56:29 -04:00
Anthony Ramine
45b490c977 Generate from_layout_js() conversion methods 2015-04-09 16:54:53 +02:00
bors-servo
1c09557398 Auto merge of #5606 - Ms2ger:errors, r=jdm 2015-04-08 21:07:18 -05:00
bors-servo
9b7bf415d7 Auto merge of #5590 - nox:document-createattributens, r=Ms2ger 2015-04-08 18:55:19 -05:00
Ms2ger
f8dec0fe58 Adjust the assertions in throw_dom_exception. 2015-04-08 20:44:49 +02:00
bors-servo
71e07013de Auto merge of #5564 - Ms2ger:FromJSValConvertible, r=saneyuki 2015-04-08 06:09:56 -05:00
Anthony Ramine
7b4f6126c8 Add script::dom::utils::validate_and_extract()
Accidentally fixes bugs about Document::createElementNS() where the
implementation of "validate and extract" used to check whether the local name
extracted from the qualified name was "xmlns" instead of the qualified name
itself.
2015-04-08 10:22:30 +02:00
Anthony Ramine
abc01d598a Add script::dom::utils::validate_qualified_name() 2015-04-08 10:22:28 +02:00
bors-servo
2089c1f285 Auto merge of #5550 - aneeshusa:fix-issue-5540, r=jdm
Fixes issue #5540.

As far as I can tell this is all that's necessary, but I'm new to Rust, so let me know if I missed something!
2015-04-07 23:04:12 -05:00
bors-servo
3fb666cf60 Auto merge of #5569 - Ms2ger:object, r=jdm 2015-04-07 13:32:02 -05:00
bors-servo
184d214e26 Auto merge of #5543 - jagtalon:jag/slashdot, r=jdm
Partially fixes #5504.

Props to @ehegnes and @jdm for the help!
2015-04-07 11:56:50 -05:00
bors-servo
e57630711f Auto merge of #5541 - nox:node-iterators-temporary, r=jdm 2015-04-07 10:22:10 -05:00
Ms2ger
5570bc3798 Implement support for object in IDL. 2015-04-07 17:05:27 +02:00
bors-servo
e521860a0e Auto merge of #5490 - nox:namednodemap, r=jdm 2015-04-07 09:31:20 -05:00
Anthony Ramine
fc31aef8b4 Add casts to Temporary types 2015-04-07 14:47:31 +02:00
Ms2ger
6b79d57920 When converting a non-finite float, throw the TypeError from the FromJSValConvertible implementation.
This removes some unnecessary custom code in the codegen and makes this
implementation follow the convention of having thrown an exception when
returning Err() from FromJSValConvertible.
2015-04-07 14:16:34 +02:00
Ms2ger
e3683c8598 Merge the To/FromJSValConvertible implementations for Finite<T>. 2015-04-07 13:34:06 +02:00
Ms2ger
58a8cfda52 Drop the FromJSValConvertible implementation for interfaces.
It doesn't really fit in the design, and native_from_reflector_jsmanaged has
gained the usability improvements that it used to lack.
2015-04-07 13:11:45 +02:00
bors-servo
7f773d73c4 Auto merge of #5526 - frewsxcv:expect, r=jdm
None
2015-04-07 03:33:11 -05:00
Aneesh Agrawal
04468a53df Don't consume self when calling root on a Temporary<T>.
Fixes issue #5540.
2015-04-06 18:57:06 -04:00
Corey Farwell
2a01cec521 Utilize Option::expect 2015-04-06 14:06:05 -07:00
Jag Talon
6e013d3c9c RootCollection: Start using RootedVec instead of SmallVec32.
dom/bindings/js.rs: Alphabetize `use`.

dom/bindings/js.rs: moved `unsafe` block to a let binding.

dom/bindings/trace.rs: rename alternate constructor of RootedVec.

dom/bindings/trace.rs: `new()` is now using `new_with_destination_address()` internally.

dom/bindings/js.rs: alphabetize imports.
2015-04-06 16:36:10 -04:00
Anthony Ramine
fbe2e4b626 Add dom::bindings::error::Error::InUseAttribute 2015-04-06 22:27:00 +02:00
bors-servo
3c5c2f416b Auto merge of #5529 - ehegnes:issue-5521, r=jdm
Fixes #5521
2015-04-06 15:16:39 -05:00
bors-servo
8d1a6c45f6 Auto merge of #5503 - nox:cleanup-attributes, r=Manishearth
This makes all tests in attributes.html pass.
2015-04-06 12:36:09 -05:00