Commit graph

2923 commits

Author SHA1 Message Date
bors-servo
f078f8fdf4 Auto merge of #8505 - frewsxcv:html-table-cell-element-bgcolor-idl-attribute, r=Ms2ger
Implement 'bgcolor' IDL attribute for 'HTMLTableCellElement'

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8505)
<!-- Reviewable:end -->
2015-11-13 15:07:53 +05:30
Corey Farwell
765ade6892 Implement 'bgcolor' IDL attribute for 'HTMLTableCellElement' 2015-11-13 00:47:20 -05:00
Corey Farwell
7b8d5bbb97 Prefer atoms over strs for string comparisons 2015-11-12 23:46:48 -05:00
bors-servo
ef74bf5d42 Auto merge of #8500 - frewsxcv:subpage, r=jdm
Consolidate 'subpage finding' script_task logic

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8500)
<!-- Reviewable:end -->
2015-11-13 08:52:18 +05:30
bors-servo
62acdd303b Auto merge of #8477 - asajeffrey:opaque-domstring, r=asajeffrey
Opaque DOMString

This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8477)
<!-- Reviewable:end -->
2015-11-13 07:17:30 +05:30
bors-servo
e63b1e83d4 Auto merge of #8147 - nox:weakref, r=Ms2ger
Implement weak-referenceable JS-managed objects

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8147)
<!-- Reviewable:end -->
2015-11-13 06:22:40 +05:30
Alan Jeffrey
5db67b5981 Added in-place mutation to DOMString.
The methods which are currently implemented are the ones on String that are currently being used:
string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
2015-11-12 17:53:01 -06:00
Alan Jeffrey
034769f280 Code generation uses DOMString::from("...") rather than DOMString("...".to_owned()). 2015-11-12 17:53:00 -06:00
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Alan Jeffrey
cf340be758 Replaced DOMString by String in storage APIs. 2015-11-12 17:52:59 -06:00
Alan Jeffrey
582273eb07 Replaced DOMString by String in filereader. 2015-11-12 17:52:58 -06:00
Alan Jeffrey
5101506089 Replaced DOMString by String in devtools. 2015-11-12 17:52:58 -06:00
bors-servo
9eaa8e7b1f Auto merge of #8492 - jdm:e10s-timer-events, r=jdm
script: Make timer events e10s-safe.

Closes #8235.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8492)
<!-- Reviewable:end -->
2015-11-13 05:19:48 +05:30
bors-servo
1720595a85 Auto merge of #8479 - frewsxcv:domstring-default, r=Ms2ger
Implement Default trait for DOMString

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8479)
<!-- Reviewable:end -->
2015-11-13 04:51:32 +05:30
bors-servo
c44c73aa00 Auto merge of #8498 - nox:fix-variadic-and-default-arguments, r=jdm
Properly handle variadic arguments preceded by default values

I broke that in #8197.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8498)
<!-- Reviewable:end -->
2015-11-13 04:22:11 +05:30
Corey Farwell
607cb0eeb7 Consolidate 'subpage finding' script_task logic 2015-11-12 17:32:37 -05:00
Josh Matthews
2340583e56 Differentiate between error and non-error event handlers per the spec. 2015-11-12 16:21:24 -05:00
Anthony Ramine
d4ce25d07c Properly handle variadic arguments preceded by default values
I broke that in #8197.
2015-11-12 21:10:45 +01:00
bors-servo
b40882093a Auto merge of #8428 - Ms2ger:conversions, r=Manishearth
Update js.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8428)
<!-- Reviewable:end -->
2015-11-13 01:13:52 +05:30
Patrick Walton
1dc0d61c3c script: Make timer events e10s-safe.
Closes #8235.
2015-11-12 14:30:25 -05:00
bors-servo
4848e37e2e Auto merge of #7844 - Wafflespeanut:requests, r=jdm
Cancelable network requests!

fixes #4974

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7844)
<!-- Reviewable:end -->
2015-11-12 18:59:58 +05:30
bors-servo
743ca24819 Auto merge of #8481 - frewsxcv:iterablepage-iter, r=Ms2ger
Simplify IterablePage::find

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8481)
<!-- Reviewable:end -->
2015-11-12 18:29:12 +05:30
Anthony Ramine
72c67efe96 Introduce trait WeakReferenceable
This allows to take weak references of JS-managed DOM objects.
2015-11-12 12:51:50 +01:00
bors-servo
448c7fb2e6 Auto merge of #8482 - frewsxcv:no-mut, r=Ms2ger
Remove unnecessary '*_mut' methods

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8482)
<!-- Reviewable:end -->
2015-11-12 16:44:09 +05:30
Ms2ger
6d2ae85c1f Use the conversion traits from js. 2015-11-12 10:48:58 +01:00
Ms2ger
acb24e80b8 Use throw_type_error and throw_range_error from js. 2015-11-12 10:20:19 +01:00
Ravi Shankar
10f5584f78 Implement cancellation listener for cancelling network requests 2015-11-12 14:02:59 +05:30
Corey Farwell
bfc4ed4cac Cleanup PageIterator::next 2015-11-12 00:24:19 -05:00
Corey Farwell
1e6d95f750 Remove unnecessary '*_mut' methods 2015-11-12 00:12:39 -05:00
Corey Farwell
94f0478f51 Simplify IterablePage::find 2015-11-12 00:03:53 -05:00
Corey Farwell
00fa3b2f85 Implement Default trait for DOMString 2015-11-11 22:12:56 -05:00
bors-servo
1b20bc90ee Auto merge of #8476 - frewsxcv:unnecessary-document-notification, r=nox
Remove unnecessary 'node changed' notification

This same notification already happens in `CharacterData::SetData`

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8476)
<!-- Reviewable:end -->
2015-11-12 05:33:19 +05:30
Corey Farwell
1789405883 Remove unnecessary 'node changed' notification
This same notification already happens in `CharacterData::SetData`
2015-11-11 17:53:38 -05:00
benshu
7623e89506 Execute XHR timeout callbacks directly. (Fixes #8468.) 2015-11-11 23:12:07 +01:00
bors-servo
12f6ba29a7 Auto merge of #8412 - ecoal95:webidl-sequence-return, r=jdm
Add WebIDL sequence return values

And use it for `WebGLRenderingContext::getSupportedExtensions`.
Part of #544

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8412)
<!-- Reviewable:end -->
2015-11-11 23:15:15 +05:30
Emilio Cobos Álvarez
e33330db4e Implement WebIDL sequence return value using JS_NewArrayObject1
This commits changes the creation of the array to use the length, and
sets the elements later.

Reference implementation:
07ed19e582/js/xpconnect/public/nsTArrayHelpers.h (L16)
2015-11-11 18:30:34 +01:00
Emilio Cobos Álvarez
b740b90b8d webgl: Implement getSupportedExtensions 2015-11-11 17:13:59 +01:00
Emilio Cobos Álvarez
63aa6862b4 Implement WebIDL sequence return values 2015-11-11 17:13:59 +01:00
bors-servo
01ff78b438 Auto merge of #8466 - frewsxcv:node-value, r=nox
Simplify script::dom::node NodeValue implementations

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8466)
<!-- Reviewable:end -->
2015-11-11 21:43:21 +05:30
bors-servo
5e6efd62c1 Auto merge of #8459 - frewsxcv:namednodemap-iter, r=Ms2ger
Simplify iterating over Element attributes

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8459)
<!-- Reviewable:end -->
2015-11-11 20:19:49 +05:30
Corey Farwell
261ce49423 Simplify script::dom::node NodeValue implementations 2015-11-11 08:53:53 -05:00
Anthony Ramine
acb13dc899 Support variadic interface arguments (fixes #8159)
We use a RootedVec value in codegen, of which we use the `r()` method to
pass `&[&T]` to the interface methods.
2015-11-11 14:52:21 +01:00
Anthony Ramine
e66a361e08 Do not import union constructors in dom::testbinding 2015-11-11 14:19:36 +01:00
Anthony Ramine
6d72293681 Remove TestBinding::global
Use global_root_from_reflector() instead.
2015-11-11 14:19:35 +01:00
Anthony Ramine
f84f16384d Remove unused parameter in instantiateJSToNativeConversionTemplate() 2015-11-11 14:19:34 +01:00
Anthony Ramine
b290a3161d Clean up the conversion routines
Functions returning `Root<T>` are prefixed by "root_" and the ones returning
`*const T` by "native_".

Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones
taking `&T` by "_from_reflector".
2015-11-11 14:19:30 +01:00
Corey Farwell
a7c470de09 Simplify iterating over Element attributes 2015-11-10 21:42:48 -05:00
bors-servo
fd5540df62 Auto merge of #8453 - frewsxcv:atoms, r=jdm
Prefer Atoms over strs for comparison

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8453)
<!-- Reviewable:end -->
2015-11-11 06:55:39 +05:30
benshu
d27a3244f2 XHR timeouts use same abstraction as scripts timers. (fixes #3396) 2015-11-11 00:52:34 +01:00
bors-servo
13226f8472 Auto merge of #8381 - bholley:attr_restyle_hints, r=pcwalton
Implement attribute restyle hints

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8381)
<!-- Reviewable:end -->
2015-11-11 01:27:45 +05:30