Commit graph

16155 commits

Author SHA1 Message Date
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
bors-servo
df81cd7ce9 Auto merge of #8168 - benschulz:xhr-timeout-ordering, r=jdm
XHR timeouts use same abstraction as scripts timers. (fixes #3396)

Alright, this is it. Finally the fix for #3396. :D

I'll add two comments via reviewable in a second.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8168)
<!-- Reviewable:end -->
2015-11-11 06:08:28 +05:30
benshu
d27a3244f2 XHR timeouts use same abstraction as scripts timers. (fixes #3396) 2015-11-11 00:52:34 +01:00
Michael Howell
d32a2d6cfc Write reflow results, even with no root node.
Fixes #8240
2015-11-10 15:01:46 -07: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
Bobby Holley
b29369296c Add ::from_layout_js factory to LayoutNode, LayoutElement, and LayoutDocument. 2015-11-10 11:57:25 -08:00
Bobby Holley
7fa7936657 Implement attribute restyle hints.
Fixes #6942.
2015-11-10 11:57:24 -08:00
Bobby Holley
47744d95ad Make RESTYLE_SELF imply RESTYLE_DESCENDANTS.
This is a temporary workaround for #8438.
2015-11-10 11:41:28 -08:00
Corey Farwell
55477eb618 Prefer Atoms over strs for comparison 2015-11-10 08:58:57 -05:00
bors-servo
81f094b129 Auto merge of #8447 - frewsxcv:htmltableelement-width-idl-attribute, r=eefriedman
Implement 'width' IDL attribute on <table>

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8447)
<!-- Reviewable:end -->
2015-11-10 12:54:30 +05:30
bors-servo
32a91bc656 Auto merge of #8444 - rilut:patch-2, r=frewsxcv
refactor(htmlhrelement.rs): color setter now uses macro

Changed the function in #L44-47 to a macro usage. Fixes #8433.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8444)
<!-- Reviewable:end -->
2015-11-10 12:12:25 +05:30
Bobby Holley
c9704992a9 Factor the name-related fields of Attr into a struct and move it to style. 2015-11-09 21:40:22 -08:00
Bobby Holley
488c1291d4 Hoist AttrValue into style. 2015-11-09 21:40:22 -08:00
Corey Farwell
575b3c3d4b Implement 'width' IDL attribute on <table> 2015-11-09 23:31:25 -05:00
bors-servo
cff9173208 Auto merge of #8442 - rilut:patch-1, r=Manishearth
refactor(devtools/lib.rs): Remove unused import

Removed `RecvError` imports from #L57. Fixes #8442.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8442)
<!-- Reviewable:end -->
2015-11-10 09:35:53 +05:30
bors-servo
4ec96963f8 Auto merge of #8440 - mbrubeck:range-unused, r=Manishearth
Remove unused method from Range

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8440)
<!-- Reviewable:end -->
2015-11-10 08:43:59 +05:30
bors-servo
cd6813ea39 Auto merge of #8434 - frewsxcv:dimension-attrvalue, r=eefriedman
Add Dimension member to AttrValue

Fixes #8417

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8434)
<!-- Reviewable:end -->
2015-11-10 08:15:37 +05:30
Rizky Luthfianto
d0d2a64628 refactor(htmlhrelement.rs): color setter now uses macro
Changed the function in #L44-47 to a macro usage
2015-11-10 09:31:38 +07:00
bors-servo
0d21158eb3 Auto merge of #8378 - Ms2ger:rwdata, r=eefriedman
Reduce LayoutTaskData to the fields used for RPC.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8378)
<!-- Reviewable:end -->
2015-11-10 07:47:45 +05:30
Rizky Luthfianto
df02ed4050 refactor(devtools/lib.rs): Remove unused import
Removed `RecvError` imports from #L57
2015-11-10 09:07:25 +07:00
Matt Brubeck
603fb5e1c2 Remove unused method from Range 2015-11-09 17:47:08 -08:00
Corey Farwell
71aa2392f8 Remove HTMLTableElement::width struct field 2015-11-09 20:35:29 -05:00
Corey Farwell
73314ab10c Add Dimension member to AttrValue
Fixes #8417
2015-11-09 20:32:56 -05:00
bors-servo
b386008623 Auto merge of #8431 - eefriedman:table-bgcolor, r=frewsxcv
Move storage of bgcolor for `<tr>` and `<tbody>`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8431)
<!-- Reviewable:end -->
2015-11-10 06:58:16 +05:30
Raphael Nestler
98d70aec3c Use while let{} instead of loop{match{}} in run_server() 2015-11-09 23:32:00 +01:00
Raphael Nestler
004ed44755 Use while let{} instead of loop{match{}} in TimerScheduler::run_event_loop() 2015-11-09 23:31:59 +01:00
Eli Friedman
4b68fc18c3 Move storage of bgcolor for <tr> and <tbody>. 2015-11-09 12:27:16 -08:00
bors-servo
f39faaf994 Auto merge of #8227 - asajeffrey:versioned_dom, r=eefriedman
Versioned dom

This PR adds versioning to the DOM. There are now node.get_version and node.get_descendent_version methods that return a counter that is bumped when the node is dirtied. This is used to implement cache invalidation for caching HTMLCollection state. Caching HTMCollections gets a 1000x speedup in the Dromaeo DOM query tests.

Addresses https://github.com/servo/servo/issues/6901, https://github.com/servo/servo/issues/3381 and https://github.com/servo/servo/issues/1916.

Replaces PR https://github.com/servo/servo/pull/6927.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8227)
<!-- Reviewable:end -->
2015-11-10 01:11:23 +05:30
bors-servo
d8df028197 Auto merge of #8404 - eefriedman:misc-attributes, r=nox
Misc cleanup for DOM attributes

No functional change; just cleanups related to parsing attributes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8404)
<!-- Reviewable:end -->
2015-11-10 00:32:24 +05:30
Eli Friedman
af78173243 Move more unsafe layout calls onto LayoutJS. 2015-11-09 10:47:38 -08:00
Eli Friedman
5293afc122 Move unsafe layout calls onto LayoutJS. 2015-11-09 10:47:37 -08:00
bors-servo
eda59fdd69 Auto merge of #8405 - wenderen:8402-replace-load-whole-resource, r=Ms2ger
replace use of load_whole_resource in net/image_cache_task.rs with Fi…

…le::open

Fixes #8402.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8405)
<!-- Reviewable:end -->
2015-11-09 20:56:49 +05:30
rohan.prinja
51012d17c1 replace use of load_whole_resource in net/image_cache_task.rs with File::open
don't ignore read_to_end's return value
2015-11-10 00:09:17 +09:00
bors-servo
f74754f582 Auto merge of #8175 - benschulz:set-timeout-panic, r=jdm
Fixed panic in ActiveTimers.set_timeout_or_interval.

`ActiveTimers.set_timeout_or_interval` asserts that the pipeline is not currently frozen. Apparently that is too strict. When pending network requests complete after a pipeline is frozen, scripts may be executed and a timer scheduled.

With these changes scheduling a timer while the pipeline is frozen behaves as if the timer was scheduled at the time the pipeline was frozen.

To reproduce the panic
 1. `./mach run -r http://google.com`,
 2. immediately click on any link and
 3. wait for the panic.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8175)
<!-- Reviewable:end -->
2015-11-09 20:18:38 +05:30
Ms2ger
1919e19633 Move viewport_size from LayoutTaskData to LayoutTask. 2015-11-09 09:04:05 +01:00
Ms2ger
dd920a06f3 Move epoch from LayoutTaskData to LayoutTask. 2015-11-09 09:04:04 +01:00
Ms2ger
4c3038f378 Pass the constellation_chan to animation::update_animation_state directly. 2015-11-09 09:04:03 +01:00
Ms2ger
c469d09543 Move running_animations from LayoutTaskData to LayoutTask. 2015-11-09 09:04:02 +01:00
Ms2ger
ee2b77e8f5 Move visible_rects from LayoutTaskData to LayoutTask. 2015-11-09 09:04:02 +01:00
Ms2ger
e8f31f2ed7 Move root_flow from LayoutTaskData to LayoutTask. 2015-11-09 09:04:01 +01:00
Ms2ger
53da53ef53 Move outstanding_web_fonts from LayoutTaskData to LayoutTask. 2015-11-09 09:04:00 +01:00
Ms2ger
5e4039d328 Move new_animations_receiver from LayoutTaskData to LayoutTask. 2015-11-09 09:03:59 +01:00
Ms2ger
604d1e8400 Move new_animations_sender from LayoutTaskData to LayoutTask. 2015-11-09 09:03:58 +01:00
Ms2ger
bdfa5fe804 Move generation from LayoutTaskData to LayoutTask. 2015-11-09 09:03:57 +01:00