aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcollection.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Names should now be consistently atomsPatrick Shaughnessy2020-02-131-12/+16
|
* Fix some new warningsSimon Sapin2019-06-221-1/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-3/+6
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-11/+11
|
* Format script componentchansuke2018-09-191-40/+88
|
* Use specific negative assertion for DOM HTMLCollectionCYBAI2018-01-261-1/+1
|
* script: Remove HTMLAppletElement.Emilio Cobos Álvarez2017-11-061-0/+13
| | | | It was removed from the spec, there's no reason to keep it in tree.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+6
| | | | | | | | | | | | | | | | | | | | 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-23/+23
| | | | | | | 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 MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* order derivable traits listsClément DAVID2017-08-231-6/+6
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Auto merge of #17381 - cbrewster:custom_element_creation, r=jdmbors-servo2017-06-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Custom element creation <!-- Please describe your changes on the following line: --> This implements the CE-related steps when creating elements. `is` is now support by `document.createElement` and is stored on `Element`s. Only synchronously created autonomous elements are supported as async element creation and customized built-in elements both require custom element upgrade reactions. Spec: https://dom.spec.whatwg.org/#concept-create-element --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17191 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/17381) <!-- Reviewable:end -->
| * Allow element prefix to be setConnor Brewster2017-06-231-1/+1
| | | | | | | | | | Implements step 6.1.10 of https://dom.spec.whatwg.org/#concept-create-element
* | Replace iterator struct with anonymous return iterator types.Corey Farwell2017-06-231-30/+6
|/ | | | Similar to https://github.com/servo/servo/pull/17488.
* Classes/IDs case-sensitivity: get quirks mode from matching context.Simon Sapin2017-06-131-7/+3
|
* ID and class selectors are ASCII case-insensitive in quirks mode.Simon Sapin2017-06-121-2/+9
| | | | https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
* Upgrade to html5ever 0.16Simon Sapin2017-05-021-2/+2
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* 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.
* Make Element::prefix return an Option<&DOMString>Anthony Ramine2016-12-011-4/+4
|
* fix getElementsByTagName()Maciej Skrzypkowski2016-11-041-24/+36
|
* Auto merge of #14027 - frewsxcv:htmlcollection-iter-refactor, r=emiliobors-servo2016-11-031-10/+12
|\ | | | | | | | | | | | | | | Remove unnecessary `Box` around `HTMLCollectionElementsIter::node_iter`. <!-- 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/14027) <!-- Reviewable:end -->
| * Remove unnecessary `Box` around `HTMLCollectionElementsIter::node_iter`.Corey Farwell2016-11-021-10/+12
| |
* | Update to string-cache 0.3Simon Sapin2016-11-031-14/+15
|/
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-3/+3
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+1
|
* implement HTMLOptionsCollection and add related items to HTMLSelectElementAlexandrov Sergey2016-09-261-0/+3
|
* Use Option<T> to return from gettersAnthony Ramine2016-08-301-8/+4
| | | | | This removes the cumbersome &mut bool argument and offers overall a more readable code.
* Add DeleteRow methodGuillaume Gomez2016-07-271-1/+1
|
* Move util::str to styleAnthony Ramine2016-07-051-1/+1
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+2
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Move '&&' to the end of the previous line.Zbynek Winkler2016-04-221-2/+2
| | | | | | Following https://github.com/servo/servo/issues/10692 this is just a formating change to satisfy a new tidy requirement of not having '&&' at the beginning of a line.
* Remove `get_*` on getters as per RFC 0344.Corey Farwell2016-03-311-2/+2
| | | | | | https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis https://github.com/servo/servo/issues/6224
* Remove HTMLCollectionElementsRevIterKeith Yeung2016-03-191-25/+6
|
* Implement From<DOMString> for AtomAnthony Ramine2016-02-241-3/+3
|
* Inline functions HTMLCollection::get_length and get_itemSaurav Sachidanand2016-02-241-48/+40
|
* Fix HTMLCollection::NamedItemAnthony Ramine2016-02-231-2/+2
|
* Implement HTMLFormElement::ElementsCorey Farwell2016-01-101-1/+1
| | | | Fixes #8566
* Fix a bunch of clippy lintsJohannes Linke2016-01-021-4/+4
|
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-5/+5
| | | | | | | | | | | Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom.
* Caching HTMCollections.Alan Jeffrey2015-11-061-65/+187
| | | | | | | | | | | | | | | | | | We cache the state of any live HTMLCollection, keeping track of a) the optional cached length of the collection, and b) an optional cursor into the collection (a node in the collection plus its index). The cache is invalidated based on the version number of the node. We use these caches for speeding up random access to the collection. When returning coll[i], we search from the cursor, if it exists, and otherwise search from the front of the collection. In particular, both a forward for-loop and a backward for-loop through the collection will now have each access take O(1) time rather than O(n) time. This gets 1000x speed-up on the relevant Dromaeo DOM query tests.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-2/+2
|
* merge from masterrohan.prinja2015-11-031-1/+1
|\
| * Removed JS::root Fixes #8251nxnfufunezn2015-10-311-1/+1
| |