Commit graph

559 commits

Author SHA1 Message Date
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
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
Patrick Walton
c95dbf7776 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.
2016-03-31 11:26:08 -07:00
Anthony Ramine
48b5d1d6be Update webrender with crates.io's offscreen_gl_context (fixes #10296)
Crate webrender is bumped to the first commit in https://github.com/servo/webrender/pull/248.
Crate webrender_traits is bumped to the merge of https://github.com/servo/webrender_traits/pull/21.
2016-03-31 02:02:02 +02:00
Alan Jeffrey
f9f15876cd Miscellaneous fixes to harden the constellation. 2016-03-30 18:01:28 -05:00
Alan Jeffrey
6dab59f8ce Added comment explaining why the constellation still panics in the case of recv failure. 2016-03-30 16:10:09 -05:00
Alan Jeffrey
620ba84fdc Replace any uses of .send(...).unwrap() by .send(...).unwrap_or_else(...). 2016-03-29 10:31:35 -05:00
bors-servo
aac2da75f4 Auto merge of #8641 - notriddle:no_headless, r=glennw
No more headless compositor. Just the normal one.

Fixes #8573

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8641)
<!-- Reviewable:end -->
2016-03-29 12:42:01 +05:30
faineance
418842faf9 use self.0 instead of destructing single item tuple structs 2016-03-27 11:50:08 +01:00
Alan Jeffrey
32c72f0925 Added ability to randomly kill pipelines to the constellation. 2016-03-26 09:11:28 -05:00
Michael Howell
c9cb4839e4 No more headless compositor. Just the normal one.
This changes headless operation to strictly be a runtime option, rather
than a compile-time one. Note that the old headless version still relied
on a display server to support WebGL, while it now requires one all the
time.

Fixes #8573
2016-03-24 11:18:54 -07:00
bors-servo
f1baba973f Auto merge of #10112 - ConnorGBrewster:jump-tag-fix, r=glennw
Fixed jump tag issue

Fixes the issue where once a jump tag is clicked, the viewport rects are not updated. #9671

<!-- 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/10112)
<!-- Reviewable:end -->
2016-03-24 06:28:58 +05:30
bors-servo
767b11cd67 Auto merge of #10106 - Ms2ger:renderer-id, r=ecoal95
Remove renderer ids.

<!-- 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/10106)
<!-- Reviewable:end -->
2016-03-22 08:50:28 +05:30
Connor Brewster
20a8946c6b Fixed jump tag issue 2016-03-21 20:44:56 -06:00
Ms2ger
22447055b9 Stop returning in-process senders from {CanvasPaintThread, WebGLPaintThread}::start. 2016-03-21 18:26:46 +01:00
Ms2ger
fb1b0d1a09 Remove Constellation::{canvas_paint_threads, webgl_paint_threads}. 2016-03-21 17:58:27 +01:00
Ms2ger
63a00f4dbf Stop sending the renderer id to script. 2016-03-21 17:55:08 +01:00
Paul Rouget
6577409b95 Add history information to mozbrowserlocationchange event 2016-03-21 19:19:48 +08:00
Anthony Ramine
46c505e47b Bump serde to 0.7 2016-03-17 13:52:39 +01:00
Anthony Ramine
f7af675861 Update log to 0.3.5 2016-03-16 23:36:04 -07:00
Patrick Walton
c2581d5cef compositing: In borderless mode, don't show the window until the page
has loaded.

This avoids a flash of unstyled content, which looks especially bad in
browser.html since unstyled content is white and browser.html has a
transparent background.

Closes #9996.
2016-03-15 22:07:21 -07:00
Patrick Walton
8eb2cda438 Implement support for overscrolling on the Mac.
Requires tomaka/glutin#734, servo/webrender_traits#14, and
servo/webrender#217.
2016-03-14 11:38:10 -07:00
Anthony Ramine
79c68f54e3 Bump gleam to 0.2.8 2016-03-09 20:17:08 +01:00
Anthony Ramine
b66d190166 Bump url to 0.5.7 2016-03-09 20:15:16 +01:00
Anthony Ramine
f89c321141 Bump euclid to 0.6.4 2016-03-09 20:15:11 +01:00
Anthony Ramine
7771f28a22 Bump core-text to 1.1 2016-03-09 20:14:37 +01:00
Anthony Ramine
5720c76816 Bump app_units to 0.2.3 2016-03-09 20:14:35 +01:00
bors-servo
aba500a698 Auto merge of #9858 - glennw:anim-smoothness, r=pcwalton
Fix animation smoothness when using requestAnimationFrame.

Previously, the flow for ticking animations was:

Compositor -> Constellation -> Layout -> Script

However, this means that the compositor <-> layout messages can thrash, meaning layout thread is very rarely idle.

This means that the script thread (which joins on the layout thread during reflow) was unable to execute and run rAF callbacks.

With this change, the flow is now:

Compositor -> Constellation -> Script (when rAF is active).
Compositor -> Constellation -> Layout (when transitions / animations are active and no rAF is present).

This makes rAF based animation *much* smoother.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9858)
<!-- Reviewable:end -->
2016-03-04 05:50:50 +05:30
Glenn Watson
92061132f3 Fix animation smoothness when using requestAnimationFrame.
Previously, the flow for ticking animations was:

Compositor -> Constellation -> Layout -> Script

However, this means that the compositor <-> layout messages can thrash, meaning layout thread is very rarely idle.

This means that the script thread (which joins on the layout thread during reflow) was unable to execute and run rAF callbacks.

With this change, the flow is now:

Compositor -> Constellation -> Script (when rAF is active).
Compositor -> Constellation -> Layout (when transitions / animations are active and no rAF is present).

This makes rAF based animation *much* smoother.
2016-03-04 07:26:00 +10:00
Corey Farwell
75353e19a7 Indicate components should not be published to crates.io.
http://doc.crates.io/manifest.html#the-publish--field-optional
2016-03-03 15:04:44 -05:00
Ulf Nilsson
8c07a1a3af Use piston_image instead of stb_image for decoding JPEGs
Bump image to 0.7
2016-03-02 09:13:49 +01:00
Glenn Watson
78b284cefe With WebRender, only send resize events when window size is valid.
Fixes WR 116.
2016-03-01 09:29:16 +10:00
Corey Farwell
f5697b1c39 Cleanup Vec initialization from Option. 2016-02-27 22:31:39 -05:00
Corey Farwell
0112c359f5 Utilize Constellation::pipeline utility. 2016-02-27 22:03:01 -05:00
Corey Farwell
b13b8035ae Utilize Constellation::frame utility. 2016-02-27 21:56:17 -05:00
Patrick Walton
9b4cc41695 compositing: Stop compositing unnecessarily after each animation frame.
Instead, schedule a delayed composite after each frame of an animation.

The previous code would cause jank, because the following sequence
frequently occurred:

1. The page uses `requestAnimationFrame()` to request a frame.

2. The compositor receives the message, schedules a composite,
dispatches the rAF message to the script thread, composites, and goes to
sleep waiting for vblank (frame 1).

3. The script makes a change and sends it through the pipeline.
Eventually it gets painted and is sent to the compositor, but the
compositor is sleeping.

4. The compositor wakes up, sees the new painted content, page flips,
and goes to sleep (frame 2). Repeat from step 1.

The problem is that we have two composition frames, not just one. This
halves Web apps' framerate!

This commit fixes the problem by scheduling the composite in step 2 to
12 ms in the future. We already have this delayed-composition
functionality in the form of the scrolling timer, which I repurposed and
renamed to the "delayed composition timer" for this task. This change
gives the page 12 ms to prepare the frame, which seems to usually be
enough, especially with WebRender.

Note that simply removing the scheduled composite after rAF is not the
correct solution. If this is done, then pages that call rAF and don't
modify the page won't receive future rAFs, since the compositor will be
sleeping and won't be notified of vblank.

Fixes a bunch of jank in browser.html. The remaining jank seems to be a
problem with browser.html itself.
2016-02-24 14:06:46 -08:00
Corey Farwell
83b22fd97f Update webrender crate refs to reflect ownership change.
Also updated the 'webrender' ref to point to the latest commit.
2016-02-23 19:49:50 -05:00
Paul Rouget
7ddb160f9c do not send mouseevent twice 2016-02-20 05:03:10 +01:00
Glenn Watson
c0531c312f Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
2016-02-18 10:35:29 +10:00
Anthony Ramine
290694b27e Move util::cursor to style_traits 2016-02-16 00:50:01 +01:00
Anthony Ramine
680c817d53 Bump url to 0.5.5 2016-02-13 00:08:12 +01:00
Anthony Ramine
874fa5595f Bump euclid to 0.6.2 2016-02-13 00:08:08 +01:00
Anthony Ramine
2d6ac4da97 Bump app_units to 0.2.1 2016-02-13 00:08:05 +01:00