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
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
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
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
Glenn Watson
8d312b0f0c
Convert RemoveIFrame message to use pipeline id.
2015-10-12 14:14:31 +10:00
Corey Farwell
81e034885b
Cleanup code that was warned by rust-clippy
2015-10-11 20:47:45 -04:00
Corey Farwell
3d383f21ae
Implement deleteRow and insertRow for <table> element
...
Continued from #6936
2015-10-11 09:47:46 -04:00
bors-servo
02d8894945
Auto merge of #7958 - frewsxcv:consolidate-magic-number, r=mbrubeck
...
Consolidate magic number representing max unsigned long
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7958 )
<!-- Reviewable:end -->
2015-10-10 15:00:39 -06:00
bors-servo
babeed998d
Auto merge of #7953 - frewsxcv:htmldivelement-align, r=mbrubeck
...
Implement 'align' attribute for <div> elements
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7953 )
<!-- Reviewable:end -->
2015-10-10 14:11:33 -06:00
Corey Farwell
4dc8fd76ec
Consolidate magic number representing max unsigned long
2015-10-10 13:46:11 -04:00
bors-servo
b34b82537a
Auto merge of #7955 - frewsxcv:listing-pre, r=nox
...
Add 'listing' alias for <pre> elements
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7955 )
<!-- Reviewable:end -->
2015-10-10 11:08:14 -06:00
Corey Farwell
9b68d715de
Explicitly place '/' before fragment for multipage spec links
...
This prevents us from 301 redirecting, which could cause the fragment to
get lost
2015-10-10 12:07:10 -04:00
Corey Farwell
85f2b6fc5b
Replace usage of old-style WHATWG spec links
2015-10-10 11:55:09 -04:00
Corey Farwell
59e2911f28
Add 'listing' alias for <pre> elements
2015-10-10 08:58:38 -04:00
Corey Farwell
55c65d3192
Implement 'align' attribute for <div> elements
2015-10-10 08:15:44 -04:00
bors-servo
9cccd98254
Auto merge of #7948 - kunitsyn:master, r=Manishearth
...
Changed dom_class type to Option<&'static DOMClass> to fix #7942
I have a feeling that converting `Option<&T>` to `*const libc::c_void` could be less explicit.
Was there any way to do it shorter?
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7948 )
<!-- Reviewable:end -->
2015-10-09 23:22:59 -06:00
bors-servo
06e0447e82
Auto merge of #7835 - iawaknahc:webstorage-quota, r=jdm
...
Implement a quota of 5MB per origin for localstorage and sessionstorage
PR for https://github.com/servo/servo/issues/6739
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7835 )
<!-- Reviewable:end -->
2015-10-09 12:36:47 -06:00
Andriy Kunitsin
7301609c18
Changed dom_class type to Option<&'static DOMClass>
2015-10-09 19:57:22 +03:00
bors-servo
12139f73ef
Auto merge of #7925 - Ms2ger:iframe-pipeline-layout, r=glennw
...
Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7925 )
<!-- Reviewable:end -->
2015-10-09 09:49:08 -06:00
bors-servo
8c81d9ab28
Auto merge of #7885 - jimberlage:7858/null-message, r=Ms2ger
...
Creates empty string when passed null
This should fix #7858 . An empty `USVString` is now used when `data` is `None`.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7885 )
<!-- Reviewable:end -->
2015-10-09 09:02:45 -06:00
bors-servo
1029feb55d
Auto merge of #7841 - frewsxcv:htmlbodyelement-text, r=nox
...
Implement <body>'s "text" attribute
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7841 )
<!-- Reviewable:end -->
2015-10-09 06:11:46 -06:00
Pierre Chevalier
8b5fe88bd3
Refactor away duplication of get_rooted functionality
...
Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.
First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs
Second part done manually after finding them with
git grep ".get().map("
Fixes 7929.
2015-10-08 23:12:20 +01:00
Louis Chan
fb45b0e691
Implement a quota of 5MB per origin for localstorage and sessionstorage
2015-10-09 03:55:27 +08:00
Jim Berlage
0ffd2f636f
Require the argument to WebSocket#send() ( fixes #7858 ).
2015-10-08 12:08:26 -05:00
Corey Farwell
64f4835a4f
Implement <body>'s "text" attribute
2015-10-08 10:55:12 -04:00
Ms2ger
25c19f77af
Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>.
2015-10-08 11:00:56 +02:00
bors-servo
1d617f332e
Auto merge of #7899 - glennw:subpage-fixes-1, r=pcwalton
...
Remove constellation round trip for subpage mapping in compositor.
This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor.
(This is the first of several commits removing subpage from parts of servo).
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7899 )
<!-- Reviewable:end -->
2015-10-07 18:36:35 -06:00