> Here it is.
>
> ~~There's two major things that are unfinished here:~~
> - ~~Dealing with the unroot_must_root lint. I'm not sure about the value of this lint with the new rooting API.~~ Done.
> - ~~Updating the Cargo.locks to point to the new SM and SM binding.~~ Done.
>
> I also included my fixes for the rust update, but these will disappear in a rebase. A rust update is necessary to support calling `Drop` on `Heap<T>` correctly when `Heap<T>` is inside a `Rc<T>`. Otherwise `&self` points to the wrong location.
>
> Incremental GC is disabled here. I'm not sure how to deal with the incremental barriers so that's left for later.
>
> Generational GC works. SM doesn't work without it.
>
> The biggest change here is to the rooting API. `Root` was made movable, and `Temporary` and `JSRef` was removed. Movable `Root`s means there's no need for `Temporary`, and `JSRef`s aren't needed generally since it can be assumed that being able to obtain a reference to a dom object means it's already rooted. References have their lifetime bound to the Roots that provided them. DOM objects that haven't passed through `reflect_dom_object` don't need to be rooted, and DOM objects that have passed through `reflect_dom_object` can't be obtained without being rooted through `native_from_reflector_jsmanaged` or `JS::<T>::root()`.
>
> Support for `Heap<T>` ended up messier than I expected. It's split into two commits, but only because it's a bit difficult to fold them together. Supporting `Heap<T>` properly requires that that `Heap::<T>::set()` be called on something that won't move. I removed the Copy and Clone trait from `Heap<T>` so `Cell` can't hold `Heap<T>` - only `UnsafeCell` can hold it.
>
> `CallbackObject` is a bit tricky - I moved all callbacks into `Rc<T>` in order to make sure that the pointer inside to a `*mut JSObject` doesn't move. This is necessary for supporting `Heap<T>`.
>
> `RootedCollectionSet` is very general purpose now. Anything with `JSTraceable` can be rooted by `RootedCollectionSet`/`RootedTraceable`. Right now, `RootedTraceable` is only used to hold down dom objects before they're fully attached to their reflector. I had to make a custom mechanism to dispatch the trace call - couldn't figure out how to get trait objects working for this case.
>
> This has been tested with the following zeal settings:
>
> GC after every allocation
> JS_GC_ZEAL=2,1
>
> GC after every 100 allocations (important for catching use-after-free bugs)
> JS_GC_ZEAL=2,100
>
> Verify pre barriers
> JS_GC_ZEAL=4,1
>
> Verify post barriers
> JS_GC_ZEAL=11,1
Source-Repo: https://github.com/servo/servo
Source-Revision: e7808c526c348fea5e3b48af70b7f1a066652097
Sorry for not doing it yesterday, I couldn't.
cc @metajack @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
Depends on servo/rust-azure#170 which has been already merged.
So this patch contains the update of rust-azure.
r? @nox
cc @yichoi
Source-Repo: https://github.com/servo/servo
Source-Revision: e1b28d893e54601bf497d0d5b83d77658ca16bac
This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.
Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9
See #6376
r? @Ms2ger
Snaps don't exist yet, putting up the @larsbergstrom signal. The snap need not exactly match this commit, anything in the vicinity, or just master, should work really. (yay stability)
There's no particular reason behind this rustup except that I want to keep Servo running on almost-master as much as possible.
Source-Repo: https://github.com/servo/servo
Source-Revision: 67b121c0b82f4a2107d7b015f60bd025e04dc336
This just bumps `offscreen_gl_context`, which added egl support
recently.
Source-Repo: https://github.com/servo/servo
Source-Revision: b0a80de92bf946696fdc9c227439796b094bfde7
The util component specified fnv and smallvec as dependencies and publicly
reexported both of them. Several other components utilized these reexports,
presumably because fnv and smallvec used to live in the tree so reexporting
made the transition easier.
These indirect dependencies through the util component are unnecessary.
This commit removes the fnv & smallvec crate reexports in the util component.
It exchange, it adds fnv & smallvec as dependencies to non-util components
wherever needed. Finally, it removes the fnv dependency from util as it is not
utilized anywhere in the util component.
Source-Repo: https://github.com/servo/servo
Source-Revision: 35000a9b854dc0989cc473aaec0ea8c082521c66
Overlaps a bunch with #6288. Putting this here so @frewsxcv can take a look and we can figure out how to merge our work together.
Source-Repo: https://github.com/servo/servo
Source-Revision: 96311aa9b71abb31fd8e4283de9e1b58813108a3
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.
Source-Repo: https://github.com/servo/servo
Source-Revision: b0f3417cffb211d547853b8069e7a444a1d9964f
This is important for the SERVO_HEADLESS configuration, because
creating a clipboard on linux creates an X context which then causes
reftest instability.
Source-Repo: https://github.com/servo/servo
Source-Revision: 64012cb10e7881038e3f359fb2df888732ead2fd
This moves webdriver_traits into msg to avoid a circular dependency.
Source-Repo: https://github.com/servo/servo
Source-Revision: d08995e1a94fa093b7fc1e5d918d9dca79f260d6
This is the first bit of build cleanup on my quest to make Cargo faster.
Source-Repo: https://github.com/servo/servo
Source-Revision: e6c4ca4960cc9f6ac9bd17c35a10b78350b70c73
r? @jdm
I couldn't add the `getContextAttributes` method since `CodegenRust`
doesn't know how to return a dictionary value, I'll take a look at it ASAP.
I think the helper functions can return directly the renderer, since they're used just for that, but I wanted to hear your opinions about this.
By the way I'm interested in adding more serious tests for WebGL, and I think the [khronos conformance suit](https://github.com/KhronosGroup/WebGL/tree/master/conformance-suites/1.0.3) should be the best option.
Should I try to integrate it in wpt, or making a `tests/webgl` directory (or similar) inside the servo tree? (Maybe this question should be for @Ms2ger)
Source-Repo: https://github.com/servo/servo
Source-Revision: 0de09b936e5e37c15b7865157a98ad78b1077659
ensure that the output render size matches the desired size
Source-Repo: https://github.com/servo/servo
Source-Revision: 09f2977cc945850a35f7a5ef1ed014bc42cb265a
This patch turns on antialiasing for the canvas, and updates the painting code to use the updated Azure DrawOptions defined in servo/rust-azure#158.
Source-Repo: https://github.com/servo/servo
Source-Revision: c97c0a9f94208828c617cbd99efd8e3e410c69ee
It is recommended to use FT_Done_Library with FT_New_Library
from freetype document.
Fixes#6191.
r? @jdm @nnethercote
cc @yichoi
Source-Repo: https://github.com/servo/servo
Source-Revision: af81db54790efbeb86ee03e6ca63fb9046c6111a
A collection of commits which improves embedding integration and rendering.
@larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 4a95bce9f260b183660dab44ef3044618be6840c
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
Source-Repo: https://github.com/servo/servo
Source-Revision: ad53e95080144485e74cd9b9d48ce75e20de4e36
--HG--
rename : servo/components/gfx/color.rs => servo/components/gfx_traits/color.rs
This improves Servo's performance on large pages.
Please double-check the logic when it comes to nested layers—I'm sure I've messed up some of the geometry calculations :)
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: 0880e54f987bac7c34c934ef6ee36f46475b06e3
--HG--
rename : servo/tests/html/lipsum.html => servo/tests/html/lipsum-large.html
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.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5e61ebaa05e5babb7b2fdd1347b6cdd23df38e62
Attempt to not panic as much if the resources/ dir is not where it's expected to be.
Source-Repo: https://github.com/servo/servo
Source-Revision: 76225bdccb5105764d979b4d739d4d8edfc98bfe
Some small changes.
@larsbergstrom or whoever cares the most at this exact moment.
Source-Repo: https://github.com/servo/servo
Source-Revision: 892a7404266983c6d51218bc18b8aa878d9a7a3e
r? @metajack
Thanks to @alexcrichton for all the work to figure out our problems here!
Source-Repo: https://github.com/servo/servo
Source-Revision: 02cf89f4d3fb991a27ecbaf8d3cafe5722750cc6
This updates all the CEF interface stuff to the current CEF codebase.
Source-Repo: https://github.com/servo/servo
Source-Revision: 92f46e3149df7de59aa5aa6700c1878958e2f273
--HG--
rename : servo/ports/cef/interfaces/cef_url.rs => servo/ports/cef/interfaces/cef_parser.rs
This adds support for compositing to a PNG without actually quiting
the browser.
Cargo bits need to be updated after the upstream changes to rust-png land.
Source-Repo: https://github.com/servo/servo
Source-Revision: 63ba1cb69b80d70c1d893ba80edd802cd326316d
This uses some dependencies from crates.io instead of git where the crates.io copy was already used in some other part of the dependency tree, so we had two copies of the same library.
The `android_glue` crate is the only one left where we have two copies, but solving that is more tricky since we hard-code a path in `components/servo/.cargo/config`.
r? @larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 59cb1b03968a55dcce1774088890a3ecf4de0037
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').
Source-Repo: https://github.com/servo/servo
Source-Revision: ccf1e6b9a701cf4ff010fa1f1b4ba9d656d962af
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`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 77f653da2c4120ea7ac1a946d97fc70059d513d4
--HG--
rename : servo/tests/unit/gfx/lib.rs => servo/components/profile_traits/lib.rs
fixes#5724, #5737
uses https://github.com/Manishearth/rust-tenacious (can be moved in-tree if needed)
I can make it `Deny` by default too (I'll add a cargo feature to tenacious), though we might want it on
`Warn` until we get some mileage on it.
Source-Repo: https://github.com/servo/servo
Source-Revision: d7987e43c944eb9b156bf3244c08fce4cb570db4
GitHub doesn't allow me to reopen#5769, so I created this.
Sorry about the merge fail, my bad :/
cc/ @jdm @dmarcos
---
This PR uses customized GL context creation code, right now only working under Linux, so I expect the clearcolor test to fail on other platforms.
It addresses some other problems:
* Propagates context creation error to the top, returning null if not found.
* Uses GLContextAttributes, which will allow us to write WebGLContextAttributes easily.
* Doesn't allow a 2d context and a WebGL context coexist.
* Panics when resizing the context to larger dimensions (to be fixed soon, but better than blindly allowing it).
Removes some unused dependencies
Source-Repo: https://github.com/servo/servo
Source-Revision: 9f2ad9376eaf598898387ea2c26f48c3ceb0330d
* 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.
Source-Repo: https://github.com/servo/servo
Source-Revision: ac0645c2363b5a6ea3930b0857b3a27f1b6d033f
Manual re-opening of #5479 (since it seems that GitHub disables re-opening with the same number after a rebase).
Source-Repo: https://github.com/servo/servo
Source-Revision: 9974ebb2f969d2de8959fe74844b7410a5acd54e
@jdm @ecoal95 I'm working on making VR happen in the Browser and I want to bring to Servo the [webVR APIs](https://github.com/MozVR/webvr-spec/blob/master/webvr.idl) we already have in Gecko. Before anything happens we need a working implementation of WebGL (and also the [fullscreen API](https://fullscreen.spec.whatwg.org/)). My implementation is very basic and probably naive (I just recently started to contribute to Servo). My patch is just a starting point:
- It only implements ```clearColor``` and ```clear``` methods of the [WebGL spec](https://www.khronos.org/registry/webgl/specs/latest/).
- It uses the readback strategy that ```canvasRenderingContext2D``` is using (The webgl task paints stuff independently on it's own buffer and the compositor task request the pixels back to the webgl task when it needs them) I'm sure there are much better ways to handle this. Latency and FPS are critical in VR so we have to figure out the fastest way to push pixels to the screen. I've read something about layerizing the canvas but I'm still not sure what that even means :)
- There's an included test you can try ```./mach run tests/ref/webgl-context/clearcolor.html```
@ecoal95 I know you'll be working on this for the next three months. With a foundation in place we will be able to make quick progress in parallel. This is exciting!
Source-Repo: https://github.com/servo/servo
Source-Revision: e4b620ea54c94e03095e4108bce94ec750416bba
This patch enables the use of `save()` and `restore()` for the canvas context, which is used by *a lot* of sites and scripts.
Depends on servo/rust-azure#153.
Source-Repo: https://github.com/servo/servo
Source-Revision: 9c7c289acae3ea012338a5b25bc50a10e7f7074d
The bootstrap binaries have been approved for public use, so we do not need to request that everyone rebuild B2G in order to try out the B2S build.
r? @manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: e78683430fbab34339b6ff0cff20bbf88c61cf75
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
Source-Repo: https://github.com/servo/servo
Source-Revision: af2f46bddad7a0e87a46fc3e303f15b4343226c7