Commit graph

12161 commits

Author SHA1 Message Date
Ms2ger
09dc9c44f3 Remove the unused XMLHttpRequestEventTarget::eventtarget method. 2015-08-18 21:01:10 +02:00
bors-servo
ef98e57429 Auto merge of #7230 - nox:required-dictionary-member, r=Ms2ger
Support required dictionary members (fixes #7216)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7230)
<!-- Reviewable:end -->
2015-08-18 12:58:09 -06:00
Ms2ger
860b5a1aa3 Add missing tests to basic.list (fixes #7077). 2015-08-18 16:48:53 +02:00
bors-servo
50e1c967e4 Auto merge of #7224 - Manishearth:clippy, r=Ms2ger
Integrate clippy into Servo; cleanup some of script

The integration is off by default for now. You can try it out with `./mach build --features "script/plugins/clippy"`.

We're using a branch of clippy with some of the lints changed to Allow, either because they don't apply to us, or because they're noisy and dwarf other warnings (but still should be fixed)

After going through the rest of Servo's warnings I'll figure out which lints we should be keeping.

There's a cargo bug with optional deps that makes it hard for this to work with Cargo.lock -- so this PR contains no changes to lockfiles (and running the build with clippy on may dirty the lockfile, though it gets fixed later)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7224)
<!-- Reviewable:end -->
2015-08-18 08:15:51 -06:00
Manish Goregaokar
19241c95f7 Cleanup NodeIterator, Range, ServoHTMLParser, TextEncoder, URLHelper, URL, VirtualMethods 2015-08-18 19:37:42 +05:30
bors-servo
014608f60c Auto merge of #7178 - frewsxcv:flow-api-mut, r=nox
flow::Flow should follow *_mut naming conventions

Fixes #7148

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7178)
<!-- Reviewable:end -->
2015-08-18 07:31:57 -06:00
Corey Farwell
6aaada64dc flow::Flow should follow *_mut naming conventions
Fixes #7148
2015-08-18 09:12:01 -04:00
Manish Goregaokar
a53b86f107 Cleanup WebGLRenderingContext, Websocker, WorkerGlobalScope 2015-08-18 18:38:36 +05:30
Manish Goregaokar
5c4f91c0f1 Cleanup Window, XHR 2015-08-18 18:38:32 +05:30
Manish Goregaokar
ac1b7a3896 Cleanup textinput, timers 2015-08-18 18:37:12 +05:30
Manish Goregaokar
53e155e8ac Cleanup treewalker 2015-08-18 18:37:10 +05:30
Manish Goregaokar
b21df4844c Cleanup node.rs 2015-08-18 18:37:02 +05:30
Manish Goregaokar
94cd004c28 Cleanup script_task 2015-08-18 18:35:47 +05:30
Manish Goregaokar
f749881eea Eta-reduce some functions in devtools 2015-08-18 18:35:45 +05:30
Manish Goregaokar
adfe9d249e Integrate clippy into Servo 2015-08-18 18:35:44 +05:30
bors-servo
ff6a70fad3 Auto merge of #7241 - Wafflespeanut:event_handler, r=Ms2ger
Matching over event listeners and handlers; r=Ms2ger

... for #7065

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7241)
<!-- Reviewable:end -->
2015-08-18 06:49:26 -06:00
Ravi Shankar
f3db59972a Matching over event listeners and handlers; r=Ms2ger
fixup! Matching over event listeners and handlers; r=Ms2ger
2015-08-18 18:11:57 +05:30
bors-servo
3d0951cf25 Auto merge of #7243 - nox:border-collapse-panic, r=pcwalton
Avoid a panic when handling collapsing borders (fixes #7144)

There is no need to compute next_collapsed_borders_in_block_direction for all kind of flows when it's used only in the table row case. That also avoids a panic when the next child is a table colgroup (this should not happen when iterating over a table row).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7243)
<!-- Reviewable:end -->
2015-08-18 05:15:12 -06:00
Anthony Ramine
d885958621 Avoid a panic when handling collapsing borders (fixes #7144)
There is no need to compute next_collapsed_borders_in_block_direction for all
kind of flows when it's used only in the table row case. That also avoids a panic
when the next child is a table colgroup (this should not happen when iterating
over a table row).
2015-08-18 12:56:18 +02:00
bors-servo
5b3d3514c1 Auto merge of #7263 - servo:update-js, r=nox
Update js.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7263)
<!-- Reviewable:end -->
2015-08-18 04:40:54 -06:00
Ms2ger
a9671550ff Update js. 2015-08-18 12:21:03 +02:00
bors-servo
0d6d6a0500 Auto merge of #7257 - jxs:master, r=Ms2ger
Replace uses of `for foo in bar.iter()`,

and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7257)
<!-- Reviewable:end -->
2015-08-18 02:46:46 -06:00
bors-servo
f340900c38 Auto merge of #7246 - glennw:platform-ua, r=larsbergstrom
Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA).



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7246)
<!-- Reviewable:end -->
2015-08-17 22:44:38 -06:00
Glenn Watson
6d9fccbae7 Add a simple method to emulate a platform UA (e.g. pretend a desktop build is an android UA). 2015-08-18 14:42:28 +10:00
Patrick Walton
6567c269cf script: Update rust-selectors to get :active support.
I couldn't find the place in the spec where the precise behavior of
`:active` is described, so I don't set it. However, all the machinery to
keep track of its status is in place.

Improves YouTube.
2015-08-17 17:52:21 -07:00
João Oliveira
067a22a868 Replace uses of for foo in bar.iter(),
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
2015-08-18 01:46:11 +01:00
Patrick Walton
69e5bd2e3d layout: Use the value of the max-width property when speculating what
the inline sizes of block formatting contexts are likely to be.

Usually, Web developers set this property on block formatting contexts
in order to avoid running into floats, and we can use this as a
speculation hint.

Fixes the width of the search box on the Google SERPs.
2015-08-17 17:01:20 -07:00
bors-servo
f4b526cfb4 Auto merge of #7222 - pcwalton:dashed-border-radius, r=glennw
gfx: Paint dashed borders with nonzero radii the same way Gecko does.

It's not ideal, but it was easy to implement and will do for now.

Closes #7157.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7222)
<!-- Reviewable:end -->
2015-08-17 16:53:58 -06:00
bors-servo
d654841288 Auto merge of #7177 - pcwalton:intervening-inline-block, r=mbrubeck
layout: Improve our handling of inline absolute containing blocks.

Several issues are addressed in this commit:

* Inline flows now bubble up their absolute descendants instead of
  making the inline flow the containing block for them. (In the future,
  we will need to make the inline flow *sometimes* be the containing
  block for them, but for now it improves sites to unconditionally
  bubble up.)

* Fragments now look at their inline fragment context to determine
  whether they are positioned.

* Inline flows now push the stacking-relative position of the absolute
  containing block down to their inline-block fragments.

* Inline absolute hypothetical fragments can be containing blocks.

* Fixes the logic in
  `containing_block_range_for_flow_surrounding_fragment_at_index`. The
  condition to determine whether fragments are positioned was inverted!

* `Descendants`/`AbsDescendants` has been refactored in order to become
  more friendly to inline absolute containing blocks in the future.

Improves the inline position of the green drop-down arrow in the Google
SERPs. (The block position is still wrong.)

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7177)
<!-- Reviewable:end -->
2015-08-17 13:56:53 -06:00
Patrick Walton
a30379975a layout: Improve our handling of inline absolute containing blocks.
Several issues are addressed in this commit:

* Inline flows now bubble up their absolute descendants instead of
  making the inline flow the containing block for them. (In the future,
  we will need to make the inline flow *sometimes* be the containing
  block for them, but for now it improves sites to unconditionally
  bubble up.)

* Fragments now look at their inline fragment context to determine
  whether they are positioned.

* Inline flows now push the stacking-relative position of the absolute
  containing block down to their inline-block fragments.

* Inline absolute hypothetical fragments can be containing blocks.

* Fixes the logic in
  `containing_block_range_for_flow_surrounding_fragment_at_index`. The
  condition to determine whether fragments are positioned was inverted!

* `Descendants`/`AbsDescendants` has been refactored in order to become
  more friendly to inline absolute containing blocks in the future.

Improves the inline position of the green drop-down arrow in the Google
SERPs. (The block position is still wrong.)
2015-08-17 12:43:12 -07:00
bors-servo
72fa45155b Auto merge of #7252 - nnethercote:fix-reporter-panics, r=Ms2ger
Fix panics in the script_task memory reporter.

These are caused by page_root being empty.

@jdm, I think it was #6874 that introduced these. I'm seeing them all the time when starting Servo on Reddit with memory profiling enabled. With this patch applied they go away.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7252)
<!-- Reviewable:end -->
2015-08-17 08:56:29 -06:00
Nicholas Nethercote
97e3b24aa6 Fix panics in the script_task memory reporter.
These are caused by page_root being empty.
2015-08-17 04:37:43 -07:00
bors-servo
d90907cb5f Auto merge of #7245 - jxs:master, r=Ms2ger
replace len() !=0 with !is_empty()



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7245)
<!-- Reviewable:end -->
2015-08-17 02:33:28 -06:00
bors-servo
71ae18bae4 Auto merge of #7219 - vectorijk:issue#7042, r=Ms2ger
remove unused static collection type in htmlcollection.rs

ref #7042 
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7219)
<!-- Reviewable:end -->
2015-08-17 02:03:23 -06:00
bors-servo
95c6301cf4 Auto merge of #7249 - servo:gold, r=paulrouget
Only use a rustc wrapper script when ld.gold is available.

Fixes #7247.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7249)
<!-- Reviewable:end -->
2015-08-17 01:26:26 -06:00
Simon Sapin
1dab9294f4 Only use a rustc wrapper script when ld.gold is available.
Fixes #7247.
2015-08-17 09:20:07 +02:00
João Oliveira
1e20447746 replace len() !=0 with !is_empty() 2015-08-17 02:56:07 +01:00
bors-servo
3bb930661d Auto merge of #7244 - wartman4404:master, r=nox
Remove the DOMRefCell wrapper around Window::compositor.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7244)
<!-- Reviewable:end -->
2015-08-16 16:52:01 -06:00
wartman4404
8d665008f8 Remove the DOMRefCell wrapper around Window::compositor. 2015-08-16 17:28:21 -05:00
vectorijk
59d704b53f turn enum into struct
pub enum CollectionTypeId -> pub struct Collection
2015-08-16 12:01:51 -07:00
vectorijk
d853aaba65 remove unused static collection 2015-08-16 11:38:22 -07:00
bors-servo
e74825f9fd Auto merge of #7203 - jdm:style, r=Ms2ger
Add automated style nit checks to test-tidy

Expands on the work by @wilmoz and cleans up the existing errors. Closes #7180. Closes #7111.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7203)
<!-- Reviewable:end -->
2015-08-16 08:37:40 -06:00
Josh Matthews
f6b3bebf84 Deal with /* /* when checking syntax. 2015-08-16 10:31:49 -04:00
Josh Matthews
a147cbe0c1 Tighten up checks for spaces around colons to deal with trait inheritance syntax. 2015-08-16 10:31:36 -04:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
Josh Matthews
7f935f010b Deal with multiline comments and reduce false positives for common syntax overlaps. Improve error messages. 2015-08-16 10:25:51 -04:00
Josh Matthews
4e593280ff Deal with multiline strings and tighten up syntax nit error messages. 2015-08-16 10:25:51 -04:00
wilmoz
e57a3888a5 Check for simple Rust style nits in tidy.py 2015-08-16 10:25:50 -04:00
bors-servo
4d7dd66ec9 Auto merge of #7240 - Ms2ger:slice_extras, r=nox
Stop using [T]::tail.

It has been removed upstream (rust-lang/rust#27684).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7240)
<!-- Reviewable:end -->
2015-08-16 07:13:57 -06:00
Ms2ger
a3bc438a9d Stop using [T]::tail.
It has been removed upstream (rust-lang/rust#27684).
2015-08-16 14:50:37 +02:00