Commit graph

526 commits

Author SHA1 Message Date
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
Simon Sapin
46bb3e5778 Make a debugging println!() conditional on is_running_problem_test
… like other print messages introduced in 19a1e57c90
2015-12-30 17:21:15 +00:00
Brandon Fairchild
637afecec9 Move LayerKind and ScrollPolicy enums to gfx_traits
This also moves LayerId and LayerProperties to gfx_traits.

Fixes #8836.
2015-12-20 20:43:31 -05:00
Matt Brubeck
40776b9492 Add queuing of pinch zoom events 2015-12-16 10:03:53 -08:00
Matt Brubeck
eb2a37d41c Refactor touch handling and add pinch zoom gesture 2015-12-16 10:03:49 -08:00
Tetsuharu OHZEKI
7267163f49 Fix warnings: use clone_from_slice instead of copy_memory 2015-12-11 10:20:24 -05:00
Beomjin Kim
729812f383 Moved CompositorMsg enum into compositing crate.
moved from components/msg/constellation_msg.rs
      to components/compositing/lib.rs

dependencies on compositing crate added in ports/cef/Cargo.lock
2015-12-11 13:42:14 +09: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
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
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
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
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
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
Raphael Nestler
3985e33b43 Use while let{} instead of loop{match{}} 2015-11-07 16:08:43 +01:00
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
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
bors-servo
c78da15abb Auto merge of #8314 - jdm:timeoutinvestigations, r=metajack
Investigations for #7787

I'm just going to keep throwing stuff at try, because running directly on the builders isn't yielding results.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8314)
<!-- Reviewable:end -->
2015-11-05 04:08:30 +05:30
Josh Matthews
19a1e57c90 Add debugging information when running tests that timeout on build machines. 2015-11-04 12:26:41 -05:00
Josh Matthews
9529196d2f Send mouse move events to the the previous layer when directing events to a new one for the first time. Resolves #7865. 2015-11-04 03:40:13 -05:00
Martin Robinson
261246ea25 Properly resize iframe root layers
When a layer containing an iframe changes, we also need to resize the
root layer of the subpage. This ensures that content from the child
layer tree is masked to the new size.

Fixes #8301.
2015-11-03 15:28:07 -08:00
Matt Brubeck
ef93650db9 Handle multi-touch events from glutin 2015-11-03 08:56:34 -08:00
Matt Brubeck
817eed22d1 Add a "-Z convert-mouse-to-touch" debug argument.
This is enabled by default on Android, because Glutin currently sends mouse
events instead of touch events on Android.  It's also useful for testing on
non-touch platforms.
2015-10-22 10:37:04 -07:00
Matt Brubeck
fe7460f34d Dispatch touch events and perform default touch actions.
This is currently limited to simple single-touch actions. It does not include
momentum scrolling or pinch zooming.
2015-10-22 10:37:03 -07:00
Adam Szopa
88991013ab Remove explicit lifetimes which can be elided. 2015-10-21 01:27:48 +02:00
Martin Robinson
ac5525aeeb Integrate iframes into the display list
Instead of always promoting iframes to StackingContexts, integrate them
into the display list. This prevents stacking bugs when
non-stacking-context elements should be drawn on top of iframes.

To accomplish this, we add another step to ordering layer creation,
where LayeredItems in the DisplayList are added to layers described by
the LayerInfo structures collected at the end of the DisplayList.
Unlayered items that follow these layered items are added to
synthesized layers.

Another result of this change is that iframe layers can be positioned
directly at the location of the iframe fragment, eliminating the need
for the SubpageLayerInfo struct entirely.

Iframes are the first type of content treated this way, but this change
opens up the possibility to properly order canvas and all other layered
content that does not create a stacking context.

Fixes #7566.
Fixes #7796.
2015-10-20 07:29:06 -07:00
bors-servo
8db8a86ab1 Auto merge of #7552 - meh:viewport, r=glennw
Add viewport configuration support to the compositor

This allows me to do stuff like this.

![this](58d593ae-541d-11e5-9f57-8d379f5c9ceb.png)

Those are two compositors rendered on the same OpenGL context, I need this so I can split windows and render them without getting mad with textures and framebuffers, it will also allow me to render the proper parts of the chrome as different web pages without involving dozens of framebuffers and textures.

If I recall correctly I did talk to @glennw about this on IRC some time ago.

This pull request requires https://github.com/servo/gleam/pull/39 to be merged first tho.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7552)
<!-- Reviewable:end -->
2015-10-14 10:29:45 -06:00
meh
123c19a57a Add viewport configuration support to the compositor 2015-10-14 17:38:29 +02:00
Matt Brubeck
e2e142aae8 Replace libpng with image everywhere. 2015-10-10 07:43:11 -07:00
Martin Robinson
dae22b6e80 Simplify and unify compositor shutdown code paths
Unify all compositor shutdown code paths into two methods, one which
starts the shutdown and the other that finishes it. This simplifies the
way the compositor shuts down and prevents "leaking" pixmaps when
exiting in uncommon ways.
2015-10-07 18:42:11 -07:00
bors-servo
1d617f332e Auto merge of #7899 - glennw:subpage-fixes-1, r=pcwalton
Remove constellation round trip for subpage mapping in compositor.

This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor.

(This is the first of several commits removing subpage from parts of servo).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7899)
<!-- Reviewable:end -->
2015-10-07 18:36:35 -06:00
James Graham
64b74f5057 Move code to exit servo after writing a screenshot out of composite_specific_target.
The structure of this function was confusing, so move some parts out into the
caller where they seem like a more natural fit and add documentation of the
functions
2015-10-07 09:24:00 +01:00
Glenn Watson
da881947e5 Remove constellation round trip for subpage mapping in compositor.
This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor.

(This is the first of several commits removing subpage from parts of servo).
2015-10-07 12:24:15 +10:00
Martin Robinson
8b5fe650c8 Improve layer tree debugging output
Add an option to dump the layer tree, which activates the previously
unused layer tree debugging code. Also improve the output using the
PrintTree struct.
2015-10-06 15:25:33 -07:00
Glenn Watson
339a3f869b Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
Patrick Walton
c72d0c2ed0 layout: Make the compositor rather than layout determine the position of
each iframe.

The old code that attempted to do this during layout wasn't able to work
for multiple reasons: it couldn't know where the iframe was going to be
on the page (because of nested iframes), and at the time it was building
the display list for a fragment it couldn't know where that fragment was
going to be in page coordinates.

This patch rewrites that code so that both the sizes and positions of
iframes are determined by the compositor. Layout layerizes all iframes
and marks the iframe layers with the appropriate pipeline and subpage
IDs so that the compositor can place them correctly. This approach is
similar in spirit to Gecko's `RefLayer` infrastructure. The logic that
determines when it is time to take the screenshot for reftests has been
significantly revamped to deal with this change in delegation of
responsibility.

Additionally, this code removes the infrastructure that sends layout
data back to the layout task to be destroyed, since it is now all
thread-safe and can be destroyed on the script task.

The failing tests now fail because of a pre-existing bug related to
intrinsic heights and borders on inline replaced elements. They happened
to pass before because we never rendered the iframes at all, which meant
they never had a chance to draw the red border the tests expect to not
render!

Closes #7377.
2015-09-29 09:47:28 -07:00
Jaydeep
2a99915188 Check for Extra pointer dereferencing. Issue #7640. 2015-09-26 19:33:29 -07:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Maciej Skrzypkowski
88815d21ba Add plugins for compositing and net crates #7699
Changed to_string calls to to_owned calls
where was a need.
2015-09-22 13:51:21 +02:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Matt Brubeck
8606a94722 Set default limits on page zoom and pinch zoom
Currently these both clamp to 100% in one direction and are unbounded in the
other direction.  This sets default zoom constraints of 10% to 800%.
2015-09-18 05:30:55 -07:00
Anthony Ramine
5cf8d597e6 Introduce InitialCompositorState 2015-09-15 23:14:48 +02:00
bors-servo
b05f4aa3aa Auto merge of #7559 - ddrmanxbxfr:RFC-0344-Work, r=nox
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values. 

I hope I didn't rename too much. 

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559)
<!-- Reviewable:end -->
2015-09-12 18:29:56 -06:00
Mathieu Rheaume
7320433cca Remove 'get_*' on getters as per RFC 0344 on various components 2015-09-12 20:14:01 -04:00
Bryan Bell
b7ea7de136 Improve err msg when failing to output png
Before on at least Linux the following failure is hard to root cause:

    [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html
    thread '<main>' panicked at 'assertion failed: res.is_ok()', .../compositor.rs:1508
    thread '<main>' panicked at 'You should have disposed of the
    pixmap...', .../rust-layers/.../surface.rs:166

Now:

    [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html
    thread '<main>' panicked at 'Error writing png: Permission
    denied (os error 13)', .../compositor.rs:1508
    thread '<main>' panicked at 'You should have disposed of the pixmap
    properly with destroy()! This pixmap will leak!', .../rust-layers/.../surface.rs:166
2015-09-10 21:45:58 -07:00