aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/image_cache_task.rs
Commit message (Collapse)AuthorAgeFilesLines
* task -> threadrohan.prinja2016-01-101-494/+0
|
* Resolves #4183 - Implemementing context-based MIME type sniffingDavid Rajchenbach-Teller2015-12-311-2/+3
| | | | | The version of the standard is not finalized at the time of this writing. Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
* Fix warnings: Use Vec.extend_from_slice instead of Vec.push_allTetsuharu OHZEKI2015-12-101-1/+1
|
* Use the correct .png extension for the image placeholder.Ralph Giles2015-11-131-1/+1
| | | | | | This was changed to the mozilla broken image resource without changing the filename, even though the file type changed.
* Auto merge of #7844 - Wafflespeanut:requests, r=jdmbors-servo2015-11-121-1/+2
|\ | | | | | | | | | | | | | | | | | | Cancelable network requests! fixes #4974 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7844) <!-- Reviewable:end -->
| * Implement cancellation listener for cancelling network requestsRavi Shankar2015-11-121-1/+2
| |
* | replace use of load_whole_resource in net/image_cache_task.rs with File::openrohan.prinja2015-11-101-20/+12
|/ | | | don't ignore read_to_end's return value
* Check in for task 1,4 and 5Abhishek Kumar2015-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | Adding pipelineID to httpresponse message, clearner code for task1 Commit for Refactored task Unit tests Removing extra whitespaces. Removing extra whitespaces. Removing tabs whitespaces Making Code tidier. Style issues Fix Test-tidy Fixes
* Rework image_cache_task to avoid using `url` as key during the loading of an ↵David Rajchenbach-Teller2015-10-141-41/+151
| | | | | | image. A `url` can be very large, in particular if it is a data: url, so using it as a key for lookups whenever we load a few bytes is not a very good idea. This patch introduces an intermediate `LoadKey` (internally, an u64) that makes hashmap lookups faster. Somewhere along the way, we also get rid of a few calls to `url.clone()`.
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+3
|
* sort all usesJohann Tuffe2015-08-201-4/+4
|
* Replace uses of `for foo in bar.iter()`,João Oliveira2015-08-181-1/+1
| | | | | and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
* replace .len() == 0 with is_empty()João Oliveira2015-08-141-2/+1
| | | | closes #7198
* script: Make the resource task communication use IPC channels.Patrick Walton2015-07-311-29/+14
|
* net: Use a thread for each `AsyncResponseTarget` to avoid having to sendPatrick Walton2015-07-311-7/+17
| | | | trait objects across process boundaries.
* net: Make most of the resource task messages serializable.Patrick Walton2015-07-311-2/+2
|
* script: Make the `ImageCacheTask` use IPC.Patrick Walton2015-07-261-7/+12
| | | | | This necessitated getting rid of the boxed trait object that was being be passed between the script task and the image cache task.
* Audit and reduce unstable usage in netManish Goregaokar2015-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | Reasons behind existing unstable features: std_misc: - `Handle` usage (API will be replaced and is perhaps broken) path_ext: - Checking if a file exists. This is doable from the File directly, but slightly longer core: - `FnBox` alloc: - `boxed::into_raw()` (naming)
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-1/+2
| | | | Part of https://github.com/servo/servo/issues/6041
* net: Don't load the placeholder image for background images, only forPatrick Walton2015-05-201-16/+38
| | | | | | | | | | | | image fragments. This also changes the way the placeholder is handled in the image cache task to decode it up front instead of each time an image fails to load, both because it was more convenient to implement that way and because it saves CPU cycles to do so. This matches the behavior of Gecko and WebKit. It improves the look of our cached copy of Wikipedia.
* Auto merge of #5985 - zmike:embedding-woodenbikeshed, r=larsbergstrombors-servo2015-05-081-6/+13
|\ | | | | | | | | | | | | | | | | | | Some small changes. @larsbergstrom or whoever cares the most at this exact moment. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5985) <!-- Reviewable:end -->
| * image_cache_task::new_image_cache_task() should not panic when placeholder ↵Mike Blumenkrantz2015-05-081-6/+13
| | | | | | | | | | | | fails to load now we just print a message and continue
* | This was done already on #5783, maybe was reintroduced by mistake.Adenilson Cavalcanti2015-05-081-1/+0
|/
* 1. Add an Option<Pipeline_id> field to the LoadData struct, and a ↵Himaja2015-05-051-1/+1
| | | | | | corresponding parameter to LoadData::new() 2. Change addEvent in the NetworkEventActor to add_request and add_response
* Remove some as_slice calls.Ms2ger2015-04-241-2/+2
|
* Refactored image cache task - details below.Glenn Watson2015-04-231-330/+283
| | | | | | | | | | | | | | | | | | | | * 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.
* Using FF broken image icon.Adenilson Cavalcanti2015-04-211-1/+0
| | | | | Got it from: https://mxr.mozilla.org/mozilla-central/source/layout/generic/broken-image.png
* Make minor syntax simplification to address review.Aneesh Agrawal2015-04-131-1/+1
|
* Switch Arc<Box<Image>> to Arc<Image> for perf boost.Aneesh Agrawal2015-04-101-3/+3
| | | | | Image used to be a trait, but no longer is, so boxing it is no longer necessary.
* Remove compositor dependency on net crate.Aneesh Agrawal2015-04-101-12/+0
| | | | Move the ImageCacheTaskClient trait and impl to net_traits. Fixes #5551.
* Move net::{data_loader,image_cache_task} unit tests into the unit_tests crate.Simon Sapin2015-04-081-575/+0
|
* Fix unit tests.Josh Matthews2015-04-071-20/+4
|
* Split out shared networking code into net_traits crateGilles Leblanc2015-04-031-179/+132
| | | | Fixes #4476
* Load a placeholder when a url to an image is broken.Adenilson Cavalcanti2015-03-301-26/+68
| | | | | | | | | | I decided to use the old Netscape broken image link icon (later we may replace the image asset for something more trendier). The ref test will expect that a failed load should display the rippy image. ImageCacheTask users can define if a placeholder image should be loaded at start up or not. This enables both the new behavior (e.g. always return an image even for broken urls) as also the previous one.
* Rename lots of profiling-related things.Nicholas Nethercote2015-03-251-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ BEFORE AFTER ------------------------------------------------------------------------ util::memory util::mem - heap_size_of - heap_size_of (unchanged) - SizeOf - HeapSizeOf - size_of_excluding_self - heap_size_of_children prof::mem prof::mem - MemoryProfilerChan - ProfilerChan - MemoryReport - Report - MemoryReportsChan - ReportsChan - MemoryReporter - Reporter - MemoryProfilerMsg - ProfilerMsg - {R,UnR}egisterMemoryReporter - {R,UnR}egisterReporter - MemoryProfiler - Prof - ReportsForest - ReportsForest (unchanged) - ReportsTree - ReportsTree (unchanged) - SystemMemoryReporter - SystemReporter prof::time prof::time - TimeProfilerChan - ProfilerChan - TimerMetadata - TimerMetadata (unchanged) - Formatable - Formattable [spelling!] - TimeProfilerMsg - ProfilerMsg - TimeProfilerCategory - ProfilerCategory - TimeProfilerBuckets - ProfilerBuckets - TimeProfiler - Profiler - TimerMetadataFrameType - TimerMetadataFrameType (unchanged) - TimerMetadataReflowType - TimerMetadataReflowType (unchanged) - ProfilerMetadata - ProfilerMetadata (unchanged) In a few places both prof::time and prof::mem are used, and so module-qualification is needed to avoid overlap, e.g. time::Profiler and mem::Profiler. Likewise with std::mem and prof::mem. This is not a big deal.
* Move profiler code from `util` into a new crate `profile`.Nicholas Nethercote2015-03-241-5/+5
| | | | | | | | | - 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.
* Update some code that's feature-gated under core.Ms2ger2015-03-211-2/+2
|
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-5/+5
|
* Add profiling to image decoding.Ankit Agrawal2015-02-281-20/+36
| | | | | This extracts some independently useful parts of <https://github.com/servo/servo/pull/4215>.
* Differentiate between HTTP and non-HTTP APIs for cookie operations. Fix some ↵Josh Matthews2015-02-041-28/+7
| | | | incorrect cookie removal operation logic. Order the returned cookies according to the spec. Make cookie unit tests pass.
* cookies and cookies storage implementationShamir Khodzha2015-02-041-4/+27
|
* add `unwrap` to `send/recv` callsAlexandru Cojocaru2015-02-031-11/+11
|
* Import the util crate as util rather than servo_util.Ms2ger2015-01-291-3/+3
| | | | | | | | 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.
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-87/+81
|
* Pass a String to spawn_named.Ms2ger2015-01-211-4/+5
| | | | | IntoString has been removed from Rust, and named() will take a String, so there is no good reason to do otherwise here.
* Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.Ms2ger2015-01-081-1/+1
|
* Don't qualify Ok/Err in image_cache_task.Ms2ger2015-01-041-3/+2
|
* Fix obsolete format traits.Ms2ger2015-01-021-4/+4
| | | | They are to be removed from the language in the next rust upgrade.
* net: Remove glob imports added in #4405Tetsuharu OHZEKI2014-12-191-97/+94
|
* Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.Ms2ger2014-12-171-40/+49
|