Zhen Zhang
aea99e081b
Refactor FileAPI implementation
2016-07-13 12:12:32 +08:00
Zhen Zhang
0ff6f313e8
Add FileID validity setting/checking logic to Blob URL implementation
2016-07-11 10:51:55 +08:00
Zhen Zhang
ab14777312
Remove DataSlice, fix #12249
2016-07-05 17:51:53 +08:00
Zhen Zhang
14d68968ed
Integration and improvements of File API backends
...
1. More complete origin check in FileManagerThreadMsg
2. Add reference counting logic to file manage store and script API
3. Integrate the support of slicing
2016-07-04 23:02:03 +08:00
Achal Shah
af325a9a3a
Update Blob::{new, new_inherited} to take Strings
2016-06-17 07:43:11 -07:00
Zhen Zhang
f8fa9aaf42
Add unit testing to file manager; Replace uuid by stringified version in FileManagerThreadMsg
2016-06-10 02:20:52 +08:00
Zhen Zhang
43ad4ba585
Add file backend support for Blob and related
...
Changes include:
- Add BlobImpl to Blob, and related caching mechanism
- Expose ResourceThreads to document_loader, workerglobalscope, worker, and global
- Fix encode_multipart_form_data
- Other small fixes to accommodate the above changes
2016-06-01 09:47:07 +08:00
Josh Matthews
3cb8af20c2
Remove empty lines following braces.
2016-05-27 13:32:05 -04:00
Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Per Lundberg
2f7ed1d73e
Removed unused imports
...
This fixes #11185 .
2016-05-15 22:24:26 +03:00
Zhen Zhang
87fec3e026
Implement missing interfaces of File DOM object
2016-05-11 22:35:21 +08:00
Zhen Zhang
f43009333f
Rewrite Blob constructor interface
2016-05-10 20:19:10 +08:00
Zhen Zhang
e0f3cdafe1
Fixes related to file input and File API
2016-05-02 12:52:28 +08:00
Yoav Alon
711c23ae39
updated Blob constructor to use optional, fixes https://github.com/servo/servo/issues/10779
2016-04-22 01:28:35 +03:00
Ms2ger
03d4bacc05
Use num-traits in script.
2016-04-20 15:23:43 +02:00
St.Spyder
34726d8b9e
Implementation of Blob Constructor with test changes
2016-03-17 23:47:12 +05:30
Saurav Sachidanand
663e42bdbd
Convert directly from DOMString to Vec<u8>
2016-03-11 23:38:16 +05:30
Chad Kimes
ce6075825d
Add global default method for Reflectable trait
2016-01-11 20:23:47 -05:00
Chad Kimes
5e3bbdcafb
Remove global field from Blob
2016-01-10 21:20:31 -05:00
David Raifaizen
76f689cd06
Changed blob to use DataSlice with Arc in order to limit wasteful copying of byte vector
2016-01-06 19:41:52 -05:00
Brandon Fairchild
b5e121a312
Update FileAPI spec links
...
The links in components/script/dom/blob.rs were pointing
to the old location.
Fixes #9157 .
2016-01-05 15:48:30 -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
Ms2ger
0c61be7a57
Rustfmt some of script.
2015-11-18 11:14:05 +01:00
Alan Jeffrey
84bde75b42
Replaced DOMString constructor by conversion functions.
...
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
bors-servo
021f441d24
Auto merge of #8218 - nikkisquared:master, r=eefriedman
...
I'm working on resolving https://github.com/servo/servo/issues/8213 as per the spec online and feedback in the servo channel. Note that currently I cannot build (and thus test) my code, so this is a bit of a rough first draft. I'd still like feedback on my progress, and I hope that there is another way for my code to be tested.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8218 )
<!-- Reviewable:end -->
2015-11-05 10:24:27 +05:30
Nikki
1d280289f1
Fixes #8213 : Implement Blob variant of WebSocket.send()
2015-11-04 21:42:10 -07:00
Ms2ger
6b75078503
Make DOMString a newtype around String, rather than a typedef.
...
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
Ms2ger
e6aa976462
Use DOMString::new() somewhat consistently.
2015-11-04 12:09:10 +01:00
rohan.prinja
45224028db
more refactoring
2015-10-30 20:26:29 +09:00
Anthony Ramine
617fc08783
Generate all Derived implementations in codegen
2015-10-14 22:04:20 +02:00
Anthony Ramine
aab2c40389
Generate the TypeId enums in codegen
2015-10-14 18:45:35 +02:00
Ravi Shankar
889eec364b
sorted the extern crate, mod & use declarations
2015-09-24 02:12:45 +05:30
Manish Goregaokar
e94df1ed5c
Remove needless returns
2015-09-04 09:13:48 +05:30
Anthony Ramine
105d990845
Replace many uses of to_ascii_lowercase() by make_ascii_lowercase()
2015-08-30 15:30:00 +02:00
Corey Farwell
5ccb0d43ef
Merge adjacent identical impl
sections
...
Prior to #7416 and #7401 , many of these `impl` sections were not
identical
2015-08-28 10:30:42 -04:00
Anthony Ramine
709d347872
Make the traits for the IDL interfaces take &self
2015-08-27 22:27:43 +02:00
Anthony Ramine
c831c2c0a5
Remove helper traits
...
Now that JSRef<T> is gone, there is no need to have helper traits.
On components/script/*.rs:
# Remove imports.
/^ *use dom::[a-z]+::\{.*Helpers/ {
s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/
s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g
s/\{([a-zA-Z]+)\}/\1/
/\{\}/d
s/::self;$/;/
}
/^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d
On components/script/dom/*.rs:
# Ignore layout things.
/^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; }
# Delete helpers traits.
/^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D
# Patch private helpers.
/^impl.*Private.*Helpers/,/^\}$/ {
s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
# Patch public helpers.
/^impl.*Helpers/,/^\}$/ {
s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/
/^ *(unsafe )?fn .*\(self.*[<&]'a/ {
s/&'a /\&/g
s/<'a, /</g
}
/^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/
/^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/
}
The few error cases were then fixed by hand.
2015-08-27 16:59:02 +02:00
João Oliveira
fd87c8cb3e
make dom_struct derive HeapSizeOf,
...
closes #7357
2015-08-27 01:17:48 +01:00
Johann Tuffe
ec07178b6f
sort all uses
2015-08-20 20:47:12 +08:00
Josh Matthews
8bb853f643
Fix existing syntactics nits.
2015-08-16 10:30:43 -04:00
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
farodin91
5921af4c49
Refactor FileReader #6762 #6763 #6750 #6751
2015-07-29 14:18:59 +02:00
farodin91
20f99e92d8
Adding for support Blob.{close,isClose} #6723
2015-07-29 09:54:08 +02:00
Bogdan Cuza
233a769c67
Add spec links
2015-07-28 13:28:41 +02:00
Michael Howell
572616605a
Use empty Vec instead of None.
2015-07-26 13:58:29 -07:00
farodin91
27e760e28d
Implement FileReader.{readAsText,readAsDataUrl}. Fixes #6172
2015-07-23 22:33:51 +02:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Simon Sapin
ef8edd4e87
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
2015-05-05 10:07:34 -04:00