Commit graph

2537 commits

Author SHA1 Message Date
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
Pierre Chevalier
a6a685e954 Clarify some code in do_create_interface_objects
rval.get() is believed to be always null upon entering this function.
This assumption is verified by the added assertion.
It makes more sense to move the block of code that was moved inside
the if statement which is the only place where it can be initialized.

Fixes #7941.
2015-10-10 18:13:37 +01: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
Emilio Cobos Álvarez
7030f09823 webgl: Implement WebGLContextEvent and use it on context creation error
spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
2015-10-08 00:29:31 +02:00
bors-servo
94dc98717b Auto merge of #7892 - anthgur:form-data-refactor, r=jdm
Refactor html form dataset collection

Factor out FormDatum collection for `<input>`
Improve early return logic for getting the FormDatum from an `<input>`
Condense element type patterns

Proposed to close #7851

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7892)
<!-- Reviewable:end -->
2015-10-07 08:32:44 -06:00
Anthony Urena
31980a7a34 Refactor html form dataset collection
Factor out FormDatum collection for <input>
Improve early return logic for getting the FormDatum from an <input>
Condense element type patterns
2015-10-07 10:22:02 -04:00
bors-servo
60a77defe5 Auto merge of #7898 - frewsxcv:htmlfontelement-size-attribute-setter, r=nox
Use the correct IDL setter for <font>.size

Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7898)
<!-- Reviewable:end -->
2015-10-07 07:04:28 -06:00
Corey Farwell
eabaf2c6a5 Use the correct IDL setter for <font>.size
Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.
2015-10-07 08:28:43 -04:00
bors-servo
745635a706 Auto merge of #7903 - Ms2ger:codegen-docs, r=Manishearth
Add support for documenting CGAbstractMethods.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7903)
<!-- Reviewable:end -->
2015-10-07 06:20:20 -06:00
bors-servo
9a12c2c061 Auto merge of #7902 - mskrzypkows:HTMLInputElement_pub_refactor, r=nox
Removed unneeded pub annotations in HTMLInputElement  #7897

get_size method appeared to be never used so I removed it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7902)
<!-- Reviewable:end -->
2015-10-07 05:35:14 -06:00
Ms2ger
6b160c6a29 Document RegisterBindings::RegisterProxyHandlers. 2015-10-07 12:22:15 +02:00
Ms2ger
03b04e5363 Add support for documenting CGAbstractMethods. 2015-10-07 12:21:59 +02:00
Maciej Skrzypkowski
7a5390d936 Removed unneeded pub annotations in HTMLInputElement #7897
get_size method appeared to be never used so I removed it.
2015-10-07 11:24:49 +02:00
Ms2ger
b96594ea50 Remove a pointless level of indentation. 2015-10-07 11:15:20 +02:00
Ms2ger
a701397a9d Pass an Element to collect_text. 2015-10-07 11:07:20 +02:00
Ms2ger
6e745b5a00 Avoid panicking in the implementation of HTMLOptionElement#text for non-element, non-text children. 2015-10-07 10:52:44 +02:00
Glenn Watson
da881947e5 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).
2015-10-07 12:24:15 +10:00