Commit graph

1855 commits

Author SHA1 Message Date
David Zbarsky
f44691c91d Implement Range#extractContents 2015-07-28 12:52:29 -04:00
ecoal95
bc908458ff webgl: Make context creation fallible. Fixes #6806 2015-07-28 17:34:23 +02:00
Ms2ger
741aae709b Simplify AutoWorkerReset::new. 2015-07-28 16:55:44 +02:00
Ms2ger
efa12e6963 Remove unrooted_must_root annotation from unions (fixes #2661).
The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the
now unused annotation.
2015-07-28 16:22:41 +02:00
Bogdan Cuza
233a769c67 Add spec links 2015-07-28 13:28:41 +02:00
bors-servo
e0bd80f807 Auto merge of #6662 - tschneidereit:client-geometry, r=glennw,pcwatson
Implement Element.client{Top,Left,Width,Height}

This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal.

Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6662)
<!-- Reviewable:end -->
2015-07-27 20:45:05 -06:00
bors-servo
2672f2bbe4 Auto merge of #6782 - notriddle:empty-vec, r=jdm
Use empty Vec instead of None.

Closes #6764

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6782)
<!-- Reviewable:end -->
2015-07-27 19:45:09 -06:00
bors-servo
4bc1db3fe8 Auto merge of #6745 - pcwalton:devtools-ipc, r=jdm
devtools: Convert the developer tools to run over IPC.

This was a large, invasive change.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6745)
<!-- Reviewable:end -->
2015-07-27 11:09:38 -06:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
bors-servo
5b90cfd57d Auto merge of #6773 - dzbarsky:which, r=Ms2ger
Fix MouseEvent.which to not throw



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6773)
<!-- Reviewable:end -->
2015-07-27 05:57:09 -06:00
bors-servo
7c8922c0c3 Auto merge of #6777 - frewsxcv:refactor-tidy, r=jdm
Cleanup lint special cases, refactor flake8 linting 

Currently, there are a few linting functions that only run on certain
filetypes (determined by the file extension). Prior to this commit, the
special cases were handled in a parent function with a conditional. This
commit changes the system so each linting function gets passed a
filename so the function can determine whether it should run or not
based on the file extension.

I also refactored flake8 linting slightly. From what I've read so far of
the code, flake8 itself will only print the results directly to stdout
(though the linter would report the quantity of errors detected).
Prior to this commit, we would let flake8 print directly to stdout and
just determine if there were >0 errors reported. This commit (sort of
hackily) temporarily captures stdout when we call flake8 so we can do
what we want with the output, allowing us to `yield` the line number
and message like we do with the other linting functions.

In my opinion, both of these changes isolate specific behaviors/checks
into their respective linting functions instead of having them handled
at a more global level.

In addition to the changes above:

* The whitespace linter now runs on WebIDL and TOML files
* The license header linter now runs on WebIDL files

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6777)
<!-- Reviewable:end -->
2015-07-27 04:39:04 -06:00
bors-servo
78455ec033 Auto merge of #6771 - Ms2ger:unused-attr, r=jdm
Remove unused allow(unrooted_must_root) attribute.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6771)
<!-- Reviewable:end -->
2015-07-27 02:23:53 -06:00
Patrick Walton
82b53d83ff script: Make the ImageCacheTask use IPC.
This necessitated getting rid of the boxed trait object that was being
be passed between the script task and the image cache task.
2015-07-26 23:07:44 -07:00
bors-servo
380de1ba82 Auto merge of #6781 - Ms2ger:handle_resize_inactive_msg, r=saneyuki
Remove unused method Window::handle_resize_inactive_msg.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6781)
<!-- Reviewable:end -->
2015-07-26 20:55:40 -06:00
bors-servo
362de03902 Auto merge of #6746 - pcwalton:storage-task-ipc, r=jdm
net: Convert the storage task to use IPC.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6746)
<!-- Reviewable:end -->
2015-07-26 18:07:32 -06:00
Patrick Walton
43cb7d5abd net: Convert the storage task to use IPC. 2015-07-26 17:07:17 -07:00
Michael Howell
572616605a Use empty Vec instead of None. 2015-07-26 13:58:29 -07:00
Ms2ger
f57ed72d95 Remove unused method Window::handle_resize_inactive_msg. 2015-07-26 17:30:45 +02:00
Corey Farwell
ee224bc3e5 Add/format license headers for WebIDLs 2015-07-26 22:12:18 +07:00
Corey Farwell
9415c92a5c Clean up whitespace, long lines for WebIDLs 2015-07-26 22:12:10 +07:00
bors-servo
5a66b59f9b Auto merge of #6760 - dzbarsky:comment-fix, r=jdm
Remove outdated comment about cloning elements

The comment points to the "implement element prefix" issue, but we clone the element's prefix when we construct the element right above.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6760)
<!-- Reviewable:end -->
2015-07-26 08:01:56 -06:00
Michael Howell
20f78b4fcb Remove unnecessarily verbose matches.
Fixes #6766.
2015-07-25 23:00:40 -07:00
David Zbarsky
632b7f3c58 Fix MouseEvent.which to not throw 2015-07-25 16:16:30 -04:00
bors-servo
3af6992151 Auto merge of #6761 - Wafflespeanut:filereader, r=jdm
Combining FileReaderEvent and Process into an enum; r=jdm

This one's for #6752. The build was successful for this change. I'll commit the next one for `perform_annotated_read_operation` in a moment...

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6761)
<!-- Reviewable:end -->
2015-07-25 13:58:34 -06:00
Ms2ger
09f0d8fac9 Remove unused allow(unrooted_must_root) attribute. 2015-07-25 21:29:55 +02:00
Ravi Shankar
af87687659 Combining FileReaderEvent and Process; r=jdm 2015-07-26 00:41:07 +05:30
David Zbarsky
3801cfdd35 Remove outdated comment about cloning elements 2015-07-25 13:40:29 -04:00
bors-servo
705c95dedb Auto merge of #6660 - nox:children-changed, r=jdm
Introduce VirtualMethods::children_changed()

This virtual method mimics the behaviour of mutation observers and make it more viable than the older child_inserted(), which didn't cover removed nodes and was called as many times as there were inserted nodes.

A few other shortcomings where remove_child() was called directly instead of Node::remove() were also fixed while at it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6660)
<!-- Reviewable:end -->
2015-07-25 11:39:20 -06:00
Anthony Ramine
7b40cc9fd7 Introduce VirtualMethods::children_changed()
This virtual method mimics the behaviour of mutation observers and make it more
viable than the older child_inserted(), which didn't cover removed nodes and
was called as many times as there were inserted nodes.

A few other shortcomings where remove_child() was called directly instead of
Node::remove() were also fixed while at it.
2015-07-25 19:09:40 +02:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
Patrick Walton
f10c076180 profile: Make the time and memory profilers run over IPC.
Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new
threads.
2015-07-24 17:02:17 -07:00
Simon Sapin
a3c0366bd6 Fix deprecation warnings 2015-07-24 22:16:35 +02:00
Akos Kiss
fa86ea4f6f Add aarch64-unknown-linux-gnu support
* Adding dependencies
* Replacing `i8` with `libc::c_char` to build properly on platforms
  where char is unsigned.
2015-07-23 22:52:17 +00:00
farodin91
27e760e28d Implement FileReader.{readAsText,readAsDataUrl}. Fixes #6172 2015-07-23 22:33:51 +02:00
Anthony Ramine
389a9ff643 Introduce RootedVec<JS<T>>::r() 2015-07-23 20:56:27 +02:00
bors-servo
f44d75e5b2 Auto merge of #6715 - Ms2ger:layoutelement, r=jdm
Implement more methods on LayoutJS.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6715)
<!-- Reviewable:end -->
2015-07-23 12:40:52 -06:00
Ms2ger
487eef88e3 Move the state getters to LayoutElementHelpers. 2015-07-23 20:30:59 +02:00
Ms2ger
849eb7837a Move the flag getters to LayoutNodeHelpers. 2015-07-23 20:13:06 +02:00
Ms2ger
32ee62b4c8 Remove unused RawLayoutNodeHelpers::type_id_for_layout. 2015-07-23 19:54:12 +02:00
bors-servo
658c3d05ae Auto merge of #6683 - tschneidereit:dompoint, r=Ms2ger
Implement DOMPoint and DOMPointReadOnly



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6683)
<!-- Reviewable:end -->
2015-07-23 11:38:14 -06:00
Till Schneidereit
b692187ca2 Implement DOMPoint and DOMPointReadOnly
Passes some but not all WPT tests. One failure is caused by an issue in codegen for the `DOMPointInit` dictionary, the others by outdated tests: Gecko implements an old version of the spec that overloaded the `DOMPoint` constructor to optionally take an object as the first argument, and made `DOMPointReadOnly` non-constructible.
2015-07-23 19:09:36 +02:00
Simon Sapin
055a1c5cee Update rust-selectors
Update for https://github.com/servo/rust-selectors/pull/37
2015-07-23 18:53:57 +02:00
Ms2ger
6329dec31f Move the WebSocket constructor logic out of WebSocket::new. 2015-07-23 09:00:34 +02:00
bors-servo
ff86e0094c Auto merge of #6691 - glennw:mouse-which, r=jdm
Implement mouseevent.which (needed for enyojs sampler).



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6691)
<!-- Reviewable:end -->
2015-07-22 21:53:00 -06:00
bors-servo
37a1e22515 Auto merge of #6698 - Ms2ger:layoutelement, r=jdm
Implement some methods on LayoutJS<Element>.

Part of my long-term plan to stop exposing `unsafe_get()` outside the script crate.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6698)
<!-- Reviewable:end -->
2015-07-22 21:10:04 -06:00
Glenn Watson
d2600e66fb Address review comments 2015-07-23 09:13:09 +10:00
bors-servo
5dba6d5b01 Auto merge of #6667 - notriddle:master, r=Ms2ger
Optimize `Node.normalize()`.

Do not copy the discarded node's text data, borrow it.

Closes #6658.

p.s. What's the `let text_node = text_node.clone();` for? I removed it because it doesn't seem to be necessary, but I'd like to be sure.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6667)
<!-- Reviewable:end -->
2015-07-22 15:13:43 -06:00
bors-servo
6fd31867ba Auto merge of #6635 - Ms2ger:ws-task, r=jdm
Spawn a thread for WebSocket messages.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6635)
<!-- Reviewable:end -->
2015-07-22 14:26:21 -06:00
bors-servo
11a3423c29 Auto merge of #6693 - notriddle:tidy-webidl, r=jdm
Tidy finds WebIDLs with no spec.

Closes #6689

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6693)
<!-- Reviewable:end -->
2015-07-22 13:44:12 -06:00
Ms2ger
32ddd356b8 Spawn a thread for WebSocket messages. 2015-07-22 20:29:32 +02:00