Commit graph

2274 commits

Author SHA1 Message Date
Anthony Ramine
b0d1ccdf5f Do not root Performance::timing 2015-10-19 09:37:05 +02:00
Anthony Ramine
17cd4202e7 Do not root ChildrenList::node 2015-10-19 09:37:04 +02:00
Anthony Ramine
b149e0c979 Do not root NodeIterator::root_node 2015-10-19 09:37:03 +02:00
Anthony Ramine
6849510526 Do not root NamedNodeMap::owner 2015-10-19 09:37:02 +02:00
Anthony Ramine
5889a75b10 Do not root Location::window 2015-10-19 09:37:01 +02:00
Anthony Ramine
dee3aecea1 Do not root HTMLScriptElement::parser_document 2015-10-19 09:37:00 +02:00
Anthony Ramine
e8f358d178 Do not root InputActivationState::checked_radio 2015-10-19 09:36:58 +02:00
Anthony Ramine
71dcabfad8 Do not root DOMTokenList::element 2015-10-19 09:36:57 +02:00
Anthony Ramine
822e6f0d48 Do not root DOMStringMap::element 2015-10-19 09:36:56 +02:00
Anthony Ramine
ff0da2f642 Do not root DOMParser::window 2015-10-19 09:36:55 +02:00
Anthony Ramine
ce6aab6cb1 Do not root DOMImplementation::document 2015-10-19 09:36:54 +02:00
Anthony Ramine
6ab7f64620 Return a reference in BrowserContext::active_window() 2015-10-19 09:36:53 +02:00
Anthony Ramine
409b5e3695 Return a reference in Document::window() 2015-10-19 09:36:52 +02:00
Anthony Ramine
e889b0914b Do not root Document::window 2015-10-19 09:36:51 +02:00
Anthony Ramine
264e943597 Return a reference in BrowserContext::frame_element() 2015-10-17 02:17:25 +02:00
Anthony Ramine
1f31d5b856 Return a reference in BrowserContext::active_document() 2015-10-17 02:07:52 +02:00
Anthony Ramine
6c7f37061b Implement Deref<Target=T> for JS<T> where T: Reflectable
We can only borrow JS<T> from rooted things, so it's safe to deref it.
The only types that provide mutable JS<T> things are MutHeap<JS<T>> and
MutNullableHeap<JS<T>>, which don't actually expose that they contain
JS<T> values.
2015-10-17 01:58:52 +02:00
bors-servo
7a71f39320 Auto merge of #8031 - creativcoder:spec-links-js, r=jdm
added spec link for type mapping

Hi. added some of the spec links, that i could understand from the spec. Please mention if anything else needs to be added.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8031)
<!-- Reviewable:end -->
2015-10-16 13:38:30 -06:00
bors-servo
0e4abddd37 Auto merge of #7947 - jimberlage:7856/buffered-amount, r=jdm
Adds bufferedAmount to Websocket (fixes #7856).

This adds a readonly bufferedAmount attribute to Servo's websocket implementation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7947)
<!-- Reviewable:end -->
2015-10-16 12:56:44 -06:00
bors-servo
96ca6b6c6d Auto merge of #8035 - sliz1:issues/8028, r=Manishearth
Issue 8028: `parse_html` should take `Url` rather than `&Url`

fixes #8028

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8035)
<!-- Reviewable:end -->
2015-10-16 11:24:08 -06:00
bors-servo
724d4e191b Auto merge of #8043 - eefriedman:async-listener-mut, r=jdm
Make AsyncResponseListener methods take `&mut self`

Gets rid of a bunch of useless `Cell`/`RefCell` types.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8043)
<!-- Reviewable:end -->
2015-10-16 08:49:13 -06:00
bors-servo
7c7dbde0f4 Auto merge of #8026 - eefriedman:js-rooting, r=nox
Fix uses of JS<T> as a type on the stack

`JS<T>` belongs on the heap, and only on the heap.  This is a collection of fixes so that code uses either `Root<T>` or `&T` to pass around garbage-collected pointers.

Ideally, we could completely ban constructing a `JS<T>` outside of constructor functions, but we aren't quite there yet.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8026)
<!-- Reviewable:end -->
2015-10-16 08:05:59 -06:00
Ms2ger
1f03ce1b1f Enable some warnings for generated code.
None of those warnings currently occur.
2015-10-16 12:07:57 +02:00
Eli Friedman
827f2b873c Simplify AsyncResponseListener implementations. 2015-10-15 16:53:47 -07:00
Eli Friedman
c1aff0b678 Make AsyncResponseListener methods take &mut self. 2015-10-15 16:44:39 -07:00
Jim Berlage
380a9ce22b Adds bufferedAmount to Websocket (fixes #7856). 2015-10-15 17:06:24 -05:00
Eli Friedman
9de42c8935 Simplify extracting a reference from an Option<Root<T>>, per review comments. 2015-10-15 14:03:58 -07:00
Eli Friedman
5713867778 Fix documentation for JS<T> and friends. 2015-10-15 14:03:57 -07:00
Eli Friedman
5bdf6bb1d3 Fix remaining MutHeap methods not to expose JS<T>. 2015-10-15 14:03:57 -07:00
Eli Friedman
57584e74c6 Make get() and set() on MutNullableHeap use the correct types.
get() must always return a rooted value, because we have no way of
ensuring the value won't be invalidated. set() takes an &T because it's
convenient; there isn't any need to expose JS<T>.
2015-10-15 14:03:56 -07:00
Eli Friedman
7a08b29201 Don't use MutNullableHeap in HTMLCanvasElement.
MutNullableHeap is going away in favor of MutNullableHeapJS.
2015-10-15 14:03:55 -07:00
Eli Friedman
2d3c3ece97 Don't return a JS<T> from bound_texture_for/
It's never correct to return a JS<T>.  Maybe the lint should catch this?
2015-10-15 14:03:55 -07:00
Eli Friedman
88a1cbb28b Stop implementing Copy for JS<T>.
A copy of a JS<T> doesn't have the rooting properties of the original,
so it makes no sense for it to implement Copy.
2015-10-15 14:02:45 -07:00
Manish Goregaokar
8819f0d8b8 Update script to work with lint changes 2015-10-16 01:20:27 +05:30
bors-servo
417cf5738e Auto merge of #8020 - nox:codegen-derived, r=Ms2ger
Generate all Derived implementations in codegen

Follow-up of #7873.

@Ms2ger r? :)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8020)
<!-- Reviewable:end -->
2015-10-15 12:53:08 -06:00
Stephen Li
e83d5a9669 Issue 8028: parse_html should take Url rather than &Url 2015-10-15 13:48:29 -04:00
Anthony Ramine
7d6ea83479 Explicitly customise flags of new nodes where needed
Given codegen now generates the various TypeId enums, it seems pointless to
still have to write their respective values in every DOM struct inheriting from
Node just to set the initial IS_IN_DOC flag in Document and IN_ENABLED_STATE in
form controls.
2015-10-15 17:30:41 +02:00
Rahul Sharma
1141f00212 added spec link for type mapping 2015-10-15 19:28:56 +05:30
bors-servo
5a0a91eba7 Auto merge of #7972 - nox:codegen-heapsize, r=Ms2ger
Introduce DOMClass::heap_size_of

It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7972)
<!-- Reviewable:end -->
2015-10-15 07:13:55 -06:00
Anthony Ramine
617fc08783 Generate all Derived implementations in codegen 2015-10-14 22:04:20 +02:00
Anthony Ramine
da67630931 Introduce DOMClass::heap_size_of
It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.
2015-10-14 21:52:16 +02:00
Michael Wu
3129fb2330 Throw on bad ByteStrings 2015-10-14 15:30:57 -04:00
Michael Wu
e733a7c46a Support the updated spidermonkey bindings 2015-10-14 15:30:52 -04:00
Anthony Ramine
aab2c40389 Generate the TypeId enums in codegen 2015-10-14 18:45:35 +02:00
bors-servo
55769b2fbf Auto merge of #7829 - frewsxcv:htmltablecellelement-cellindex, r=Ms2ger
Implement HTMLTableCellElement::CellIndex

Extracted from #6936

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7829)
<!-- Reviewable:end -->
2015-10-14 07:39:24 -06:00
bors-servo
26902a9a9b Auto merge of #7871 - psdh:sendReason, r=jdm
Send reason in the Websocket close handshake

Fixes #7862

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7871)
<!-- Reviewable:end -->
2015-10-13 17:25:27 -06:00
Eli Friedman
fa606bf1c8 Link to the HTML multipage spec, not the single-page one. 2015-10-13 11:48:51 -07:00
Dongie Agnir
61fe89d0e1 Add newline so code sample is parsed correctly. 2015-10-12 18:01:56 -10:00
bors-servo
5ffeb3b95b Auto merge of #7921 - glennw:subpage-fixes-2, r=jdm
Update RemoveIFrame to use pipeline id rather than subpage.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7921)
<!-- Reviewable:end -->
2015-10-12 07:49:26 -06:00
bors-servo
ac1b595609 Auto merge of #7976 - frewsxcv:clippy, r=jdm
Cleanup code that was warned by rust-clippy

[whitespace agnostic diff](https://github.com/servo/servo/pull/7976/files?w=1)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7976)
<!-- Reviewable:end -->
2015-10-12 04:37:42 -06:00