Commit graph

2857 commits

Author SHA1 Message Date
Eli Friedman
4b68fc18c3 Move storage of bgcolor for <tr> and <tbody>. 2015-11-09 12:27:16 -08:00
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
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
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
9a465c5842 Auto merge of #8355 - Ms2ger:Exit, r=nox
Cleanup exit messages and related code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8355)
<!-- Reviewable:end -->
2015-11-07 22:34:45 +05:30
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
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
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
Benjamin Herr
4120283e10 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/#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.
2015-11-06 18:15:27 +01:00
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
85a762a31a Remove the unused PipelineExitType field from ConstellationControlMsg::ExitPipeline. 2015-11-05 16:32:44 +01:00
Ms2ger
ef20972023 Remove the unused PipelineExitType arguments from ScriptTask::handle_exit_pipeline_msg and shut_down_layout. 2015-11-05 16:32:40 +01:00
Ms2ger
ad33d920e7 Remove the unused PipelineExitType field from layout_interface::Msg::ExitNow. 2015-11-05 16:17:51 +01:00
Ms2ger
0a158967e0 Cleanup WebSocket::Send_Impl. 2015-11-05 12:23:18 +01:00
Ms2ger
1c12ec05e0 Silence unused code warnings. 2015-11-05 09:58:56 +01:00
Simon Sapin
69d398f29a Update to rust-cssparser 0.4.0 2015-11-05 08:57:01 +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
bors-servo
021f441d24 Auto merge of #8218 - nikkisquared:master, r=eefriedman
I'm working on resolving https://github.com/servo/servo/issues/8213 as per the spec online and feedback in the servo channel. Note that currently I cannot build (and thus test) my code, so this is a bit of a rough first draft. I'd still like feedback on my progress, and I hope that there is another way for my code to be tested.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8218)
<!-- Reviewable:end -->
2015-11-05 10:24:27 +05:30
Nikki
1d280289f1 Fixes #8213: Implement Blob variant of WebSocket.send() 2015-11-04 21:42:10 -07:00
bors-servo
0d15101323 Auto merge of #8336 - eefriedman:tablecell-attributes, r=frewsxcv
Remove HTMLTableCellElement fields with parsed attribute values

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8336)
<!-- Reviewable:end -->
2015-11-05 09:48:55 +05:30
bors-servo
65a1a28860 Auto merge of #8278 - Ronak6892:master, r=eefriedman
M1503: Integrate XML5 parser

Hi,

This is for NCSU fall 15 project for Mozilla.

We have included changes for initial steps in this pull request.
https://github.com/servo/servo/wiki/Integrate-xml5ever

Kindly review !

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8278)
<!-- Reviewable:end -->
2015-11-05 09:12:44 +05:30
Bobby Holley
7dba4447f1 Store pristine element state rather than a set of changes.
This is the strategy we'll need to take for attributes, and so this change
puts us in a position to handle attributes and state the same way.

This does mean that we stop taking care to track the situations where our
state has reverted to the original state, with no net change. I think that's
probably of negligible value though.
2015-11-04 19:09:58 -08:00
Eli Friedman
1940c3d7d6 Remove HTMLTableCellElement fields with parsed attribute values. 2015-11-04 17:09:26 -08:00
bors-servo
1dc144d168 Auto merge of #8332 - Ms2ger:8209-comment, r=frewsxcv
Remove obsolete comment (fixes #8209).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8332)
<!-- Reviewable:end -->
2015-11-05 06:25:54 +05:30