Commit graph

385 commits

Author SHA1 Message Date
Eli Friedman
4f866625cc Attempt to fix webfont-related intermittent test failures.
I'm not completely sure the race condition outlined in this patch is
actually the race condition causing failures... but it seems reasonable.
2015-10-30 12:50:05 -07:00
Manish Goregaokar
ce5586f74a Update euclid to 0.3 2015-10-28 21:34:23 +05:30
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
nxnfufunezn
fe2a4ac444 Fixes #8102 Removed unwrap on result of send call 2015-10-22 07:41:33 -04:00
benshu
553a0dbefd Timers are scheduled by a dedicated per-constellation thread. 2015-10-21 16:40:49 +02:00
bors-servo
7fb3c51bbb Auto merge of #8119 - paulrouget:updateImage, r=Manishearth
update image to 0.4.0



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8119)
<!-- Reviewable:end -->
2015-10-21 00:47:27 -06:00
Paul Rouget
b90a4eee12 update image to 0.4.0 2015-10-21 08:37:41 +02:00
Adam Szopa
88991013ab Remove explicit lifetimes which can be elided. 2015-10-21 01:27:48 +02:00
bors-servo
11d23a41b3 Auto merge of #7950 - mrobinson:layerize-iframes, r=pcwalton
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7950)
<!-- Reviewable:end -->
2015-10-20 16:01:38 -06: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
Glenn Watson
596193f975 Fix iframes flickering on mouse move.
Fixes #7867 (and probably several other iframe bugs).

When collecting layers for children of a pipeline, pass through the current
subpage pipeline recursively. This prevents descendany layers (such as scroll
layers) from being collected and re-created on the subsequent paint.
2015-10-20 08:32:17 +10:00
bors-servo
ac73374609 Auto merge of #8009 - glennw:webdriver-subpage, r=jdm
Remove webdriver use of SubpageId



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8009)
<!-- Reviewable:end -->
2015-10-14 18:05:17 -06:00
Glenn Watson
ed72e5766b Remove webdriver use of SubpageId 2015-10-15 07:11:31 +10: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
bors-servo
0f597d3890 Auto merge of #7933 - mbrubeck:piston-image, r=glennw
Replace libpng and stb_image with PistonDevelopers/image

Fixes #3368. r? @glennw 

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7933)
<!-- Reviewable:end -->
2015-10-12 15:06:31 -06:00
Glenn Watson
8d312b0f0c Convert RemoveIFrame message to use pipeline id. 2015-10-12 14:14:31 +10:00
Glenn Watson
736730f2e7 Remove unused subpage senders map. 2015-10-12 11:13:30 +10: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
bors-servo
e7f73fdfd8 Auto merge of #7875 - jgraham:composite_no_exit, r=glennw
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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7875)
<!-- Reviewable:end -->
2015-10-07 17:50:23 -06:00
Eli Friedman
0df71c7d19 Make sure to correctly destroy old layers in collect_old_layers_for_pipeline.
The previous code would skip calling clear_all_tiles(), which led to a
panic in rust-layers. ("You should have disposed of the pixmap properly
with destroy()! This pixmap will leak!")

Ran into this messing around with pdf.js; no minimized testcase.
Maybe related to #7895.
2015-10-07 11:46:53 -07: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
bors-servo
098bdb5f22 Auto merge of #7807 - glennw:pid, r=jdm
Make it possible for iframes to create their own pipeline ID.

This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7807)
<!-- Reviewable:end -->
2015-10-06 01:08:32 -06:00
Glenn Watson
5645dba1fa Make it possible for iframes to create their own pipeline ID.
This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
2015-10-06 17:06:53 +10:00
bors-servo
0860be4c28 Auto merge of #7811 - glennw:use-crates-au, r=larsbergstrom
Update servo to use published app units crate



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7811)
<!-- Reviewable:end -->
2015-09-30 22:21:36 -06:00
Glenn Watson
1999ea5e43 Update servo to use published app units crate 2015-10-01 11:45:35 +10:00
Matt Brubeck
a604b360da Start the constellation with the correct pixel ratio
This may mitigate race conditions like #7730.
2015-09-30 16:53:10 -07:00
Matt Brubeck
b024fdab33 Use same default window size in headless compositor
Attempts to fix #7730.
2015-09-30 15:58:49 -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
Patrick Walton
9bb6acd690 layout: Load Web fonts asynchronously.
Improves page load times significantly.

Closes #7343.
2015-09-27 15:38:20 -07:00
Jaydeep
2a99915188 Check for Extra pointer dereferencing. Issue #7640. 2015-09-26 19:33:29 -07:00
James Graham
79e548905e Enable resetable and String prefs.
This allows both boolean and string-type preferences. It
also implements a system where prefs that are read from a
configuration file can be reset back to their initial value,
which is useful in a number of cases e.g. when running tests
to ensure that each test starts with the same values for
the prefs.
2015-09-25 00:58:48 +01: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
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02: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
bors-servo
2879da54f9 Auto merge of #7645 - nox:omtc-types, r=Ms2ger
Introduce structs for compositing and script task constructors' arguments

Extracted from @pcwalton's #4271.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7645)
<!-- Reviewable:end -->
2015-09-16 10:41:10 -06:00
Anthony Ramine
a7738a5eef Introduce InitialScriptState 2015-09-16 18:38:24 +02:00
bors-servo
6a12f00d6d Auto merge of #7605 - nox:skew, r=mbrubeck
Implement "transform: skew()"

Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes #6237.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7605)
<!-- Reviewable:end -->
2015-09-16 06:31:48 -06:00
Anthony Ramine
9e1e2b8ed3 Introduce InitialConstellationState 2015-09-16 02:11:37 +02:00
Anthony Ramine
7d140113e7 Introduce InitialPipelineState 2015-09-15 23:14:56 +02: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