aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/treewalker.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update nightly rustc.Josh Matthews2021-11-011-3/+3
|
* Reformat with rustfmt 1.4.36-nightly (7de6968 2021-02-07)Simon Sapin2021-02-251-1/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Fix new warningsSimon Sapin2019-01-041-3/+0
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-4/+4
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-11/+11
|
* Format script componentchansuke2018-09-191-78/+87
|
* Auto merge of #18255 - CYBAI:prevent-reentrancy-pr18218, r=jdmbors-servo2017-10-211-12/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update concept of node filter algorithm Implement new [filter](https://dom.spec.whatwg.org/#concept-node-filter) algorithm from specification --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #18218 (github issue number if applicable). - [X] These changes do not require tests because changes are minimal and the error was triggered by a test <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18255) <!-- Reviewable:end -->
| * Update concept of node filter algorithmCYBAI2017-10-191-12/+23
| |
* | Use try syntax for Option where appropriateMatt Brubeck2017-10-201-7/+3
|/
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* 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-24/+24
| | | | | | | 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 MutJS<T> to MutDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-8/+8
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-2/+1
|
* Untry scriptSimon Sapin2017-06-181-8/+8
|
* Fix indentation errors in servo rust code that tidy now finds.coalman2017-04-181-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* replace match by if let statements if possibleJulien Levesy2016-12-311-6/+3
|
* Update Rust to 1.15.0-nightly (71c06a56a 2016-12-18)Ms2ger2016-12-221-3/+0
|
* Remove HeapGCValueAnthony Ramine2016-12-121-3/+3
| | | | | | 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.
* Remove extra spaces in function calls and declarationsDaan Sprenkels2016-10-311-1/+1
|
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-25/+25
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+1
|
* Reorder `use` statementsUK9922016-09-091-1/+1
|
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-3/+3
|
* merge from masterrohan.prinja2015-11-031-1/+1
|\
| * Removed JS::root Fixes #8251nxnfufunezn2015-10-311-1/+1
| |
* | more refactoringrohan.prinja2015-10-301-1/+1
|/
* Return a reference in Document::window()Anthony Ramine2015-10-191-2/+1
|
* Fix remaining MutHeap methods not to expose JS<T>.Eli Friedman2015-10-151-16/+16
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-13/+13
|
* Remove helper traitsAnthony Ramine2015-08-271-27/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-0/+1
| | | | closes #7357
* sort all usesJohann Tuffe2015-08-201-3/+3
|
* Cleanup NodeIterator, Range, ServoHTMLParser, TextEncoder, URLHelper, URL, ↵Manish Goregaokar2015-08-181-7/+7
| | | | VirtualMethods
* Cleanup treewalkerManish Goregaokar2015-08-181-36/+20
|
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-1/+1
| | | | fixes #6524
* Update 'traverse children' to the latest spec.Ms2ger2015-06-231-5/+5
|
* Upgrade to SM 39Michael Wu2015-06-191-165/+158
|
* Remove helpers that correspond to DOM methodsAnthony Ramine2015-05-041-199/+153
|
* Remove Temporary::new()Anthony Ramine2015-04-281-2/+2
| | | | Temporary::from_rooted() now takes an Assignable value.
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+2
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Fix some irregular indentation.Mátyás Mustoha2015-04-221-11/+11
|
* Update WHATWG links to use HTTPSCorey Farwell2015-04-131-12/+12
| | | | | | | | | | | | | | Extracted this out of #5649 This commit was created with the following commands: ``` find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g' ``` ``` find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g' ```
* Use NodeFilterConstants from NodeFilterBindingChris Paris2015-04-131-25/+1
|
* Stop using int/uint in script.Ms2ger2015-04-031-1/+1
|