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
This patch adds support for setting the line cap and join. However, it seems there's a problem on the azure-side, as the line cap setting doesn't work. Changing either the default values or using the new function has no effect. Line join works fine though.
Source-Repo: https://github.com/servo/servo
Source-Revision: fe81ce942a36b08ece8ef6d58de72624a961eeaa
All of the commits by brson have been reviewed. Just the android fixups and Rustup one (which also cleans up some of the duplication due to a complete rewrite of code that had been moved in the original PR).
Source-Repo: https://github.com/servo/servo
Source-Revision: 72a0fb683871365e86febbefb72be9fb136381af
This goes hand in hand with servo/glutin#18 to get our scrolling performance back on Mac.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: f017a4459c4d1067dec74ce1bf00cc6ce0612859
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.
Source-Repo: https://github.com/servo/servo
Source-Revision: df57af1fc41814389ab246f9a199ab868b1ecd74
Fixes#5460. This supports for simple focusable elements that are their own DOM anchors, like text `input` fields.
Requires servo/rust-selectors#20. r? @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: b63fb0c0a7e9cd9208d66319c910750aaaac844c
This impl made it possible to put raw pointers in ConstellationControlMsg and
send them across threads without considering the consequences.
This required making SmallVec1<T> Send if T is Send.
Source-Repo: https://github.com/servo/servo
Source-Revision: 74f8c0eeb714fb7ca7964b36f1b82849e8a345ee
There are several optimizations here:
* We make font families atoms, to allow for quicker comparisons.
* We precalculate an FNV hash of the relevant fields of the font style
structure.
* When obtaining a platform font group, we first check pointer equality
for the font style. If there's no match, we go to the FNV hash. Only
if both caches miss do we construct and cache a font group. Note that
individual fonts are *also* cached; thus there are two layers of
caching here.
15% improvement in total layout thread time for Facebook Timeline.
r? @glennw (since you last worked on `get_layout_font_group_for_style()` IIRC)
Source-Repo: https://github.com/servo/servo
Source-Revision: ba0d28e0023fce2003d64b9caf97fcdbeb7cdb28
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
r? @glennw
Source-Repo: https://github.com/servo/servo
Source-Revision: ebdf1d494b6c986e6dfcb7d8fd3f0ffa126523ed
I decided to use the old Netscape broken image link icon (later we may
replace the image asset for something more trendier).
Source-Repo: https://github.com/servo/servo
Source-Revision: 1e282d55d7e36f0e488a395b90e961e9200c3817
I accidentally left it in after removing the calls to stdout/stderr in
d926b8342b492cfa442a72b4d4da01e7e23d9cba.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5ead929fea34ca6d05d6bc4f0a07eeab4dfae207
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:
* `String` -> `str`
* `Atom` -> `str`
The latter of those two requires, a bump of the locked `string-cache`
library
Source-Repo: https://github.com/servo/servo
Source-Revision: 0fd41847a39be387c03bd5d8b6f2aec2b1bb6f66
- Most of util::memory has been moved into profile::mem, though the
`SizeOf` trait and related things remain in util::memory. The
`SystemMemoryReporter` code is now in a submodule
profile::mem::system_reporter.
- util::time has been moved entirely into profile::time.
Source-Repo: https://github.com/servo/servo
Source-Revision: d1268ec9c6633684270015e7b2619181aeb47b8b
--HG--
rename : servo/components/util/time.rs => servo/components/profile/time.rs
This fixes a bunch of warnings in the gonk code. Not all of them, but we're only left with three now.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8906d485703a5c975bcd6709c8ad9c25a51e1e8f
PIE is required on lollipop. PIE has been supported since jellybean.
Source-Repo: https://github.com/servo/servo
Source-Revision: 4dc5287b4eac2debe3ac5fc69037c8a5dc25c6dc
These changeset implements the beginnings of fine-grained measurement of Servo's data structures.
@pcwalton, @jdm: are you likely reviewers for this?
Source-Repo: https://github.com/servo/servo
Source-Revision: f093620922621e1877393b03968ed0ce767fdf12
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)
Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
Reconstructed from #5138 via raw diffing.
r? @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: fd1bb49a65dd998c8ef9890a1576aaf62ddfdba1
This just requires updating glutin and cocoa to pick up some backported fixes.
Source-Repo: https://github.com/servo/servo
Source-Revision: da880af7428e3b76a9a5e7d3a5ff2c80a32d63f0
Adds hostsfile parsing support for:
* Tabs
* Comments (line and end of line)
* IPv4 address validation
* Basic IPv6 address validation
* End of line whitespaces
* Host name alias (multiple host names per address)
Fixes#5063
Source-Repo: https://github.com/servo/servo
Source-Revision: 1a73766db2442476190f3dcec321f452aa122055
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)
Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
Moved from #4544, because Critic.
Fixes#4544.
Source-Repo: https://github.com/servo/servo
Source-Revision: 5cd6316addc1acf145ed3220719387ef6ef08d2f
Rust still reports that the `*mut ANativeWindow` argument in `gnw_perform` in `gonk/src/window.rs` is ffi unsafe,
however `ANativeWindow` is marked as `#[repr(C)]` and should be okay.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8bc4d07e50aa38371ef383b8f22ec9f7cacaae96
Here's example -m output after these changesets are applied:
```
_size (MiB)_: _category_
2798.61: vsize
136.80: resident
142.89: resident-according-to-smaps
97.84: - anonymous (rw-p)
23.98: - /home/njn/moz/servo/components/servo/target/servo (r-xp)
6.58: - [heap] (rw-p)
5.36: - other
3.51: - /usr/lib/x86_64-linux-gnu/dri/i965_dri.so (r-xp)
1.33: - /lib/x86_64-linux-gnu/libc-2.19.so (r-xp)
0.93: - /home/njn/moz/servo/components/servo/target/servo (r--p)
0.76: - /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 (r-xp)
0.74: - /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 (r-xp)
0.50: - /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (r-xp)
0.50: - /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1 (r-xp)
0.45: - /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 (r-xp)
0.43: - /lib/x86_64-linux-gnu/libm-2.19.so (r-xp)
30.85: system-heap-allocated
4.91: jemalloc-heap-allocated
6.11: jemalloc-heap-active
120.00: jemalloc-heap-mapped
```
The `resident-according-to-smaps` line is new, as are all the indented lines beneath it. This is useful particularly because it shows how much memory is taken up by code, e.g. the line ending in `servo (r-xp)` shows that the `servo` executable's code alone takes up 24 MiB of physical memory.
Source-Repo: https://github.com/servo/servo
Source-Revision: eb7e86ac4e21334e807a81ed01348a82ac7610b5
As it depends on the crates.io libc crate, the feature gate doesn't apply.
Source-Repo: https://github.com/servo/servo
Source-Revision: e0af48426980dd067dba00c98d6c2e9b8ebe1695
Ready for review.
Final link step on android fails, but we know how to fix it and will add it to this branch soon.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2cc08f289ab909de44fa09a07b2c43b70ce379b9
--HG--
rename : servo/ports/gonk/build.rs => servo/support/rust-task_info/build.rs
Update to latest rust-layers and send back all buffers to their
original pipeline.
Source-Repo: https://github.com/servo/servo
Source-Revision: bc6882bdefc318402a46ede1494eb79339705c21
This does a rustup to our current rustc.
Gonk now compiles, but doesn't run. Trying to fix this, but thought I'd PR my progress.
This needs a couple of things to work:
- An override of time (7f105d4dd2), with `timegm(struct tm *tm)` from `src/time_helpers.c` commented out
- An override of openssl (1a60bccb6a), with [this patch](http://hastebin.com/onovacofuj.diff)
- An override of gl-rs (230e6c9ed6), with submodules updated. This is because the lockfile is messed up due to conflicting github and registry deps. While I could fix this by forking things, this goes away next rustup anyway (the deps all move to a common source), so I just worked around it with a clone.
- Env vars similar to [this](http://hastebin.com/hawadubolu.bash)
- After the last failed link step, run `../../mach rustc` with the same args (extracted from `../../mach cargo -v`), along with `-C link-args="$LDFLAGS -lGLESv2 -L $GONKDIR/backup-flame/system/lib/"`
- (Steps for creating a B2G build [here](https://www.irccloud.com/pastebin/VG2lHBVP))
r? @larsbergstrom
(No need for a merge, just a check on the unsafe stuff would be fine)
Source-Repo: https://github.com/servo/servo
Source-Revision: 11edfdc9353362161b0ff9a654d61dccd1d438f0
r? @jdm
The in-progress Rust upgrade will go on top of this.
Source-Repo: https://github.com/servo/servo
Source-Revision: f5cb1690bfa20c1eccffe2f94a2155d2321e69fa
For now, this can only be tested by replacing `resources/certs` with `resources/cert-google-only` (an Equifax certificate -- will work for Google but not Wikipedia or Stack Exchange)
I can replace the error page with something less frivolous, but since we already have the "I tried" star (and this stuff is the job of the chrome anyway), I thought this would be more fun to have.
This also contains a partial hyper upgrade.
Fixes#4119
Source-Repo: https://github.com/servo/servo
Source-Revision: 2010fbf0ddabdaf3bcb52c5f2075e7d994fc63ec