Anthony Ramine
577370746e
Rename DOMRefCell<T> to DomRefCell<T>
...
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
2017-09-26 09:49:08 +02:00
Anthony Ramine
c52fd0a780
Rename MutNullableJS<T> to MutNullableDom<T>
2017-09-26 09:49:02 +02:00
Anthony Ramine
0e3c54c191
Rename dom::bindings::js to dom::bindings::root
2017-09-26 02:19:05 +02:00
Josh Matthews
77b3e911c1
Remove almost all uses of Heap::new.
2017-09-25 16:11:49 -04:00
Josh Matthews
da65698c5c
Be more conservative about safety of dictionary and union values.
...
Mark dictionaries containing GC values as must_root, and wrap them in
RootedTraceableBox in automatically-generated APIs. To accommodate
union variants that are now flagged as unsafe, add RootedTraceableBox
to union variants that need to be rooted, rather than wrapping the
entire union value.
2017-09-25 16:10:58 -04:00
Anthony Ramine
6c9fb5ae7a
Introduce TaskOnce
...
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
2017-09-20 10:37:09 +02:00
Anthony Ramine
46628fba05
Move Task to its own module
2017-09-18 02:47:04 +02:00
Anthony Ramine
4a39631eaf
Remove FileReadingRunnable
2017-09-16 15:43:31 +02:00
Anthony Ramine
56117d3185
Rename Runnable to Task
...
The changes are:
* `*Runnable` -> `*Task`;
* `RunnableMsg` -> `Task`;
* `RunnableWrapper` -> `TaskCanceller`;
* `MainThreadRunnable` -> `MainThreadTask`;
* `wrap_runnable` -> `wrap_task`;
* `get_runnable_wrapper` -> `task_canceller`;
* `handler` -> `run`;
* `main_thread_handler` -> `run_with_script_thread`.
2017-09-16 15:43:26 +02:00
Anthony Ramine
7875fea6cf
Use absolute paths in the event handlers macros
2017-09-01 11:54:09 +02:00
Clément DAVID
c5fe235112
order derivable traits lists
...
Ignoring :
- **generated**.rs
- python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Anthony Ramine
0ed4df28b5
Replace use of rustc_serialize::base64 by base64
2017-03-26 14:15:31 +02:00
Charles Vandevoorde
44e05e224c
Remove support for Blob::{close, isClosed}
2017-02-28 17:20:16 +01:00
Anthony Ramine
31e9d81c0f
Make #[dom_struct] a proc_macro attribute
2017-02-24 01:50:51 +01:00
Ms2ger
8ce9ca6243
Use Heap for dictionary and union members.
2017-02-16 11:03:21 +01:00
Ms2ger
67c572af37
Update js.
...
Fixes #15553 .
2017-02-15 16:27:29 +01:00
Ms2ger
2c7c8fd2be
Use an ArrayBuffer to implement readAsArrayBuffer.
2017-01-19 15:41:16 +01:00
Alan Jeffrey
9be4fd56ce
Removed util.
2016-12-14 18:04:37 -06:00
Anthony Ramine
1327ebd52f
Remove HeapGCValue
...
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Corey Farwell
449f6337d4
Rename Reflectable
to DomObject
.
...
Fixes https://github.com/servo/servo/issues/8473 .
2016-12-08 08:50:35 -10:00
Abelardo E. Mendoza
b372e7c98f
script creates methods taking '*mut JSContext' unsafe
...
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01:00
Simon Sapin
53b638c0e2
Update to string-cache 0.3
2016-11-03 16:23:05 +01:00
Ms2ger
558afe1786
Update js.
2016-11-02 13:25:49 +01:00
Nikhil Shagrithaya
51ef05bf3d
Implemented FileReader::readAsArrayBuffer
2016-11-01 00:25:26 +05:30
Anthony Ramine
d8e92bb271
Rename Reflectable::global_scope to global
2016-10-06 21:36:41 +02:00
Anthony Ramine
907781eb75
Remove Reflectable::global
2016-10-06 21:35:58 +02:00
Anthony Ramine
e7a1149984
Introduce GlobalScope::file_reading_task_source
2016-10-06 21:35:57 +02:00
Anthony Ramine
514819f37a
Introduce GlobalScope::get_runnable_wrapper
2016-10-06 21:35:51 +02:00
Anthony Ramine
19108aa330
Pass a &GlobalScope to WebIDL static methods and constructors
2016-10-06 21:35:49 +02:00
Anthony Ramine
ae6af5172b
Introduce Reflectable::global_scope
2016-10-06 21:35:38 +02:00
Anthony Ramine
fcb59d3057
Make reflect_dom_object take a &GlobalScope
2016-10-06 20:59:09 +02:00
Keith Yeung
aa5f34fcd9
Implement file reading task source
...
And remove superfluous FileReaderEvent enum
2016-07-14 13:27:42 -04:00
Nikhil Shagrithaya
48fe15206e
Implements name method for FilerReader event from trait Runnable
2016-07-10 15:40:22 +05:30
Zhen Zhang
ab14777312
Remove DataSlice, fix #12249
2016-07-05 17:51:53 +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
Keith Yeung
33acb1937c
Remove extraneous script_chan parameter from Trusted::new
2016-04-28 10:52:44 +02:00
Rahul Sharma
2caa9a2a76
refactors entities from script_thread into script_runtime
2016-04-06 12:46:49 +05:30
Kamil Muszyński
c6dfd7e2fa
Issue #9561 continued - renamed *_thread_source to *_task_source in global.rs and related files
2016-02-17 21:25:12 +01:00
Chad Kimes
ce6075825d
Add global default method for Reflectable trait
2016-01-11 20:23:47 -05:00
Chad Kimes
efaf4cdeca
Remove global field from FileReader
2016-01-10 22:45:31 -05:00
rohan.prinja
1f02c4ebbb
task -> thread
2016-01-10 17:58:13 +09: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
Arthur Skobara
8acb21a594
Remove from Trusted::new an unnecessary argument
2015-12-12 22:31:19 +06:00
Corey Farwell
4accaf50b2
Pass around event types as Atoms instead of Strings
...
`Event` internally stores the `type` as an `Atom`, and we're `String`s
everywhere, which can cause unnecessary allocations to occur since
they'll end up as `Atom`s anyways.
2015-12-10 23:47:25 -05:00
Keith Yeung
8d90034d29
Split fn script_chan into 5 different task channel fn
2015-12-06 12:12:14 -08: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
Alan Jeffrey
582273eb07
Replaced DOMString by String in filereader.
2015-11-12 17:52:58 -06: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