This change makes Servo use serialized messages over IPC channels for resource loading. The goal is to make it easier to make Servo multiprocess in the future. This patch does not make Servo multiprocess now; there are many other channels that need to be changed to IPC before that can happen. It does introduce a dependency on https://github.com/serde-rs/serde and https://github.com/pcwalton/ipc-channel for the first time.
At the moment, `ipc-channel` uses JSON for serialization. This is because serde does not yet have official support for bincode. When serde gains support for bincode, I'll switch to that. For now, however, the JSON encoding and decoding will constitute a significant performance regression in resource loading.
To avoid having to send boxed `AsyncResponseTarget` trait objects across process boundaries, this series of commits changes `AsyncResponseTarget` to wrap a sender only. It is then the client's responsibility to spawn a thread to proxy calls from that sender to the consumer of the resource data. This only had to be done in a few places. In the future, we may want to collapse those threads into one per process to reduce overhead. (It is impossible to continue to use `AsyncResponseTarget` as a boxed trait object across processes, regardless of how much work is done on `ipc-channel`. Vtables are fundamentally incompatible with IPC across mutually untrusting processes.)
In general, I was pretty pleased with how this turned out. The main changes are adding serialization functionality to various objects that `serde` does not know how to serialize natively—the most complicated being Hyper objects—and reworking `AsyncResponseTarget`. The overall structure of the code is unchanged, and other than `AsyncResponseTarget` no functionality was lost in moving to serialization and IPC.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 2eb122f394651232abd683fc576a5c4288bf277f
The main work is in the the rust-clipboard library, this PR updates Cargo.lock and adds plumbing.
0337e48b3f
Source-Repo: https://github.com/servo/servo
Source-Revision: 28e163d6c44f1d85fbaea7f236da40972b6a63b1
Implement HSTS (preload-only) servo/servo#6105
* Downloads the HSTS preload list from the chromium repo (same as gecko), then convert it to a list appropriate for servo.
* Reads the preload list when creating a resource task, and implements STS for those domains.
Still todo:
* Read Strict-Transport-Security headers from servers and add details to the in-memory HSTS list. (note: this requires hyper or servo to implement an STS header struct. Hyper seems like the appropriate location, so I will create an issue/PR there soon). The work for this is nearly done with the exception of adding a new ControlMsg and the new header.
* Persist HSTS list to disk with known hosts (perhaps a different issue should be raised for this?)
Source-Repo: https://github.com/servo/servo
Source-Revision: ab3d6c472d409c1602c873dcdcb495a7fec9d4b0
This checks every .toml file for an asterisk and prints an error if found.
Source-Repo: https://github.com/servo/servo
Source-Revision: 58e9bc6583b6ebbeb27e3b28a6b271ee48cd695a
I was concerned for a little bit that passing just whitespace to the
split_html_space_chars function would result in len > 0, so I wrote this
small unit test to make sure it does the right thing. Even though it
does do the right thing, I think there's still value in committing the
unit test.
Source-Repo: https://github.com/servo/servo
Source-Revision: d3d4976d8ed7cd7e92a1246513e125d1a6093d2a
Sorry for not doing it yesterday, I couldn't.
cc @metajack @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 4ebb95ccd8e034007eacb447a054919ef4af2bf7
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
Fixes#6236
Also included in this commit are the changes need to make flake8 pass
for the existing python file
Source-Repo: https://github.com/servo/servo
Source-Revision: ccfe29d8f284dedc0101045d574a98fb1f69aa62
Fixes#5914
r? @nnethercote for the gfx changes
r? @kmcallister or @jdm for the plugin
Source-Repo: https://github.com/servo/servo
Source-Revision: 2ca606aaba432741ce4e8274835f26db3a3581fc
This implements the `canvas`, `drawingBufferHeight` and `drawingBufferWidth` getters to `WebGLRenderingContext`, and an initial version of `getParameter`.
r? @jdm or @nox?
Source-Repo: https://github.com/servo/servo
Source-Revision: 042737793b1995ad93dc093ea12ec986b99e64b8
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
r? @metajack @mbrubeck @glennw
(or anybody, really)
This is just a simple version of summit3.html that has only the spinning rust logo and matrix multiplication calculator. Longcat currently has regressed and has both some rendering issues (margins have reappeared between the segments) and it only works as a standalone page and no longer within an iframe. I'll look into those enough to fix or at least log bugs when I get back.
Source-Repo: https://github.com/servo/servo
Source-Revision: c63fc4dc13a23cf5b9f8c0972111b3f9436d2143
--HG--
rename : servo/tests/html/summit3.html => servo/tests/html/linuxcon.html
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
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
This property determines the background positioning area, that is the position of
the origin of an image specified using the 'background-image' CSS property.
'background-origin' is ignored when background-attachment is fixed.
Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-originFixes#6045.
r? @pcwalton
cc @yichoi
Source-Repo: https://github.com/servo/servo
Source-Revision: 8c402728247c73268df9389948ee9a9d9e4063b2
...ed test_clipboard_paste to the "test-unit" suite.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5cb1356e9e3dbde9fd841c9aa2d21ea39c5eda18
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#5300, which it is a rebase of.
Known issues:
* Collapsed borders do not correctly affect the border-box of the table
itself.
* The content widths of all cells in a column and the content height of
all cells in a row is the same in this patch, but not in Gecko and
WebKit.
* Corners are not painted well. The spec does not say what to do here.
* Column spans are not handled well. The spec does not say what to do
here either.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8a4555cc53bc1bbb21a08eb6f010cb1215034419
Fixes the "jumpiness" seen on the Google home page, Wikipedia, and many
other places.
r? @mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 211ee668fae7f619ac7e09abd776a6f45fc40052