Commit graph

3197 commits

Author SHA1 Message Date
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
Ravi Shankar
c4cf72db6e Added support for synchronization along with an unit test for cancellation listener 2015-11-12 14:04:38 +05:30
Ravi Shankar
10f5584f78 Implement cancellation listener for cancelling network requests 2015-11-12 14:02:59 +05:30
bors-servo
efc31e619d Auto merge of #8376 - mrobinson:fix-inlines, r=pcwalton
Properly make stacking contexts for inlines

Instead of making a stacking context out of inline fragments parent
flow, make the inline fragment itself the stacking context. This fixes
positioning and rendering of these sort of fragments and prevents
over-layerization.

Fixes #7424.
Fixes #5812.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8376)
<!-- Reviewable:end -->
2015-11-12 12:26:39 +05:30
Martin Robinson
d572f1ca05 Properly make stacking contexts for inlines
Instead of making a stacking context out of inline fragments parent
flow, make the inline fragment itself the stacking context. This fixes
positioning and rendering of these sort of fragments and prevents
over-layerization.

Fixes #7424.
Fixes #5812.
2015-11-11 14:42:18 -08:00
Emilio Cobos Álvarez
75ecb67e62 webgl: Add test for getSupportedExtensions 2015-11-11 17:18:28 +01: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
bors-servo
aa105d89b4 Auto merge of #8463 - simartin:issue_8413, r=Ms2ger
Issue #8413: Enable webgl tests in web-platform-test.

Fixes #8413.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8463)
<!-- Reviewable:end -->
2015-11-11 17:04:06 +05:30
Simon Martin
e5329307b2 Issue #8413: Enable webgl tests in web-platform-test. 2015-11-11 09:02:05 +01:00
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
Bobby Holley
5d859568cf Update test expectations. 2015-11-10 11:57:27 -08:00
Bobby Holley
a79f6e43a0 Tests. 2015-11-10 11:57:26 -08:00
bors-servo
8e80e38c78 Auto merge of #8456 - mrobinson:wpt-fixes, r=jgraham
Fix some issues with the WPT UI output

When running in non-interactive mode, print test names as they are run.
This prevent timeouts on the bots, which are detected by watching for
output from the test runner.

When running in iTerm.app don't use the multi-line status line, as the
carriage return is not processed properly. Instead use a single-line
output with the last test run and then backspace characters to keep it
up to date.

Fixes #8368.
Fixes #8395.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8456)
<!-- Reviewable:end -->
2015-11-10 22:32:03 +05:30
Martin Robinson
75f8963d63 Fix some issues with the WPT UI output
When running in non-interactive mode, print test names as they are run.
This prevent timeouts on the bots, which are detected by watching for
output from the test runner.

When running in iTerm.app don't use the multi-line status line, as the
carriage return is not processed properly. Instead use a single-line
output with the last test run and then backspace characters to keep it
up to date.

Fixes #8368.
Fixes #8395.
2015-11-10 08:24:50 -08:00
bors-servo
fb00e6143f Auto merge of #8452 - Ms2ger:test-ref, r=frewsxcv
Use wptrunner for some old-style reftests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8452)
<!-- Reviewable:end -->
2015-11-10 19:27:18 +05:30
Ms2ger
866eb0551e Move jpeg_normal.html and jpeg_progressive.html to wpt reftests. 2015-11-10 14:03:33 +01:00
Ms2ger
eb882403fb Move inset_blackborder.html and outset_blackborder.html to wpt reftests. 2015-11-10 12:35:01 +01:00
Ms2ger
17cdd1769d Move input_height_a.html to wpt reftests. 2015-11-10 12:25:47 +01:00
Ms2ger
17376dd96b Move inline_whitespace_a.html and inline_whitespace_b.html to wpt reftests. 2015-11-10 12:15:38 +01:00
Ms2ger
3ed4e62057 Move inline_block_parent_width.html and inline_block_parent_width_percentage.html to wpt reftests. 2015-11-10 11:36:54 +01:00
Ms2ger
cfbe639e79 Move inline_block_margin_auto_a.html to wpt reftests. 2015-11-10 11:23:39 +01:00
Ms2ger
7d376bfe81 Move inline_background_a.html to wpt reftests. 2015-11-10 11:16:10 +01:00
Corey Farwell
575b3c3d4b Implement 'width' IDL attribute on <table> 2015-11-09 23:31:25 -05: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
Corey Farwell
ee0800abe9 Implement <hr> 'color' attribute 2015-11-08 18:34:27 -05:00
bors-servo
7ff3a17524 Auto merge of #8039 - tschneidereit:script-owns-stylesheets, r=jdm
Move Stylesheet loading and ownership from the layout task into HTML elements

Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).

Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.

This all has various nice consequences:
 - Stylesheet loading becomes a non-blocking operation.
 - Stylesheets are removed when the element they're associated with is removed from the document.
 - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
 - Various subtle correctness issues are fixed.

One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.

Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8039)
<!-- Reviewable:end -->
2015-11-08 01:11:54 +05:30
Till Schneidereit
543703e3d8 Move Stylesheet loading and ownership from the layout task into HTML elements
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).

Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.

This all has various nice consequences:
 - Stylesheet loading becomes a non-blocking operation.
 - Stylesheets are removed when the element they're associated with is removed from the document.
 - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
 - Various subtle correctness issues are fixed.

One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
2015-11-07 18:11:29 +01:00
bors-servo
3c794d0076 Auto merge of #8296 - notriddle:svg_title_prepend, r=nox
Prepend, rather than append, SVG title elements.

Fixes #8164

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8296)
<!-- Reviewable:end -->
2015-11-07 14:13:42 +05:30
bors-servo
65c3185b20 Auto merge of #8341 - bholley:state_hint_selector_ordering, r=pcwalton
Fix restyle hints to handle non-last psuedo-selectors, and track pristine state values rather than changesets

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8341)
<!-- Reviewable:end -->
2015-11-07 09:53:19 +05:30
bors-servo
8c0f0a22d2 Auto merge of #8370 - Ms2ger:update-js, r=jdm
Update js.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8370)
<!-- Reviewable:end -->
2015-11-07 08:11:19 +05:30
bors-servo
faf2f34772 Auto merge of #8343 - servo:custom-properties, r=mbrubeck
Fix some custom properties bugs

Fix #7767.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8343)
<!-- Reviewable:end -->
2015-11-07 06:02:36 +05:30
Alan Jeffrey
237ddc3c0c Caching HTMCollections.
We cache the state of any live HTMLCollection, keeping track of

a) the optional cached length of the collection, and
b) an optional cursor into the collection (a node in the collection plus its index).

The cache is invalidated based on the version number of the node.

We use these caches for speeding up random access to the collection.
When returning coll[i], we search from the cursor, if it exists,
and otherwise search from the front of the collection.
In particular, both a forward for-loop and a backward for-loop
through the collection will now have each access take O(1)
time rather than O(n) time.

This gets 1000x speed-up on the relevant Dromaeo DOM query tests.
2015-11-06 17:23:17 -06:00
Alan Jeffrey
64a50bcf56 Added versioning to DOM nodes.
There is now an inclusive_descendants_version field of each node, which
increases each time the node, or any of its descendants, is dirtied.
This can be used for cache invalidation, by caching a version number
and comparting the current version number against the cached version number.
2015-11-06 17:23:16 -06:00
bors-servo
33bbed7dc1 Auto merge of #8359 - ben0x539:js-url-query-fragment, r=eefriedman
Append query string + fragment to javascript: url.

When loading a URL whose scheme is javascript, we should do what
https://html.spec.whatwg.org/multipage/browsers.html#javascript-protocol
says and append the URL's query and fragment components to the scheme
data, as well as percent- and utf-8-decode the whole thing, before
evaluating it as javascript.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8359)
<!-- Reviewable:end -->
2015-11-07 04:03:35 +05:30
Simon Sapin
3973085cb6 Fix double /**//**/ 2015-11-06 23:01:55 +01:00
Simon Sapin
40e6cc118e Detect var() in shorthand declarations. 2015-11-06 23:01:54 +01:00
bors-servo
c54558d5ef Auto merge of #8315 - asajeffrey:remove_child_dirty_parent, r=pcwalton
Dirty parent when removng a child node.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8315)
<!-- Reviewable:end -->
2015-11-07 02:04:28 +05:30
Ms2ger
2a509e4fa2 Update js. 2015-11-06 18:38:07 +01:00
Benjamin Herr
066867eb86 wpt for javascript urls with queries and fragments
Expected to FAIL right now because contentDocument in iframes with
src="javascript:..." wrongly returns null. Passes in Firefox though!
2015-11-06 18:15:28 +01:00
Michael Howell
71c5d1764a Prepend, rather than append, SVG title elements.
Fixes #8164
2015-11-06 09:34:42 -07:00
Jitendra Jain
ed809a60bf Implement the overrideMimeType method for XMLHttpRequest 2015-11-05 22:19:24 -05:00
bors-servo
45f07ec320 Auto merge of #8216 - akumar21NCSU:master, r=jdm
M1502: Improve HTTP monitoring devtool support

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8216)
<!-- Reviewable:end -->
2015-11-05 23:01:48 +05:30
Ms2ger
e4034597a2 Move img_simple.html to wpt reftests. 2015-11-05 16:49:02 +01:00
Ms2ger
31476b77b6 Move img_block_maxwidth_a.html and img_block_maxwidth_b.html to wpt reftests. 2015-11-05 16:34:37 +01:00
Ms2ger
41a9502688 Move image_rendering_auto_a.html and image_rendering_pixelated_a.html to wpt reftests. 2015-11-05 16:17:27 +01:00
Ms2ger
0cf602f7d8 Move font_size.html to wpt reftests. 2015-11-05 16:01:23 +01:00
Ms2ger
5b35ee09d3 Move floated_negative_margins_a.html to wpt reftests. 2015-11-05 15:52:11 +01:00
Ms2ger
c8f0613113 Move flex_row_direction.html to wpt reftests. 2015-11-05 15:30:10 +01:00
Ms2ger
9623ed54d0 Move flex_column_direction.html to wpt reftests. 2015-11-05 13:35:01 +01:00