Commit graph

4499 commits

Author SHA1 Message Date
Mike Blumenkrantz
12d792f427 only create our own Display* in embedding when using OSR 2015-05-21 21:15:20 -04:00
Mike Blumenkrantz
789a4973f7 check method existence for hidpi_factor(), handle platforms other than macos 2015-05-21 21:15:19 -04:00
Mike Blumenkrantz
1aed319684 add pointer checks for cef method calls to avoid crashing on nonexistent methods 2015-05-21 21:15:18 -04:00
Mike Blumenkrantz
ca7fc036fe ensure window protocol handling occurs during cef browser loop updating
fixes window events when using cef windowed rendering
2015-05-21 21:15:18 -04:00
Mike Blumenkrantz
1cd850b121 add window member to servo cef browser object to fix framebuffer size method
platforms other than macos will not need/use a get_backing_rect() method since
there is no virtual pixel scaling, and this method will need to be usable
even before browsers are finished setting up, so ensure we can at least pass
initial window size back

also check method pointer availability before calling into a null function
2015-05-21 21:15:17 -04:00
Mike Blumenkrantz
e5a274b467 call XInitThreads() before creating our cef Display* object 2015-05-21 21:15:16 -04:00
Mike Blumenkrantz
09aba1f9de remove misleading FIXME(pcwalton) regarding gtk event loops in cef window 2015-05-21 21:15:15 -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
8330eabac1 temp re-set default url for cef while I figure out wtf is going on 2015-05-21 21:15:13 -04:00
Mike Blumenkrantz
42179cf6e7 create x11 Display connection on cef_initialize() as expected
this is how cef does it, we must obey our chromium overlords
2015-05-21 21:15:12 -04:00
Mike Blumenkrantz
bf1d12e5e9 add note that cef_render_handler_t::get_backing_rect() is only for os 2015-05-21 21:15:11 -04:00
Mike Blumenkrantz
52fb8562d6 add embedding macro for checking pointer existence
needed for determining whether an interface or callback has been provided
2015-05-21 21:15:11 -04:00
Mike Blumenkrantz
a296b2d073 add back cef_browser_host::composite() method 2015-05-21 21:15:10 -04:00
Manish Goregaokar
4bc9445b9e Upgrade rust to 716f920b7e234b450f272346fea961832505c06e (Tue May 19 05:39:29 2015 +0000) 2015-05-20 15:39:02 -07: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
d68730a0fc Auto merge of #6074 - pgonda:lint-fix-struct-enum-variants, r=Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6074)
<!-- Reviewable:end -->
2015-05-20 10:29:48 -05:00
Peter
717b443eec fixes #6069 2015-05-20 10:58:30 -04: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
Mike Blumenkrantz
5ce23cd36c update glutin repo ref 2015-05-18 12:26:46 -04:00
Glenn Watson
711c889d89 Fix android - it now renders the default wikipedia page correctly. 2015-05-18 10:18:56 +10:00
Glenn Watson
676c59cc18 Fix a few warnings in cef build 2015-05-15 13:48:03 +10:00
bors-servo
a97f81b83d Auto merge of #6016 - zmike:embedding-windowing, r=larsbergstrom
Depends on glutin PR #21

@glennw  @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6016)
<!-- Reviewable:end -->
2015-05-14 20:06:04 -05:00
Mike Blumenkrantz
6f6945aafc try fixing macos embedding build 2015-05-14 21:00:42 -04:00
Patrick Walton
a0980091cf gfx: Implement paint flashing, which will be useful for debugging
invalidation.
2015-05-14 15:45:41 -07:00
Ms2ger
d84c3e7a30 Fix some overlong lines. 2015-05-14 13:26:13 +02:00
bors-servo
5e61ebaa05 Auto merge of #6031 - glennw:reftest-race-conditions, r=larsberg,jdm
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6031)
<!-- Reviewable:end -->
2015-05-13 18:37:54 -05: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
Mike Blumenkrantz
6c32998100 update rust-layers version 2015-05-13 17:13:36 -04:00
bors-servo
a388a76d82 Auto merge of #5995 - zmike:glutin-parenting, r=jdm
needed for embedding api usage

Depends on https://github.com/servo/glutin/pull/20

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5995)
<!-- Reviewable:end -->
2015-05-13 15:27:47 -05:00
Mike Blumenkrantz
d2133b2467 bump glutin version for cargo 2015-05-13 13:25:00 -04:00
Mike Blumenkrantz
16a9712ab7 add parent window setting when creating windows with glutin
needed for embedding api usage
2015-05-13 13:24:56 -04:00
bors-servo
76225bdccb Auto merge of #5992 - zmike:random-fixups, r=larsbergstrom
Attempt to not panic as much if the resources/ dir is not where it's expected to be.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5992)
<!-- Reviewable:end -->
2015-05-12 13:26:22 -05:00
Mike Blumenkrantz
a838318b31 unset resources path on linux in embedding crate
this blocked execution on linux due to bad paths
2015-05-12 13:46:34 -04:00
Mike Blumenkrantz
4513d45c04 implement cef_browser_host_t::get_window_handle() 2015-05-12 13:43:43 -04:00
Mike Blumenkrantz
c1d6d6fe1c implement cef_browser_host_t::get_browser() method 2015-05-12 13:43:41 -04:00
Mike Blumenkrantz
28968023ba load passed url when creating cef_browser 2015-05-12 13:43:32 -04:00
Mike Blumenkrantz
797aa36484 implement cef_browser_t::get_identifier() 2015-05-12 12:52:30 -04:00
Mike Blumenkrantz
49d91a5606 fix async browser on_created callback
broken since 3bf779cd21
2015-05-12 12:52:29 -04:00
Mike Blumenkrantz
17390e75ec fix embedding rendering when using a child window
compositing must be initialized automatically in this case
2015-05-12 12:52:28 -04:00
Simon Sapin
8292f5749e Upgrade to Hyper 0.4.0 2015-05-12 16:48:21 +02: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
Brian Anderson
a0d14ac71a Remove lib.rs from gonk port. Unused 2015-05-11 12:37:16 -07:00
James Graham
6e639de664 Add support for getActiveElement webdriver command 2015-05-11 17:31:23 +01:00
Ms2ger
fa31d7d909 Replace TElement::get_link() by specific methods. 2015-05-11 10:52:58 +02:00
bors-servo
d1a0aacc60 Auto merge of #6001 - Ms2ger:runtime, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6001)
<!-- Reviewable:end -->
2015-05-10 15:14:37 -05:00
Ms2ger
34e35df986 Move get_attr and get_attrs into TElementAttributes.
These methods are only called on LayoutElement.
2015-05-10 18:26:06 +02:00
Ms2ger
cfe240d117 Remove reference counting from the Runtime implementation. 2015-05-10 18:09:09 +02:00
Ms2ger
9abe47b76f Move evaluate_script to Runtime. 2015-05-10 18:01:09 +02:00