Commit graph

600 commits

Author SHA1 Message Date
bors-servo
959dbac0e7 Auto merge of #10862 - asajeffrey:only-the-chrome-survives, r=SimonSapin
Don't kill the root pipeline when randomly killing pipelines.

Useful for stress-testing the browser chrome, e.g. testing #10334.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10862)
<!-- Reviewable:end -->
2016-04-26 18:40:21 -07:00
bors-servo
2729864af7 Auto merge of #10857 - servo:toml, r=nox
Simplify TOML syntax

* Sections like `[dependencies.foo]` can be entries in a `[dependencies]` section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)` conditions instead of exact target triples: https://github.com/rust-lang/cargo/pull/2328

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10857)
<!-- Reviewable:end -->
2016-04-26 15:46:37 -07:00
Simon Sapin
83b3ebf6ac Simplify TOML syntax
* Sections like `[dependencies.foo]` can be entries in a `[dependencies]`
  section with the `{key = value}` syntax.
* Per-target dependencies can be expressed with more general `cfg(…)`
  conditions instead of exact target triples:
  https://github.com/rust-lang/cargo/pull/2328
2016-04-26 23:51:36 +02:00
Alan Jeffrey
2a52351de0 Don't kill the root pipeline when randomly killing pipelines. 2016-04-26 14:32:11 -05:00
Alan Jeffrey
9153333f62 Communicate a backtrace to the constellation when panicking. 2016-04-26 11:31:36 -05:00
Fabrice Desré
aac7101593 Don't expect a native_window when using webrender 2016-04-25 18:16:42 -07:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Josh Matthews
97637d8949 Remove unused crates on macos. 2016-04-23 10:44:55 -04:00
Michael Howell
7940b22158 compositing/script: Do not dispatch the resize event when initially loading.
No bug report corresponds to this, but I noticed it while trying to
reduce #10593
2016-04-22 13:36:43 -07:00
bors-servo
89b276c889 Auto merge of #10750 - servo:num, r=nox
Use num's constituent crates.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10750)
<!-- Reviewable:end -->
2016-04-20 20:40:24 +05:30
Ms2ger
a8b5ac5e32 Use num-traits in compositing. 2016-04-20 15:30:17 +02:00
bors-servo
8d988f20c1 Auto merge of #9968 - izgzhen:scroll, r=asajeffrey
Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650

This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.

- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)

The setters will be implemented in another PR after this is merged.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9968)
<!-- Reviewable:end -->
2016-04-20 18:40:26 +05:30
Zhen Zhang
11b12f677b element scroll setters 2016-04-20 08:29:17 +08:00
Alan Jeffrey
cfb066ef20 Added a dedicated panic channel. 2016-04-19 09:08:44 -05:00
Zhen Zhang
fefdaf76de Implement ScrollTop and ScrollLeft getters:
Add new compositor message to get scroll_offset;
Add new layout query for computed value of overflow-x/y;
Implement layer_id method for ThreadSafeLayoutNode;
Add new layout query for layer_id;
Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
2016-04-19 12:27:35 +08:00
Alan Jeffrey
59824ccb92 Trigger mozbrowsererror event when a pipeline fails. 2016-04-18 16:03:48 -05:00
Peter
b0ad3ddf5b Updated euclid to version 0.6.5
And updated existing usages of Matrix4 to use Matrix4D<T>
2016-04-17 18:39:49 +01:00
bors-servo
6c5cfb738a Auto merge of #10345 - asajeffrey:make-nox-happy, r=nox
Replace side-effecting unwrap_or_else by if let in constellation.

This addresses @nox's comments in #10295.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10345)
<!-- Reviewable:end -->
2016-04-15 17:35:45 +05:30
Alan Jeffrey
0cca4a9d53 Replace side-effecting unwrap_or_else by if let in constellation.
This addresses nox's comments in #10295.
2016-04-14 10:58:22 -05:00
Josh Matthews
cacbf95de8 Replace instances of infallible unwrap with expect. 2016-04-14 11:30:30 -04:00
bors-servo
2b910678db Auto merge of #10587 - asajeffrey:add-failure-panic-message, r=Manishearth
Added panic message to failures.

Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a `mozbrowsererror` event. The remaining steps are also to record the backtrace, and to report the failure in the event.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10587)
<!-- Reviewable:end -->
2016-04-14 19:55:17 +05:30
Simon Sapin
6889f37d9e Remove the url! plugin.
In rust-url 1.0 the `Url` struct is going to have private fields, and there
is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit,
it was made mostly because it was possible and relatively easy at the time.
2016-04-14 15:35:28 +02:00
Alan Jeffrey
8c0fa01884 Added panic message to failures. 2016-04-13 16:09:48 -05:00
bors-servo
628c54948a Auto merge of #10489 - timvandermeij:constellation-debug-warn, r=jdm
Replace use of `debug!` by `warn!` in `constellation.rs`

Fixes #10483.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10489)
<!-- Reviewable:end -->
2016-04-14 00:50:05 +05:30
Tim van der Meij
29e564b1f7 Replace use of debug! by warn! in constellation.rs
Fixes #10483.
2016-04-13 20:31:59 +02:00
bors-servo
d566f1c143 Auto merge of #10565 - saurvs:master, r=Ms2ger
Update to byteorder 0.5

Finishes https://github.com/servo/servo/issues/10437.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10565)
<!-- Reviewable:end -->
2016-04-13 20:27:50 +05:30
Saurav Sachidanand
647d9874c2 Update to byteorder 0.5 2016-04-13 16:36:02 +05:30
Ms2ger
b032a7894a Remove a pointless Url clone. 2016-04-13 12:45:21 +02:00
bors-servo
aec297565b Auto merge of #10554 - asajeffrey:fast-fail-handle-script-loaded-url-in-iframe, r=Ms2ger
Fast fail_handle_script_loaded_url_in_iframe_msg

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10554)
<!-- Reviewable:end -->
2016-04-13 15:23:51 +05:30
Alan Jeffrey
6c5b2167f5 Fast-fail handle_script_loaded_url_in_iframe_msg (fixes #10416) 2016-04-12 16:43:28 -05:00
Ulf Nilsson
c8f206d0f3 Propagate RUST_BACKTRACE to content processes 2016-04-12 09:28:08 +02:00
Ulf Nilsson
d433fb01ed Share prefs to content processes
Without this `./mach run -b -- -M` would start fine but navigating to a site would fail with:

`thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'assertion failed: mozbrowser_enabled()', /Users/ulf/Documents/Code/servo/components/script/dom/htmliframeelement.rs:163`
2016-04-12 09:26:30 +02:00
bors-servo
a61fc5285f Auto merge of #10534 - asajeffrey:reenable-check-no-unwrap, r=Manishearth
Re-enabled etc/ci/check_no_unwrap

Got `etc/ci/check_no_unwrap.sh` to pass, and re-enabled it.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10534)
<!-- Reviewable:end -->
2016-04-12 09:57:34 +05:30
bors-servo
f0014bd9cd Auto merge of #10224 - emilio:shader-type-validations, r=jdm
webgl: Add attribute validations and other nits

Fixes https://github.com/servo/servo/issues/9958

Depends on a bunch of prs, and needs a test.

r? @jdm

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10224)
<!-- Reviewable:end -->
2016-04-12 05:18:49 +05:30
Alan Jeffrey
d01c312278 Re-enabled /etc/ci/check_no_unwrap. 2016-04-11 17:28:19 -05:00
Ulf Nilsson
b631202e66 Fix sandboxing on OS X
The main issue was resources_dir_path. Every time it was called it would start from the executable's path and walk up the hierarchy to find a directory named "resources". The sandbox was granted permission to read from the found resources dir, but after the sandbox had been activated resources_dir_path would again start from the executable's path and try to find the resources dir. It would then fail with "Operation not permitted" when trying to canonicalize the path because it didn't have permissions to read metadata under ./target.

To fix this the resources dir path is now cached between resources_dir_path calls.
2016-04-09 11:32:50 +02:00
bors-servo
bcac1a3c95 Auto merge of #10423 - asajeffrey:constellation-pipeline-hardening, r=emilio,jdm
Removed sources of panic from piepline.rs.

Fixes #10422.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10423)
<!-- Reviewable:end -->
2016-04-08 07:04:38 +05:30
Alan Jeffrey
01b6e4a2c1 Removed sources of panic from piepline.rs. 2016-04-07 19:44:36 -05:00
Alan Jeffrey
167b6caa36 Removed uses of unwrap in compositor. 2016-04-05 17:11:55 -05:00
bors-servo
0ff8adb097 Auto merge of #9811 - paulrouget:forceTouch, r=mbrubeck
forcetouch events

https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

Not sure how we want to land that yet. Maybe reproduce the webkit events (as in this PR), or as touch/mousemouse events.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9811)
<!-- Reviewable:end -->
2016-04-05 21:07:05 +05:30
bors-servo
d1e8b79583 Auto merge of #10399 - jdm:pb, r=jdm
Private browsing - Initial steps

Rebase of #10160.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10399)
<!-- Reviewable:end -->
2016-04-05 17:41:11 +05:30
Paul Rouget
df6e7394d4 forcetouch events support
This enables Apple forcetouch DOM events. It requires the preference dom.forcetouch.enabled.

The DOM events are described here:
- https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

The Cocoa mechanism is documented here:
- https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSEvent_Class/#//apple_ref/doc/uid/20000016-SW274
2016-04-05 18:42:28 +08:00
dhaval0603
af64a888e6 Private browsing - Initial steps 2016-04-04 15:22:38 -04:00
Emilio Cobos Álvarez
6fcc03c965 webgl: Make the api return the context limits and use them for validations
This allows keeping the VertexAttrib* calls asynchronous.

Another option would be to do the validation in the apply() function,
but that'd require us passing an unnecessary channel around and add
extra synchronization.

The counterpart of this is that it has to be updated when the context
changes, but that's less problem.
2016-04-03 01:21:56 +02:00
bors-servo
85f9f9626e Auto merge of #10343 - asajeffrey:document-constellation-recv-panic, r=jdm
Comment explaining constellation panic for recv

A retry of #10294, which was closed due to homu issues.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10343)
<!-- Reviewable:end -->
2016-04-02 23:08:45 +05:30
bors-servo
0bf0f61a56 Auto merge of #10321 - pcwalton:webrender-mouse-move, r=glennw
compositing: Send only one mouse move event if WebRender is in use.

In WebRender mode, we were sending two mouse move events: one with the
proper coordinates and one with the wrong coordinates, because of
incorrect fall-through. The script task would usually (but not always,
depending on timing) ignore the first event in favor of the second
event, resulting in incorrect mouse move event coordinates in most
cases.

Closes servo/webrender#238.
Closes #10298.

r? @metajack

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10321)
<!-- Reviewable:end -->
2016-04-02 01:56:39 +05:30
bors-servo
7f06b467a4 Auto merge of #10295 - asajeffrey:remove-constellation-misc-panic, r=nox
Miscellaneous fixes to harden the constellation.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10295)
<!-- Reviewable:end -->
2016-04-01 19:14:48 +05:30
bors-servo
7518c4de93 Auto merge of #10082 - asajeffrey:remove-constellation-panic, r=glennw
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see https://github.com/servo/servo/issues/10017#issuecomment-198160200).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10082)
<!-- Reviewable:end -->
2016-04-01 03:30:57 +05:30
Alan Jeffrey
df82a5b24f Removed panicking when frame or pipeline lookup fails. 2016-03-31 16:18:36 -05:00