Commit graph

245 commits

Author SHA1 Message Date
Jack Moffitt
b5ebbaefe3 Clean up dependencies. 2015-06-07 12:14:38 -06:00
Eduard Burtescu
00e8e5f77d Use the correct log crate and setup env_logger in main. 2015-06-06 23:20:40 +03:00
Mukilan Thiyagarajan
6413526440 Simplify handle_load_start_msg function 2015-06-05 19:43:26 +05:30
Corey Farwell
a14c745a6a Bump rust-url version: 0.2.16 → 0.2.35 2015-06-04 16:45:15 -04:00
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
bors-servo
f6fe195334 Auto merge of #6230 - frewsxcv:getters-get, r=nox
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6230)
<!-- Reviewable:end -->
2015-06-02 08:17:03 -05:00
Corey Farwell
435e551753 Remove get_ prefix on getters
Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
2015-06-02 08:54:44 -04: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
Nicholas Nethercote
a21f6c407c Measure paint task buffer maps in the memory profiler.
Example output from the memory profiler:

```
|       1.04 MiB -- url(http://en.wikipedia.org/wiki/Main_Page)
|          0.26 MiB -- display-list
|          0.78 MiB -- paint-task       # new output line
|             0.78 MiB -- buffer-map    # new output line
```

The buffer maps aren't huge, but they're worth measuring, and it's good
to get the memory profiler plumbing into PaintTask.
2015-05-27 18:27:18 -07: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
64ff2c4a54 handle early LoadURL messages without panicking by sending initial url load
fixes #6126
2015-05-27 14:45:54 -04:00
Mike Blumenkrantz
68fc51205f add error enum for chromium net errors, create window method for error propagation 2015-05-27 14:45:50 -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
Mike Blumenkrantz
cf388cd909 call compositor.window.set_page_url() on WindowEvent::LoadUrl 2015-05-27 14:45:41 -04:00
Mike Blumenkrantz
fb72a64833 pass width and height information through to cef paint callback 2015-05-21 21:15:15 -04:00
Mike Blumenkrantz
9f7aacdacf add check for self.context existence in composite_specific_target() 2015-05-21 21:15:14 -04:00
bors-servo
ad53e95080 Auto merge of #6083 - ecoal95:layerize-canvas, r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6083)
<!-- Reviewable:end -->
2015-05-20 15:42:06 -05:00
Patrick Walton
0098d9e9e8 compositing: Support multiple events per frame.
Improves scrolling performance on Mac.
2015-05-20 10:53:48 -07:00
ecoal95
3350522306 Layerize canvas
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.

Also see https://github.com/servo/servo/issues/6142
2015-05-20 19:10:50 +02:00
bors-servo
c51e9f0455 Auto merge of #6131 - glennw:jquery-exit-fix, r=jdm
This fixes a hang found while testing the jQuery test suite.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6131)
<!-- Reviewable:end -->
2015-05-19 21:44:45 -05:00
Patrick Walton
6a197719b3 compositing: Implement display ports and avoid creating display lists
for items outside it.

This improves Servo's performance on large pages.
2015-05-19 16:53:51 -07:00
Glenn Watson
35a570ab66 Fix several hangs / panics during pipeline cleanup of in progress loads.
This fixes a hang found while testing the jQuery test suite.
2015-05-19 16:14:25 +10:00
Ms2ger
0067cb2101 Remove some clones. 2015-05-15 17:52:53 +02: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
bors-servo
606ab1df44 Auto merge of #6013 - glennw:compositor-race, r=pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6013)
<!-- Reviewable:end -->
2015-05-12 20:44:19 -05:00
bors-servo
ca9c703bf5 Auto merge of #6010 - brson:next, r=pcwalton
Just cleanup.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6010)
<!-- Reviewable:end -->
2015-05-12 03:26:54 -05:00
Glenn Watson
79942f0920 Fix a compositor race condition that can result in the most recent buffer not being painted. 2015-05-12 10:34:05 +10:00
Patrick Walton
55442db3b2 compositing: Fix scrolling timeout. There are 1,000,000 nanoseconds in a
millisecond.
2015-05-11 14:44:49 -07:00
Josh Matthews
a1ae53a230 Delay stylesheet load in test to increase confidence. 2015-05-11 15:35:10 -04:00
Josh Matthews
32a89c9455 Make stylesheets block page load. 2015-05-11 13:41:52 -04: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
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04: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
bors-servo
ac0645c236 Auto merge of #5767 - glennw:image-cache, r=larsbergstrom,jdm
* 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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5767)
<!-- Reviewable:end -->
2015-04-22 19:16:46 -05:00