aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filereadersync.rs
Commit message (Collapse)AuthorAgeFilesLines
* `cargo fix --edition`Simon Sapin2018-11-061-9/+9
|
* Assert that DOM structs have the correct first fieldManish Goregaokar2018-07-031-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM structs embed their parent type as their first field. This introduces a `.parent()` method to the DOM struct that returns its first field, and codegens a type assert that ensures that `.parent()` returns the parent struct. This generates: On `#[dom_struct]`: ```rust impl HasParent for Type { type Parent = ParentType; fn as_parent(&self) -> ParentType { &self.first_field } } ``` In the codegen files: ```rust impl Type { fn __assert_parent_type(&self) { let _: &ParentType = self.as_parent(); } } ````
* Implement read methods on FileReaderSyncJonas Reinwald2018-06-041-5/+81
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+2
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-4/+3
|
* Add FileReaderSync skeletonZhen Zhang2016-07-311-0/+34