This is a work-in-progress for the implementation of HTTP fetch. Currently, it does not compile, as I haven't figured out how to solve the issues regarding borrows and lifetimes.
Source-Repo: https://github.com/servo/servo
Source-Revision: 90aacf00f866c7ef3b858d84585bd5142f74c9ee
Some small changes.
@larsbergstrom or whoever cares the most at this exact moment.
Source-Repo: https://github.com/servo/servo
Source-Revision: 892a7404266983c6d51218bc18b8aa878d9a7a3e
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
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
The value of the header is: `text/html;q=0.9,*/*;q=0.8`
Closes#5399
Source-Repo: https://github.com/servo/servo
Source-Revision: 21c38d0de8e82e29d187929535a73bfd297538b8
* 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
This implements a framework for opting in to receiving network events asynchronously. It also converts XMLHttpRequest to use them, and paves the way for better support for synchronous XHR using on-demand, targeted event loops instead of spinning the global event loop. This gives us complete feature parity with the existing XHR implementation, using fewer threads than before in the async case.
Source-Repo: https://github.com/servo/servo
Source-Revision: 3151497d498b001b4a783dce0595615c6fc40936
Extracted this out of #5649
This commit was created with the following commands:
```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
Source-Repo: https://github.com/servo/servo
Source-Revision: 4997d3a112354a407365fede1ab1944834a2e13c
Image used to be a trait, but no longer is, so boxing it is no longer
necessary. Fixes#5639.
Source-Repo: https://github.com/servo/servo
Source-Revision: b7f59a36461e6c9eb08b8e48760168d3cb26a400
Move the ImageCacheTaskClient trait and impl to net_traits. Fixes#5551.
Source-Repo: https://github.com/servo/servo
Source-Revision: 6903955b9835b7cfdff6378e4a547cdad1589443
On my laptop, running `./mach test-unit` goes from about 11 minutes to 22 seconds, when run after `./mach build`.
Fix#5291.
Source-Repo: https://github.com/servo/servo
Source-Revision: 017d1053617f6769d7f355e4a97d52ae67e53d1c
--HG--
rename : servo/components/net/test.jpeg => servo/tests/unit/net/test.jpeg
rename : servo/components/script/tests.rs => servo/tests/unit/script/size_of.rs
This rebases and integrates #4209, removing the sniffer task (turns out it wasn't a great idea), and adds a `--sniff-mime-types` command line flag to enable sniffing for file:// and http:// resources. Tested against a random picture file on my harddrive. The actual MIME sniffing implementation can be extracted into a separate library separately.
Source-Repo: https://github.com/servo/servo
Source-Revision: c7e210f24c97be1057a652b3644332e7043bfeac
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
* Previously, the function returned an owned String, which is not
necessary, so now it returns a slice
* Steps have now been documented/labeled
* The last step of the algorithm was incorrect; it would only slice the
path if the "/" was the last character, which is not what the spec
says. The spec says to slice up until (but not including) the last
"/". Also added a regression test for this.
Source-Repo: https://github.com/servo/servo
Source-Revision: 0d00e37c23dce23cad5b98f82ae711675f324810
- 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
Implements view-source protocol by having a view-source handler, and modifying the content type to be text/plain if that is used.
Implements text/plain handling. This allows view-source content to display as plain text.
Example usage:
./mach run http://cd.pn/x.txt
./mach run view-source:http://tinyvid.tv/
This fixes issue #4181. Issue #3649 includes "support text/plain" so this possibly fixes some of that issue as well.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7bd6cb00911572e8733e462156122d974ff0c8a8
@jdm This initial version has a few outstanding issues that I wanted to invite input on. Specifically:
1. I had some difficulty finding a home for the `StorageType` enum. Structs defined outside of the `script` module don't seem to be able to use the `#[jstraceable]` annotation and the `net` module (where `StorageTask` lives) doesn't have access to `script`. Per Simon Sapin's suggestion, I worked around this temporarily by creating a `TraceableStorageType` stand-in struct that was traceable and which could be translated into a regular `StorageType` when being sent to the `StorageTask`. Unsure of the best way to resolve this hack. Thoughts?
2. Apart from the `Storage` constructor used in `Window::SessionStorage` and the new `Window::LocalStorage`, there's also a method called `Storage::Constructor`. I'm unclear on what (if anything) will actually invoke this, so I'm not sure which variant of `StorageType` to use here. I've temporarily created an `Unknown` variant of `StorageType` as a placeholder.
3. I discovered that the web platform tests directory's localStorage tests. Many of them now pass despite the configured expectation that they fail. However, several do not pass. Is there a good way for me to add debug logging or otherwise get a sense of which assertion failed / what went wrong?
Thanks for your continued help!
Source-Repo: https://github.com/servo/servo
Source-Revision: b8e87ea020879090c931421cf3cec73d8cd1156f
SSL is broken-ish (eg tw.yahoo.com, html.spec.whatwg.org don't work since we don't verify SAN properly), this flag can let devs bypass the protection for testing purposes.
Source-Repo: https://github.com/servo/servo
Source-Revision: 389338c28f75808e68cd635211687718362f8e7d
This is GIF specific. It's also done when the image is PNG but PNG is
handled separately with the PNG crate, whereas GIFs are handled by the
stb-image crate and the distinction between alpha and non-alpha-supporting
images was missing.
Source-Repo: https://github.com/servo/servo
Source-Revision: 6593cf9ec498160c2b5bc096cc7ec3ff3a7479ee
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
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
This is a fix for bug #3219 . This patch allows the user to specify a disposiable hostfile using the `HOST_FILE` environment variable. Therefore, we can run tests on test servers without actually changing the system hostfile.
Source-Repo: https://github.com/servo/servo
Source-Revision: 237cdee9e462bc7b070d9fe1a7722ad961ff25c2
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
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.
Source-Repo: https://github.com/servo/servo
Source-Revision: 27e0f16407629422b5e047e067d458142372c97e
IntoString has been removed from Rust, and named() will take a String, so
there is no good reason to do otherwise here.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8df0ee2bb5d40e4b22db1666982e2e5ea36513f6
Notes:
* This adds `#![allow(missing_copy_implementations)]` to components/*/lib.rs. I'm not sure how to approach the missing Copy warnings (are there things for which Copy should NOT be implemented, and how can I tell?) so I stuck this in to make life easier when looking through the warnings. I can easily remove this if necessary.
* This leaves the following type of warnings, which I couldn't figure out how to approach (I'll investigate it later if no one else wants to).
```
css/matching.rs:72:23: 72:35 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:72 this_as_query.equiv(other)
^~~~~~~~~~~~
css/matching.rs:95:10: 95:49 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:95 impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
```
Source-Repo: https://github.com/servo/servo
Source-Revision: 0793137631cbe4ebbff8fb85639206ce8e41bbb7
In particular, this contains changes to qualify enums where rust will require it, and to stop using some features that will be removed.
Source-Repo: https://github.com/servo/servo
Source-Revision: ba8cf6b0e6145265f9472d4855f078d8b5943fe7
This prepares for the rust upgrade currently being conducted.
Source-Repo: https://github.com/servo/servo
Source-Revision: e8fac3681b690adb0796b2a807ac95bd9c13597a
This fixes race conditions whereby layout and script could be running
simultaneously.
r? @jdm
cc @cgaebel
Source-Repo: https://github.com/servo/servo
Source-Revision: 5f2684d2f81046abd7548fb22d996d1e506a104a
This is the Hyper pull request, plus the set up for OpenSSL on Android to make it merge.
Sean's commits have been reviewed in #4065 (My Android changes were reviewed by Glenn)
Source-Repo: https://github.com/servo/servo
Source-Revision: 6bd9bf979bcfa96ea14e666b59eab01a6d6c373e
Changes
* Implemented Storage Task
* Used Storage Task in methods of storage.rs
* Updated webstorage test expectations
Pending Changes:
* Handle Storage Event
* Throw QuotaExceededError in case of failure for method setItem
* localStorage as alias of sessionStorage
Source-Repo: https://github.com/servo/servo
Source-Revision: 0d2251510fb9ad8f4974c99cadafbd1a9a81e30f
Issue: #3144
This PR addresses the second step of the ticket. i.e. move from a 1:1 sniffer:request task model to a shared sniffer task.
Source-Repo: https://github.com/servo/servo
Source-Revision: 1ac79c64da4b14f83fed6ca123a81417b9c0fc87
Bad HTTP responses now have a 0 status code instead of 200 OK.
Source-Repo: https://github.com/servo/servo
Source-Revision: b56bab4e407b38fa1e58d8be247ecd5f156c89bc
Issue: #3144
We created a sniffer task in components/net/, added a call in resource_task load function to create a new sniffer task (sending all the data), and sniffer_task currently sends all the data back to resource_task.
The purpose of this request is to get feedback from @jdm on our progress before moving forward and writing tests.
Source-Repo: https://github.com/servo/servo
Source-Revision: 796258114b1d4681ca9dd9f745036f68535ecb56
During debugging, I found it useful to hook all task creation in a
central location, and util::task was the perfect place for it.
r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of
reviews today because I don't know who better to give them to)
Source-Repo: https://github.com/servo/servo
Source-Revision: ff06be91ebe770290ba912ee71a303810aa62cea
r? @pcwalton - Is this the kind of thing you were thinking of in terms of task queue?
Source-Repo: https://github.com/servo/servo
Source-Revision: 4795e9cf0ba8a9712e81c281e31ffd4cf34240f0
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.
I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.
This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.
At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 85b277655f07db1cb99c4d3dee93804735ed0470
When we want to use Servo binaries outside of their `target` build directory, `./resources` is what we’ll need to ship with them.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8312fde154768c4a5ce133a1aaaf1293529a5558
--HG--
rename : servo/tests/html/failure.html => servo/resources/failure.html
rename : servo/components/style/user-agent.css => servo/resources/user-agent.css