Commit graph

89 commits

Author SHA1 Message Date
bors-servo
7cea4eb01c Auto merge of #11225 - izgzhen:patch-input-element-file, r=Manishearth
Implement file related functionalities in htmlinputelement and related

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] These changes is related to #11131
- [x] These changes do not require tests because it is a partial implementation

1. Improve the `filemanager_thread` by adding type string and create `SelectedFile`
2. Fill several gaps in `htmlinputelement` implementation related to file type
3. Improve the `File` interface to accommodate the above changes
4. Integrate changes introduced by PR #11189

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11225)
<!-- Reviewable:end -->
2016-05-23 01:10:46 -07:00
Zhen Zhang
dd590d088b Implement file-type functionalities in htmlinputelement and related
Changes include:
- Implement file selection and other DOM behaviours in htmlinputelement
- Integrate IpcSender<FileManagerThreadMsg> into ResourceThreads
- Improve filemanager_thread, including adding type_string field to SelectedFile
- Improve interfaces in FileList/File/Blob to accommodate the above changes
2016-05-23 15:35:46 +08:00
bors-servo
1a34137ac4 Auto merge of #10961 - creativcoder:custom_response_iface, r=jdm
adding interface for custom responses

Fixes #10960

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10961)
<!-- Reviewable:end -->
2016-05-21 01:12:54 -07:00
Ms2ger
0071b45449 Remove the pointless StorageThread alias. 2016-05-20 13:11:36 +02:00
Rahul Sharma
3766cd1673 adding interface for custom responses 2016-05-20 12:11:56 +05:30
Zhen Zhang
a51db4cfa8 Implement trait-based ResourceThreads and clean up related naming issues
Changes include:

- Introduce an IpcSend trait to abstract over a collection of IpcSenders
- Implement ResourceThreads collection to abstract the resource-related
  sub threads across the component
- Rename original ResourceThread and ControlMsg into an unifed CoreResource__
  to accommodate above changes and avoid confusions
2016-05-20 08:00:16 +08:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
Zhen Zhang
c618ee21d0 add filemanager_thread 2016-05-11 15:14:03 +08:00
zakorgy
f679985090 Update dependencies 2016-05-03 11:36:33 +02:00
zakorgy
66fbc4ac46 requestDevice options (filters and optionalServices) 2016-05-03 11:35:18 +02:00
fokinv
9825ea41b4 Add Bluetooth IPC support 2016-05-03 10:17:41 +02:00
Corey Farwell
55c2f93740 Add NetworkError::LoadCancelled variant. 2016-04-27 00:25:27 -04:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
bors-servo
0a3a50a129 Auto merge of #10706 - zwn:unused-extern-crates, r=nox
Turn on unused-extern-crates warning.

As discussed in #9256. It should solve second half of the issue.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10706)
<!-- Reviewable:end -->
2016-04-22 13:40:38 -07:00
Zbynek Winkler
b021874ba0 Silence unused-extern-crates false positives.
Added #[allow(unused_extern_crates)] to silence false positives

 * bitflags, lazy_static and matches because macro_use
 * alloc_jemalloc because builtin crate

See https://github.com/rust-lang/rust/issues/30849
2016-04-22 22:20:05 +02:00
Ravi Shankar
5e6f32a59b Propagating the load errors from network loader 2016-04-20 12:38:35 -04:00
bors-servo
d1e8b79583 Auto merge of #10399 - jdm:pb, r=jdm
Private browsing - Initial steps

Rebase of #10160.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10399)
<!-- Reviewable:end -->
2016-04-05 17:41:11 +05:30
dhaval0603
af64a888e6 Private browsing - Initial steps 2016-04-04 15:22:38 -04:00
Dongie Agnir
0c69442a37 Set Content-Type in header 2016-04-01 16:15:56 -10:00
Ms2ger
e8db43ce50 Disallow unsafe code in net and net_traits. 2016-03-18 10:30:07 +01:00
Ms2ger
ec1f720662 Use lazy_static for HOST_TABLE.
This might change behaviour if the file is changed between Servo startup and
the moment HOST_TABLE is first accessed. I don't think we care.
2016-03-15 12:02:45 +01:00
Ulf Nilsson
8c07a1a3af Use piston_image instead of stb_image for decoding JPEGs
Bump image to 0.7
2016-03-02 09:13:49 +01:00
Paul Rouget
63519c3574 mozbrowsersercuritychange event 2016-02-09 08:05:17 +01:00
Anthony Ramine
cb5cd8d881 Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
James Sanders
d121958a17 Make closing related code more clear and more correct 2016-01-18 17:37:16 -07:00
Keith Yeung
a53661f6c8 Rename net/fetch/request.rs to net/fetch/methods.rs and move Request to net_traits 2016-01-18 00:57:19 -05:00
Ms2ger
86d3c576f2 Remove some unused extern crates. 2016-01-13 09:37:28 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Keith Yeung
05dc512055 Extract Response from net_traits/lib.rs 2016-01-06 09:45:22 -05:00
Nikki
af310f7874 minimal implementation of http_network_fetch for testing purposes 2016-01-05 12:14:07 -07:00
David Rajchenbach-Teller
1e81b8c133 Resolves #4183 - Implemementing context-based MIME type sniffing
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 .
2015-12-31 07:45:03 -05:00
Nikki
d30998c4a6 Partial implementation of HTTP-network-or-cache fetch step. 2015-12-29 16:37:11 -05:00
jmr0
7d0bede8ba adding initial support for websocket subprotocol negotation 2015-12-17 09:17:15 -05:00
Tetsuharu OHZEKI
e8c12c1c6d Fix warnings: Use Vec.extend_from_slice instead of Vec.push_all 2015-12-10 16:49:29 -05:00
Nova Fallen
e8c8277f34 move websocket creation to resource task 2015-12-08 02:04:40 -05:00
Jigesh Mehta
ce3c9ff57c implement support for withCredentials 2015-12-04 16:34:30 -05:00
bors-servo
dbff1ab336 Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
Ensure crate are alphabetically sorted

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692)
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
Guillaume Gomez
6e7de62b38 Add check up on extern crate order and sort extern crates alphabetically 2015-11-28 03:11:08 +01:00
bors-servo
a515fe320b Auto merge of #8516 - KiChjang:http-fetch-refactor, r=jdm
Refactor http_fetch to reflect the new standard

Partial #4576. The spec is really getting funky now - it's depending more and more on the DOM objects (e.g. prompting the user for authentication using a `Window` object). I think we can just pass in username and password as properties of the `Request` struct though.

I've also added in the async version for http_request.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8516)
<!-- Reviewable:end -->
2015-11-27 11:39:32 +05:30
Keith Yeung
7d3eb72a26 Refactor http_fetch to reflect the new standard 2015-11-26 17:12:19 -08:00
Simon Sapin
45ec900745 Remove dependency on regex_macros
This reduces the amount of code using unstable features that we depend on.
The hand-written IP address parser is probably just as fast.
2015-11-24 22:07:14 +01:00
Simon Sapin
0dfdc94cb2 Remove IPv6 subnet parsing in host files like ::1/64
The host replacement code doesn’t do anything useful with it.
(It only compares strings.)
2015-11-24 22:07:06 +01:00
Ravi Shankar
c4cf72db6e Added support for synchronization along with an unit test for cancellation listener 2015-11-12 14:04:38 +05:30
Ravi Shankar
10f5584f78 Implement cancellation listener for cancelling network requests 2015-11-12 14:02:59 +05:30
Eli Friedman
d5365dbe37 Delete dead function load_bytes_iter and related code. 2015-11-07 20:46:54 -08:00
Abhishek Kumar
b7de946205 Check in for task 1,4 and 5
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
2015-11-05 00:17:24 -05:00
Eli Friedman
c1aff0b678 Make AsyncResponseListener methods take &mut self. 2015-10-15 16:44:39 -07:00
Matt Brubeck
b649246fe2 Replace stb_image with PistonDevelopers/image
Fixes #3368
2015-10-09 12:23:33 -07:00
Matt Brubeck
584fb66e81 Remove unused import in net_traits 2015-09-30 10:00:57 -07:00
Ms2ger
49936b6ce7 Remove dead code from net_traits.
It was added in commit ecf02a3656.
2015-09-30 11:34:50 +02:00