Commit graph

68 commits

Author SHA1 Message Date
Michael Howell
7f1297e256 Remove layout_threads assignment from CEF 2016-08-13 16:48:55 -07:00
James Graham
8d9ab50a96 Add a pref for a default homepage. 2015-09-25 00:58:51 +01:00
Johann Tuffe
ec07178b6f sort all uses 2015-08-20 20:47:12 +08:00
Josh Matthews
fecb2e3960 Make the global options more resilient to unit tests running in parallel. 2015-07-21 09:14:06 -04:00
Mátyás Mustoha
322fd5ad9d Add disable-canvas-aa option to test runner. 2015-05-28 11:10:58 +02:00
Mike Blumenkrantz
b1ae5e7523 make Opts.url an Option<> type, only emit initial url load if url exists
this is a necessary change for embedded apps to prevent an initial about:blank
page load from overwriting whatever the app was actually trying to load
2015-05-27 14:45:57 -04:00
Mike Blumenkrantz
aef3218169 Revert "temp re-set default url for cef while I figure out wtf is going on"
This reverts commit 8330eabac1.
2015-05-27 14:45:54 -04:00
Mike Blumenkrantz
af1dce5a2e add new browser process interface method for main loop integration
regular CEF requires the user to either run the cef main loop or
poll on a function to drain events. now the engine will trigger a callback
in some application thread which will notify it that there is work
to be done by the browser
2015-05-27 14:45:39 -04:00
Mike Blumenkrantz
12d792f427 only create our own Display* in embedding when using OSR 2015-05-21 21:15:20 -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
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
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
28968023ba load passed url when creating cef_browser 2015-05-12 13:43:32 -04:00
Brian Anderson
f8bbc0a974 util: Rename ops::set_opts to ops::set, to match get 2015-05-09 02:12:23 -07:00
Brian Anderson
aa906a54d3 Remove call to env::current_dir from Browser
Put it in util::opts instead.
2015-05-09 00:48:25 -07:00
Mátyás Mustoha
91b4246e1b Fix some irregular indentation. 2015-04-22 21:57:58 +02:00
Ms2ger
de94e39ff7 Stop using int/uint in CEF. 2015-04-13 14:11:17 +02:00
Jag Talon
74cd4cd56a opts.rs: don't accept multiple URLs. Fixes #5520.
Switched from opts.urls from being of type Vec to type String and changing the name to `url` as well. Changed the other files that are using opts.urls accordingly.

servo/lib.rs + gonk/src/lib.rs: no need for a block scope.

cef: fix compiler errors.

- remove the use of `mut` since it's not needed.
- use `to_owned` instead of `to_string` because it's more efficient.
2015-04-07 15:46:51 -04:00
Ms2ger
b45cf4ccf8 Fix some warnings in the CEF port. 2015-03-23 00:35:23 +01:00
Ms2ger
40e62f13d3 Fix build warnings in CEF. 2015-02-22 22:33:15 +01:00
Prabhjyot Singh Sodhi
432f7a5139 using opts::default_opts() in cef/core.rs
Fixes #5002
2015-02-23 01:31:46 +05:30
Patrick Walton
40a3b41758 layout: Add an option to visualize parallel layout 2015-02-20 19:11:35 -08:00
Jack Moffitt
7acc0619e6 Correct usage of number of painting threads.
Previously this used the number of layout threads to allocate the
threadpool. This also makes the member name consistent with the rest of
the structure.
2015-02-19 16:17:55 -07:00
Jack Moffitt
923676d443 Added overlay for demoing parallel painting. 2015-02-19 16:17:55 -07:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Glenn Watson
0f525d908d Change glutin headless mode to be a build config, as it breaks some Linux distros linking to both.
The majority of this change is simply re-arranging the code in the glutin port
so that the windowed/headless code is configured at build time rather
than runtime. There shouldn't be any functional difference as a result of this change.
2015-01-23 06:09:25 +10:00
Ms2ger
01ed338746 Move to to_owned rather than into_string.
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Ms2ger
7eb659371d Stop calling is_not_null.
It has been removed from Rust.
2015-01-20 13:08:49 +01:00
Glenn Watson
f7b83d9a76 Add support for multiple cef browsers (multiple tabs). 2015-01-09 10:21:49 +10:00
Glenn Watson
cf047d6cef Add ability to explicitly set static resources path, used by cef-linux. 2015-01-09 07:04:44 +10:00
Ms2ger
16c7060bc8 Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19. 2015-01-08 09:58:46 -05:00
Ms2ger
b6117a57aa Replace the remaining to_string calls by into_string calls. 2014-12-31 10:34:44 +01:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
Patrick Walton
c52f550367 Update to get the reference counting correct 2014-11-27 10:31:32 -06:00
Patrick Walton
14ef53cf57 Add back API hashes 2014-11-27 10:31:32 -06:00
Patrick Walton
3bf779cd21 ports/cef: Use the CEF translator tool to generate the full set of CEF
bindings.

This replaces hand-implemented CEF bindings with proper Rust wrappers
automatically generated from the C++ headers. This means that, whenever
CEF's C++ headers change, we can easily generate both the appropriate C
API and the appropriate Rust API. It eliminates much of the hand-written
unsafe code within the CEF port, because the CEF translator tool now
knows how to generate Rust smart pointer wrappers for each class that
corrently perform reference counting.

Additionally, this commit adds utility macros (located in `macros.rs`)
that make it easier to correctly expose Rust objects as CEF objects.
They handle the marshaling of objects between Rust and CEF properly.
The net result of this is that you can write mostly-natural-looking Rust
in the CEF port and interact with it with a natural-looking C++ API on
the embedding side.

This setup relies on the branch of CEF located here:

    https://github.com/pcwalton/chromium-embedded-framework

To regenerate, follow the instructions in `ports/cef/README.md`. For
convenience, and because I don't anticipate the API to change much, I
have vendored in all of the appropriate interfaces.
2014-11-27 10:31:32 -06:00
Mike Blumenkrantz
d4ddfaa623 embedding: redo browser creation, split after_created COM to separate function
this causes the callback to run at the expected time for applications that may depend on the browser loop having started or somesuch
2014-11-21 21:54:09 -05:00
Mike Blumenkrantz
8aceb59824 embedding: redo browser creation and message loop code to be more CEF-like
big thanks to @alexcrichton for his help with this
2014-11-21 21:54:09 -05:00
Glenn Watson
898c1ecc8f Remove unused exit after load option.
This simplifies some upcoming changes to how event handling works.
2014-11-21 09:15:02 +10:00
Mike Blumenkrantz
b0a65f4918 embedding: implement cef_execute_process() stub
this is missing signal handler functionality in rust and we currently have no use case for actual execution of secondary processes
2014-11-20 11:53:41 -05:00
Glenn Watson
0278920343 Add glutin port (supported on Linux only currently).
Default build uses glfw, but glutin can be enabled via:

./mach cargo build --no-default-features --features=glutin
2014-11-19 08:31:34 +10:00
Mike Blumenkrantz
5f10092995 embedding: convert callback Option<> matching to map() 2014-11-14 17:18:50 -05:00
Mike Blumenkrantz
11e30731ef embedding: change Option<> unwrapping for fptrs to use match 2014-11-14 17:08:36 -05:00
Mike Blumenkrantz
d33f74f499 embedding: remove eutil::fptr_is_null, fix #3967, add Option<> to fptrs 2014-11-14 14:30:59 -05:00
Patrick Walton
10f7b49cf7 Invert control flow, fix resizing, and improve checkerboarding
significantly by giving tiles some time to paint before we render
unrendered content.
2014-11-04 13:51:56 -08:00
Glenn Watson
90d793cdc8 Add task profiler, which works by instrumenting each task runtime when enabled. 2014-10-29 07:34:47 +10:00