Commit graph

440 commits

Author SHA1 Message Date
bors-servo
bc62b5aadb Auto merge of #8785 - mbrubeck:fixed-hit-test, r=pcwalton
Add slow path for hit testing of iframe behind positioned content layer

Fixes browser.html blocker #8759. r? @pcwalton

This adds a slow path for cases where the compositor's layer-based hit testing is incorrect.  If the script task discovers that a mouse event should have been dispatched to an iframe, it bounces the event back to the constellation to be forwarded to the correct pipeline.

This isn't terribly slow (on the slow path, it adds one extra round-trip message between script and constellation), but if we want to optimize this better we could instead replace the compositor's layer hit testing with display list hit testing in the paint task.  This would be a more complicated change that I think we should save for a follow-up.

This only fixes mouse input for now.  A basically-identical change will be needed for touch-screen input, whether we stick with this approach or switch to the paint task.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8785)
<!-- Reviewable:end -->
2015-12-04 02:54:22 +05:30
Matt Brubeck
9551363bfb If a mouse event is targeting an iframe, forward it to the iframe's inner window
Fixes #8759.

This adds a slow path for cases where the compositor's layer-based hit testing
is incorrect.  To optimize for this case, we could instead replace the
layer hit testing with display-list hit testing done in the paint task.
2015-12-03 08:19:41 -08:00
Matt Brubeck
8c4fed42b0 Minor refactoring of mouse event types
* Move some types into the `msg` crate so they can be shared more.
* Use MouseEventType instead of duplicating it in other enums.
2015-12-03 08:19:40 -08:00
bors-servo
8b95d7b8d8 Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.

This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.

Fix https://github.com/servo/skia/issues/70

This builds, but the at the moment causes a number of tidy errors for duplicated crates.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
Josh Matthews
c23cbd4163 Dispatch load events for cross origin iframes. Resolves #6672. 2015-11-30 17:37:16 -05:00
James Sanders
3659218c59 Use thread::sleep instead of deprecated sleep_ms
Similarly, change one instance of `thread::park_timeout_ms`.

Fixes #8694
2015-11-29 13:41:04 -07:00
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
bors-servo
fa7e1d07ff Auto merge of #8688 - Ms2ger:compositing, r=pcwalton
Some compositing cleanup.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8688)
<!-- Reviewable:end -->
2015-11-28 07:26:14 +05:30
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
bors-servo
3614ed74d9 Auto merge of #8679 - jdm:rmprintln, r=larsbergstrom
Fix #8502 by not printing the message which is known to be repeated m…

…illions of times.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8679)
<!-- Reviewable:end -->
2015-11-27 03:26:35 +05:30
Ms2ger
9d73b869db Consume self in PrivilegedPipelineContent methods.
This leads to a little bit of copy/paste, but the resulting code should be
quite a bit more efficient.
2015-11-26 10:23:11 +01:00
Ms2ger
8dadd1a420 Take PrivilegedPipelineContent::script_to_compositor_port out of its Option. 2015-11-26 10:17:18 +01:00
Ms2ger
6eff8d6c32 Remove unused PrivilegedPipelineContent::constellation_chan. 2015-11-26 09:51:55 +01:00
bors-servo
5e7306bf19 Auto merge of #8598 - g-k:split-scriptmsg, r=KiChjang
Split paint task messages from ScriptMsg

Refs: https://github.com/servo/servo/issues/8592

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8598)
<!-- Reviewable:end -->
2015-11-26 03:02:47 +05:30
Greg Guthe
7668fd0503 Split paint task messages from ScriptMsg
Refs: https://github.com/servo/servo/issues/8592
2015-11-25 14:35:52 -05:00
Josh Matthews
a211c65f66 Fix #8502 by not printing the message which is known to be repeated millions of times. 2015-11-25 11:14:13 -05:00
Matt Brubeck
a61989e82b Fix clip rect for iframes in hit testing code
Fixes #8080
2015-11-25 05:28:47 +01:00
Patrick Walton
2843000810 Update ipc-channel to pick up the improved error reporting.
Intended to help diagnose intermittent failures.
2015-11-23 16:38:39 -08:00
bors-servo
e3eee5a41b Auto merge of #8597 - r0e:testing, r=Manishearth
Fix for #8593 'loop..match' should be 'while let'

As per #8593.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8597)
<!-- Reviewable:end -->
2015-11-23 08:18:20 +05:30
Corey Farwell
f34da4120d Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136

https://github.com/servo/rust-url/pull/137
2015-11-21 08:15:56 -05:00
Ms2ger
b40c629aac Remove unused import. 2015-11-20 08:55:41 +01:00
r0e
99acd46c48 Fix for #8593 'loop..match' should be 'while let'
changed line 641 of constellation.rs to while let

added while let at line 1201 in constellation.rs

added while let to line 1199 in block.rs
2015-11-19 21:48:45 -08:00
Patrick Walton
1c130819ca compositing: Split Servo up into multiple sandboxed processes.
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
Keith Yeung
19294db6e5 Split ConstellationMsg into ScriptMsg and CompositorMsg 2015-11-16 23:10:53 -08:00
James Graham
09b9293b09 Implement support for WebDriver send keys command.
Supports sending keys to an element. The specification here is still
rather unfinished so the error handling and so on in this code will
need iteration as it becomes clearer what the expected behaviour is.
2015-11-16 22:48:26 +00:00
Toothbrush
3cfd65f5e1 Changed to create immutable Vec 2015-11-16 17:33:39 +00:00
Toothbrush
081b1e93a1 Fixes #8546
Fixes issue #8546
2015-11-16 17:09:34 +00:00
bors-servo
231bf425f2 Auto merge of #8478 - KiChjang:constellation-two-receivers, r=Ms2ger
Split chan and receiver_port into script and compositor flavors

Partial #8356. Currently this doesn't build because of a lint denying me to user unsafe code, which unfortunately the select! macro falls under. Not sure what to do there.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8478)
<!-- Reviewable:end -->
2015-11-13 14:35:08 +05:30
Keith Yeung
d04615f44b Split chan and receiver_port into script and compositor flavors 2015-11-13 01:01:57 -08:00
Patrick Walton
1dc0d61c3c script: Make timer events e10s-safe.
Closes #8235.
2015-11-12 14:30:25 -05:00
Raphael Nestler
004ed44755 Use while let{} instead of loop{match{}} in TimerScheduler::run_event_loop() 2015-11-09 23:31:59 +01:00
bors-servo
97791dd317 Auto merge of #8383 - mbrubeck:touch-refactor, r=glennw
Simplify multi-touch state machine code

This is a minor refactoring of the touch tracking in compositor, to simplify the code and prepare for more gesture handling (like pinch to zoom). r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8383)
<!-- Reviewable:end -->
2015-11-09 04:51:21 +05:30
bors-servo
1979d0a2e6 Auto merge of #8393 - rnestler:fix_8384, r=frewsxcv
Use while let{} instead of loop{match{}}

This fixes #8384

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8393)
<!-- Reviewable:end -->
2015-11-08 01:46:21 +05:30
bors-servo
9a465c5842 Auto merge of #8355 - Ms2ger:Exit, r=nox
Cleanup exit messages and related code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8355)
<!-- Reviewable:end -->
2015-11-07 22:34:45 +05:30
Raphael Nestler
39aa3cfc2a Use while let{} instead of loop{match{}} in ScrollingTimer::run() 2015-11-07 16:21:33 +01:00
Raphael Nestler
3985e33b43 Use while let{} instead of loop{match{}} 2015-11-07 16:08:43 +01:00
bors-servo
de2d14c971 Auto merge of #8388 - ucarion:ucarion-8386, r=frewsxcv
Use Result::ok in CompositorReceiver

Fixes #8386

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8388)
<!-- Reviewable:end -->
2015-11-07 11:07:21 +05:30
bors-servo
3510cec3e5 Auto merge of #8385 - frewsxcv:compositing-iterators, r=Manishearth
Use more iterators in compositing component

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8385)
<!-- Reviewable:end -->
2015-11-07 10:33:32 +05:30
Ulysse Carion
d366384184 Use Result::ok in CompositorReceiver 2015-11-06 20:02:14 -08:00
Corey Farwell
649e50f15c Use more iterators in compositing component 2015-11-06 18:35:33 -05:00
Matt Brubeck
37bfe20986 Move first_touch_point into the TouchState machine 2015-11-06 14:33:24 -08:00
Matt Brubeck
2171683244 Move last_touch_point into the TouchState machine 2015-11-06 14:33:23 -08:00
bors-servo
4067960ba5 Auto merge of #8326 - jdm:iframehover, r=glennw
Send mouse move events to the the previous layer when directing event…

…s to a new one for the first time. Resolves #7865.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8326)
<!-- Reviewable:end -->
2015-11-06 06:24:59 +05:30
Ms2ger
7d3f7220f7 Remove the unused PipelineExitType field from LayoutControlMsg::ExitNow. 2015-11-05 16:32:47 +01:00
Ms2ger
f37b8e9f4d Remove the unused PipelineExitType field from ChromeToPaintMsg::Exit. 2015-11-05 16:32:46 +01:00
Ms2ger
ffffc5f065 Remove the unused PipelineExitType argument from Pipeline::exit. 2015-11-05 16:32:45 +01:00
Ms2ger
85a762a31a Remove the unused PipelineExitType field from ConstellationControlMsg::ExitPipeline. 2015-11-05 16:32:44 +01:00
Ms2ger
eb44bdb33a Remove the unused IpcSender from ChromeToPaintMsg::Exit. 2015-11-05 15:48:17 +01:00