Commit graph

12161 commits

Author SHA1 Message Date
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
Bogdan Cuza
f039827dcd Fix #6664 and add color to tidy output 2015-07-28 13:28:33 +02:00
Ms2ger
9dcf8090b9 Enable css-style-attr tests. 2015-07-28 13:09:15 +02:00
Glenn Watson
ddef25030b Accumulate and invert stacking context transform for hit tests.
This makes hit tests work on stacking contexts with transforms.

Ref #6643.
2015-07-28 14:38:09 +10: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
Glenn Watson
c27388cb81 Change transforms to use LengthOrPercentage.
This simplifies an upcoming PR to support serializing transform values for css style declarations.

Related to issue #6643.
2015-07-28 09:42:05 +10:00
bors-servo
1eeb05d914 Auto merge of #6774 - notriddle:master, r=jdm
Check if naturalWidth / naturalHeight works w/ DPR

    $ ./mach run --device-pixel-ratio=1 tests/html/get-natural-height.html
    ALERT: width: 600, height: 254
    $ ./mach run --device-pixel-ratio=2 tests/html/get-natural-height.html
    ALERT: width: 600, height: 254
    $ ./mach run --device-pixel-ratio=.5 tests/html/get-natural-height.html
    ALERT: width: 600, height: 254

It doesn't. Answers #6769.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6774)
<!-- Reviewable:end -->
2015-07-27 17:13:02 -06:00
James Graham
1b7627264f Update CSS tests expected data to revision 2baa72daab8bf37e3e910a9fd311a1eaa5b0f4a8 2015-07-27 21:58:43 +01:00
Ms2ger
cf793a8813 Inline ThreadSafeLayoutNode::get_style. 2015-07-27 19:57:38 +02:00
Ms2ger
3984e39011 Replace the StyledNode trait with inherent methods. 2015-07-27 19:57:33 +02:00
Michael Howell
1339b8ce65 Add basic unit test for preload_hsts_domains.
Closes #6789.
2015-07-27 10:24:38 -07: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
James Graham
df03062d62 Update CSS tests to revision 2baa72daab8bf37e3e910a9fd311a1eaa5b0f4a8 2015-07-27 17:47:31 +01:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
bors-servo
5cf662fb97 Auto merge of #6786 - Ms2ger:wpt_20150727, r=jdm
Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6786)
<!-- Reviewable:end -->
2015-07-27 09:24:56 -06:00
Ms2ger
5b2ca4d132 Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68 2015-07-27 16:31:27 +02:00
bors-servo
662c00a810 Auto merge of #6788 - Ms2ger:has_style, r=SimonSapin
Remove unused StyledNode::has_style method.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6788)
<!-- Reviewable:end -->
2015-07-27 08:07:23 -06:00
Ms2ger
760f5c70c5 Remove unused StyledNode::has_style method. 2015-07-27 15:57:26 +02: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
bors-servo
e13ebf712d Auto merge of #6597 - pcwalton:image-cache-ipc, r=jdm
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.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6597)
<!-- Reviewable:end -->
2015-07-27 00:08:15 -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
9e5f31ce00 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
2015-07-26 22:12:20 +07: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
Corey Farwell
d1acefa452 Prevent warning about redefining Python variable
'e' is also used later on in a list comprehension, and flake8 warns when
variables get redefined within a function
2015-07-26 22:07:23 +07:00
Corey Farwell
d71d2da81f Remove unused Python import 2015-07-26 22:07:22 +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
bors-servo
fd1bf1900d Auto merge of #6776 - notriddle:filereader-matches, r=jdm
Remove unnecessarily verbose matches.

Fixes #6766.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6776)
<!-- Reviewable:end -->
2015-07-26 00:18:10 -06:00
Michael Howell
20f78b4fcb Remove unnecessarily verbose matches.
Fixes #6766.
2015-07-25 23:00:40 -07:00
Michael Howell
337832fde4 Check if naturalWidth / naturalHeight works w/ DPR
$ ./mach run --device-pixel-ratio=1 tests/html/get-natural-height.html
    ALERT: width: 600, height: 254
    $ ./mach run --device-pixel-ratio=2 tests/html/get-natural-height.html
    ALERT: width: 600, height: 254
    $ ./mach run --device-pixel-ratio=.5 tests/html/get-natural-height.html
    ALERT: width: 600, height: 254

It doesn't. Answers #6769.
2015-07-25 15:41:38 -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
bors-servo
8edf1a5ecd Auto merge of #6749 - akiss77:bump-deps, r=jdm
Bump up dependencies past the point where both aarch64 fixes and x11 v2.0.0 bump-ups are landed

Affected dependencies are:
* azure,
* clipboard,
* glutin,
* js,
* layers,
* offscreen_gl_context,
* skia, and
* x11 (of course).

ipc-channel has already been bumped up in a previous commit.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6749)
<!-- Reviewable:end -->
2015-07-25 10:17:55 -06:00
bors-servo
c7f73ebc29 Auto merge of #6738 - mbrubeck:bootstrap, r=larsbergstrom
Perform argument validation before bootstrapping.

If there's an error in the command-line arguments for `mach build`, we should print it before starting a (potentially) long bootstrap process, not after.

r? @larsbergstrom or @frewsxcv

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6738)
<!-- Reviewable:end -->
2015-07-25 09:32:30 -06:00
Matt Brubeck
4c3a6b839b Perform argument validation before bootstrapping.
If there's an error in the command-line arguments for `mach build`, we should
print it before starting a (potentially) long bootstrap process, not after.
2015-07-25 07:53:53 -07:00
bors-servo
ee07e7110d Auto merge of #6742 - chotchki:accept_int32, r=jdm
Added support for int32 to webdriver.

Fix for issue #6729

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6742)
<!-- Reviewable:end -->
2015-07-25 07:50:26 -06:00