aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domtokenlist.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-9/+9
|
* Remove AttributeHandlersAnthony Ramine2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On components/script/*.rs: # Remove imports. /^ *use dom::element::\{.*AttributeHandlers/ { s/\{AttributeHandlers, /\{/ s/, AttributeHandlers//g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::element::\{?AttributeHandlers\}?;$/d # Remove AttributeHandlers. /^pub trait AttributeHandlers \{$/,/^\}$/D # Patch AttributeHandlers methods. /^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ { s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/ /^ *fn /s/\(self([,)])/\(\&self\1/ /^ *fn.*\(&self/s/fn/pub fn/ } The few error cases were then fixed by hand.
* Remove helper traitsAnthony Ramine2015-08-271-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | closes #7357
* sort all usesJohann Tuffe2015-08-201-2/+2
|
* Replace uses of `for foo in bar.iter()` and `for foo in bar.iter_mut()`João Oliveira2015-08-151-2/+2
| | | | closes #7197
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-0/+1
|
* Add spec linksBogdan Cuza2015-07-281-6/+7
|
* Create and utilize utility for joining strsCorey Farwell2015-07-081-6/+2
|
* Join tokens when stringifying DOMTokenListCorey Farwell2015-07-081-1/+6
| | | | | | | | Previous, it would return the original String straight from the AttrValue, which might contain extraaneous whitespace. The spec specifies to just join the tokens together with \x20 https://dom.spec.whatwg.org/#stringification-behavior
* Remove some redundant let bindingsDavid Zbarsky2015-07-041-12/+7
|
* Upgrade to SM 39Michael Wu2015-06-191-12/+12
|
* Implement trivial stringifiersAnthony Ramine2015-04-291-0/+5
|
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+1
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Remove as_slice() calls from script.Ms2ger2015-04-261-1/+1
|
* Update WHATWG links to use HTTPSCorey Farwell2015-04-131-4/+4
| | | | | | | | | | | | | | 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' ```
* Make Element::get_attribute() take its namespace by referenceAnthony Ramine2015-04-061-1/+1
|
* Remove some unnecessary uses of `as_slice`Corey Farwell2015-03-291-4/+4
| | | | | | | | | | | For the majority of these cases, `as_slice` can be removed due to `Deref`. In particular, `Deref` for: * `String` -> `str` * `Atom` -> `str` The latter of those two requires, a bump of the locked `string-cache` library
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-10/+19
|
* Replace uint/int by usize/isize in various places.Ms2ger2015-02-201-1/+1
|
* Import the util crate as util rather than servo_util.Ms2ger2015-01-291-1/+1
| | | | | | | | This used to conflict with the util crate from the standard library, which has long since been removed. The import in layout has not been changed because of a conflict with the util mod there.
* Don't shadow lifetimes in script.Ms2ger2015-01-281-2/+2
|
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-1/+1
|
* Move to to_owned rather than into_string.Ms2ger2015-01-201-1/+3
| | | | into_string has been removed from Rust.
* Replace Root::deref() calls by Root::r() calls where possible.Ms2ger2015-01-011-12/+13
| | | | This changes those calls that were already sound.
* auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallisterbors-servo2014-12-271-7/+1
|\ | | | | | | | | | | Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector. A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
| * Remove extra spacesManish Goregaokar2014-12-271-1/+0
| | | | | | | | Command: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/}\\n\\n\\n/}\\n\\n/"`
| * Remove manual impls of Reflectors (autogen)Manish Goregaokar2014-12-271-6/+1
| | | | | | | | | | | | | | | | | | Obtained via: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"` `find . -maxdepth 1 -type f -print0 |xargs -0 grep -lZ dom_struct | xargs -0 grep -LZ "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"` followed by semi-automated removal of leftover imports
* | script: to_string() -> into_string()Manish Goregaokar2014-12-271-1/+1
| |
* | Implement DOMTokenList.toggleBruno de Oliveira Abinader2014-12-261-0/+25
| |
* | Implement DOMTokenList.removeBruno de Oliveira Abinader2014-12-261-0/+14
| |
* | Implement DOMTokenList.addBruno de Oliveira Abinader2014-12-261-0/+14
| |
* | DOMTokenList::check_token_exceptions now returns an AtomBruno de Oliveira Abinader2014-12-261-11/+11
|/
* script: Remove glob imports added in #4405Tetsuharu OHZEKI2014-12-191-2/+2
|
* Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.Ms2ger2014-12-171-1/+2
|
* Updated reflect_dom_object to be passed by valueMichael Booth2014-11-301-1/+1
|
* Panic if DOMTokenList#contains is called for an unparsed attribute.Ms2ger2014-11-241-2/+5
| | | | | | | | Previously, if the attribute was not parsed into a token list, and the tokens() method returned None, DOMTokenList#contains would silently return false. This issue was encountered in <https://github.com/servo/servo/pull/4076> and took quite some time to figure out.
* Use #[dom_struct] everywhereManish Goregaokar2014-10-161-3/+1
|
* script: Use atom comparison in more places, especially for attributes.Patrick Walton2014-10-141-12/+11
| | | | 75% improvement in style recalc for Guardians of the Galaxy.
* Simple privatizationsTim Taubert2014-10-131-0/+1
|
* Remove unnecessary `deref()`s (fixes #3586)Tim Taubert2014-10-091-1/+1
|
* Use string-cache's Namespace typeKeegan McAllister2014-09-291-2/+1
|
* Eliminate servo_util::atomKeegan McAllister2014-09-291-1/+1
| | | | We only needed this for Encodable, and now we use JSTraceable instead.
* Made some DOM fields private.ProgramFOX2014-09-261-1/+1
| | | | Relevant to #2242.
* Use JSTraceable everywhereManish Goregaokar2014-09-241-1/+1
|
* Convert various helper traits from &JSRef to JSRefCameron Zwarich2014-09-201-4/+4
| | | | | | | | | | | | | | | I converted them all with a few exceptions: - Methods that were used by trait objects, since trait objects don't work with `self` methods. - Methods that take an &'b JSRef<'a, T> and return an &'b. In reality, many (all?) could return an &'a instead, but this isn't allowed by the Deref trait. - Methods that internally rely on the same issue with Deref. - I left out the traits involved in layout entirely, even though not all of their methods suffer from one of the above problems. There will probably be solutions to all of these problems in the future.
* More progress in the &JSRef -> JSRef conversionCameron Zwarich2014-09-201-4/+4
| | | | | Change all of the <Class>Methods traits to take `self` instead of `&self`.
* First steps of &JSRef -> JSRef conversionCameron Zwarich2014-09-191-2/+2
| | | | | | | | | Replace &JSRef with JSRef in the bulk of the generated code. This will remove a level of indirection throughout all DOM code. This patch doesn't change methods implemented on JSRef<T> to take `self` rather than `&self`, and it leaves a few other uses of &JSRef, but those changes can be made incrementally.
* Revert "script: Use atom comparison in more places, especially for ↵Josh Matthews2014-09-181-11/+10
| | | | | | attributes." for persistent test failures. This reverts commit 874db261046d6155b1942efa106d2e0014295d6d.
* script: Use atom comparison in more places, especially for attributes.Patrick Walton2014-09-171-10/+11
| | | | 75% improvement in style recalc for Guardians of the Galaxy.