Commit graph

2514 commits

Author SHA1 Message Date
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
7fa7936657 Implement attribute restyle hints.
Fixes #6942.
2015-11-10 11:57:24 -08: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
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
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
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
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
Eli Friedman
ef52da7acd Move storage of color attribute on <font>. 2015-11-08 17:29:50 -08:00
Eli Friedman
0901e5bc97 Move storage of bgcolor attribute on <body>. 2015-11-08 17:29:49 -08:00
Corey Farwell
ee0800abe9 Implement <hr> 'color' attribute 2015-11-08 18:34:27 -05:00
Roman Klauke
4f35941b9d rename WebSocket::Send_Impl
Previos: `Send_Impl`, now: `send_impl`.

Closes: #8345
2015-11-08 14:45:59 +01:00
bors-servo
fc98b8e126 Auto merge of #8403 - frewsxcv:node-from-nodes-and-strings, r=nox
Minor 'node_from_nodes_and_strings' cleanup

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8403)
<!-- Reviewable:end -->
2015-11-08 17:33:46 +05:30
bors-servo
92f9e58310 Auto merge of #8286 - eefriedman:no-move, r=nox
Remove unnecessary uses of #[no_move]

The patch makes RootCollection a bit safer by making the StackRootTLS hold
it in place.

RootedVec was doing an extremely delicate dance and just hoping nobody
messed it up; switch to a Box to be safe.

CodeGenRust seemed to be using no_move for no particularly good reason.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8286)
<!-- Reviewable:end -->
2015-11-08 12:51:00 +05:30
Corey Farwell
9443b89af7 Minor 'node_from_nodes_and_strings' cleanup
This prevents an 'IntoIter' from getting unnecessarily allocated
2015-11-08 01:03:56 -05:00
Corey Farwell
fe4a5890d1 Add spec link for 'converting nodes into a node' 2015-11-08 00:49:33 -05:00
Eli Friedman
1a50fce67c Clean up some code related to #[no_move].
The patch makes RootCollection a bit safer by making the StackRootTLS hold
it in place.

The use of no_move in CodeGenRust was leftover from when roots couldn't
be moved.
2015-11-07 21:17:24 -08:00
Sylvester Willis
4adf502846 Added call to event.PreventDefault on html text inputs and textareas.
This change should prevent page scrolling when up/down buttons are pressed.
2015-11-07 20:51:16 -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
7ace7bc090 Auto merge of #8249 - servo:htmlinputelement-type-atom, r=nox
'type' attribute on HTMLInputElement should be stored as an Atom

Fixes #8180

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8249)
<!-- Reviewable:end -->
2015-11-07 19:07:51 +05:30
bors-servo
440d5b5d9b Auto merge of #8389 - frewsxcv:ElementContentEditable, r=Ms2ger
Add ElementContentEditable WebIDL interface

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8389)
<!-- Reviewable:end -->
2015-11-07 15:43:30 +05:30
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
Corey Farwell
880a0f9478 Add ElementContentEditable WebIDL interface 2015-11-06 23:07:57 -05:00
Corey Farwell
606d4cf443 'type' attribute on HTMLInputElement should be stored as an Atom
Fixes #8180
2015-11-06 21:07:01 -05:00
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
Alan Jeffrey
4aa6a76f57 Made QualName traceable by JS. 2015-11-06 17:23:15 -06:00
Simon Sapin
886459de6b Fix serialization of shorthands pending var() substitution. 2015-11-06 23:01:11 +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
bors-servo
69e6eb4d91 Auto merge of #8304 - dzbarsky:borrowck, r=Ms2ger
Cleanup some unneeded let bindings

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8304)
<!-- Reviewable:end -->
2015-11-07 01:31:40 +05:30
Michael Howell
71c5d1764a Prepend, rather than append, SVG title elements.
Fixes #8164
2015-11-06 09:34:42 -07:00
Josh Matthews
989e80036e Implement cancellable runnables.
Additionally, make image load events cancellable. Resolves #7731.
2015-11-06 10:41:38 -05:00
David Zbarsky
dfc90db1d7 Cleanup some unneeded let bindings 2015-11-06 00:22:31 -08:00
Jitendra Jain
ed809a60bf Implement the overrideMimeType method for XMLHttpRequest 2015-11-05 22:19:24 -05:00
bors-servo
4067960ba5 Auto merge of #8326 - jdm:iframehover, r=glennw
Send mouse move events to the the previous layer when directing event…

…s to a new one for the first time. Resolves #7865.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8326)
<!-- Reviewable:end -->
2015-11-06 06:24:59 +05:30
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
0a158967e0 Cleanup WebSocket::Send_Impl. 2015-11-05 12:23:18 +01:00
Abhishek Kumar
b7de946205 Check in for task 1,4 and 5
Adding pipelineID to httpresponse message, clearner code for task1

Commit for Refactored task

Unit tests

Removing extra whitespaces.

Removing extra whitespaces.

Removing tabs whitespaces

Making Code tidier.

Style issues Fix

Test-tidy Fixes
2015-11-05 00:17:24 -05:00