Commit graph

133 commits

Author SHA1 Message Date
bors-servo
a5c7508fab Auto merge of #7009 - connorimes:remove-confusing-typedefs, r=Ms2ger
Remove typedefs DevtoolsControlChan and DevtoolsControlPort



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7009)
<!-- Reviewable:end -->
2015-08-07 14:41:37 -06:00
James Graham
36da7e2270 Add DOMLoad message to constellation that is sent after the DOM Load event is dispatched. 2015-08-07 16:55:13 +01:00
David Rajchenbach-Teller
d2a3a68170 Resolves #5478 - use std::process::exit instead of lib::exit in constellation.rs 2015-08-06 12:10:26 +02:00
Connor Imes
8c3cf90e6e Remove typedefs DevtoolsControlChan and DevtoolsControlPort. Fixes #6923. 2015-08-05 13:30:25 -05:00
James Graham
f52276d2cc Use hosts-replaced URL only when loading resources 2015-08-05 10:34:20 +01:00
Bruno de Oliveira Abinader
b3927d5a2d Implement Msg::Status with serialized url upon mouseover
Credits for Mike Blumenkrantz (@zmike), I just rebased against trunk and
fixed the url serialization.

Fixes #6178.
2015-07-30 16:37:54 +03:00
bors-servo
b90fd5931d Auto merge of #6812 - ecoal95:webgl-fail, r=jdm
webgl: Make context creation fallible. Fixes #6806



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6812)
<!-- Reviewable:end -->
2015-07-29 15:29:58 -06:00
Avi Weinstock
9ba18850dd Update rust-clipboard to the version with working set_contents. 2015-07-29 12:19:39 -04:00
Avi Weinstock
f86252a60b Add set_clipboard_context function and relevant plumbing. Use Option more consistantly (less unwraps) in textinput's selection handling. 2015-07-29 12:19:37 -04:00
ecoal95
bc908458ff webgl: Make context creation fallible. Fixes #6806 2015-07-28 17:34:23 +02:00
Patrick Walton
164e10202c devtools: Convert the developer tools to run over IPC. 2015-07-27 09:10:01 -07:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
James Graham
f44470ef52 Ensure we get the post-redirect url 2015-07-19 20:40:55 +01:00
James Graham
2a701cc339 Fixup rebase issues 2015-07-19 20:40:12 +01:00
James Graham
f28219b8cb Implement WebDriver Refresh command 2015-07-19 13:01:08 +01:00
James Graham
9eade19897 Add support for the Get URL WebDriver command. 2015-07-19 12:55:06 +01:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
Patrick Walton
e5b1ec4078 script: Split Pipeline::create into chrome process and content
process parts.

This will make it easier to adapt to IPC.

The trickiest part here was to make script tasks spawn new layout tasks
directly instead of having the pipeline do it for them. The latter
approach will not work in multiprocess mode, because layout and script
must run in the same address space and the pipeline cannot inject tasks
into another process.
2015-07-14 15:09:16 -07:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -07:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
James Graham
22c06307b8 Implement timeout for url load from WebDriver. 2015-06-17 00:25:23 +01:00
Corey Farwell
5c408d2be9 rust-geom API changes
https://github.com/servo/rust-geom/pull/81
2015-06-13 12:28:21 -07:00
Mukilan Thiyagarajan
6413526440 Simplify handle_load_start_msg function 2015-06-05 19:43:26 +05:30
bors-servo
b0f3417cff Auto merge of #6219 - zmike:favicons_and_stringlOWWW-MY-HEAD, r=pcwalton
Getting these down to the embedding API level required that I redo the bindings generator again, so this is more commits than anticipated.

@mbrubeck @Manishearth @pcwalton but NOT @larsbergstrom so don't even look at this.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6219)
<!-- Reviewable:end -->
2015-06-03 00:27:41 -05:00
Mike Blumenkrantz
ffa2093012 add window method for notifying when the <head> tag has been parsed 2015-06-02 22:16:28 -04:00
Mike Blumenkrantz
12f20f1ecc add handling for favicon link elements
fixes #6166
2015-06-02 22:16:25 -04:00
bors-servo
0b7886b15f Auto merge of #6161 - jgraham:webdriver_stability, r=glennw
This fixes various race conditions that affect test execution when using the servodriver product. It doesn't yet do enough to make servodriver a viable alternative to the normal servo test executor.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6161)
<!-- Reviewable:end -->
2015-06-02 21:11:44 -05:00
James Graham
aa0f7a7a12 Improve the stability of tests run using WebDriver.
* Wait for the correct pipeline to return a LoadComplete message
  before signalling a load is complete, and ensure that the root
  pipeline is the one corresponding to the active document of the top
  level browsing context, even if this has not yet painted.

* Ensure that TakeScreenshot operates on the correct pipeline

* Reset the screenshot ready flag whenever we decide that we are ready
  to take a screenshot.
2015-06-02 11:13:18 +01:00
James Graham
2b396b2485 Allow Window implementations to indicate that they don't support a clipboard.
This is important for the SERVO_HEADLESS configuration, because
creating a clipboard on linux creates an X context which then causes
reftest instability.
2015-06-02 08:57:09 +01:00
James Graham
49f1b13ad9 Add support for switching frames with the webdriver API.
This moves webdriver_traits into msg to avoid a circular dependency.
2015-06-01 23:18:55 +01:00
Mike Blumenkrantz
fcf449517d handle case of deleted pipeline when preparing to send load_end constellation msg 2015-05-27 14:45:56 -04:00
Mike Blumenkrantz
0d46a3b89a add navigation state data to LoadComplete messages, finish cef load state cbs 2015-05-27 14:45:48 -04:00
Mike Blumenkrantz
3481c752cd add CompositorMsg::LoadStart, implement cef_load_handler::on_loading_state_change()
only adds the loading:true callback this time...
2015-05-27 14:45:47 -04:00
Mike Blumenkrantz
92d44fb36e send ChangeUrl message from constellation on init 2015-05-27 14:45:41 -04:00
James Graham
28ac0abf6a Make WebDriver Get() command wait on pages loading before returning.
This makes using WebDriver significantly less racy. Also
refactors the message structure a little
2015-05-14 10:59:10 +01:00
Glenn Watson
2b3737d34e Various fixes for cleaning up iframes, compositor layers, pipelines and threads.
This allows most of the jquery test suite to run without exhausting thread resources.
2015-05-14 11:42:54 +10:00
Glenn Watson
eec3fad93d Fixes a number of race conditions and reliability issues with reftests and compositor.
The basic idea is it's safe to output an image for reftest by testing:
 - That the compositor doesn't have any animations active.
 - That the compositor is not waiting on any outstanding paint messages to arrive.
 - That the script tasks are "idle" and therefore won't cause reflow.
    - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
    - It could easily be expanded to handle pending timers etc.
 - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
2015-05-14 09:35:53 +10:00
Brian Anderson
17747ad0e2 Add some overview docs to compositing::constellation 2015-05-09 01:55:27 -07:00
James Graham
5311d9ab59 Support WebDriver takeScreenshot command.
This adds support for compositing to a PNG without actually quiting
the browser.
2015-05-07 09:56:15 +01:00
bors-servo
ccf1e6b9a7 Auto merge of #5361 - luniv:css-device-adapt, r=mbrubeck
Spec: http://dev.w3.org/csswg/css-device-adapt/

Currently, the actual viewport is used by the layout task as part of the reflow, and the compositor uses the zoom constraints. I'm not sure if anywhere else currently needs access to the constraints (i.e. there's no CSSOM as far as I can tell).

I did not implement sections 9 (viewport <META>) or 10 (handling 'auto' for 'zoom').

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5361)
<!-- Reviewable:end -->
2015-05-06 12:41:09 -05:00
James Gilbertson
138596e861 Constrain the viewport & zoom when reflowing 2015-05-06 00:34:33 -06:00
Guro Bokum
be2cb665de Start using on_refresh_driver_tick #5681
Final
2015-05-06 02:08:39 +07:00
Nicholas Nethercote
092507d23c Add a profile_traits crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.

This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
2015-04-30 17:58:47 -07:00
Prabhjyot Singh Sodhi
b980278d90 Uniformise the various Msg types [#5882] 2015-04-30 01:22:16 +05:30
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
James Graham
c2fc6e311a Add script execution support via WebDriver 2015-04-23 16:14:27 +01:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
Avi Weinstock
503cc9e6d6 Moved clipboard integration from textinput to constellation, to facilitate sandboxing. 2015-04-21 09:31:20 -04:00
Glenn Watson
18d465bcd2 Support focus management and keyboard events for iframes. 2015-04-20 07:52:22 +10:00
James Graham
009e2baaf0 Add enough Webdriver support to enable Get().
This is incomplete in several ways:

* It assumes that there's only one constellation (i.e. top level browsing context), ever.
* The session support is very basic indeed (no capabilities)
* Passing channels over channels may not sit well with IPC
* The error handling is mostly missing
2015-04-16 16:02:43 +01:00