aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/keyboardevent.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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-4/+4
| | | | | | | 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 DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | | 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.
* 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
|
* Mark JSTraceable and its method as unsafeAnthony Ramine2016-12-061-1/+1
|
* Make WebIDL constructors take a more specific global if possible (fixes #14071)Rohan Prinja2016-11-301-3/+2
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+3
|
* Introduce GlobalScope::as_windowAnthony Ramine2016-10-061-1/+2
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-1/+1
|
* Most of the code refactoring needed to be done is done with this commit.Arthur Marble2016-09-181-24/+24
|
* Make textinput handle actual key values. Don't restrict character values to ↵Josh Matthews2016-07-061-13/+8
| | | | a single byte.
* Associate logical and physical keypresses together to support non-QWERTY ↵Josh Matthews2016-07-051-19/+28
| | | | keyboards.
* Fix all the links to the UI Events specAnthony Ramine2016-06-041-5/+5
| | | | DOM3Events is no more.
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Removed unused importsPer Lundberg2016-05-151-1/+1
| | | | This fixes #11185.
* Spec says 'ContextMenu', not 'Menu'Manish Goregaokar2016-03-221-1/+1
|
* Update spec links for keyboardeventManish Goregaokar2016-03-221-2/+2
|
* Add support for navigation keysManish Goregaokar2016-03-221-0/+7
|
* Remove unused imports in scriptKishor Bhat2016-01-171-1/+0
|
* Make Event's isTrusted attribute unforgeableJohn DeSilva2015-12-131-0/+5
|
* Cleanup some unneeded let bindingsDavid Zbarsky2015-11-061-13/+9
|
* Use DOMString::new() somewhat consistently.Ms2ger2015-11-041-4/+3
|
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-2/+2
|
* merge from masterrohan.prinja2015-11-031-5/+6
|\
| * Remove JSTraceable implementation from RefCell.Eli Friedman2015-11-021-5/+6
| | | | | | | | | | The implementation wasn't really right, and we would rather just use DOMRefCell anyway.
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-3/+2
| |
* | more refactoringrohan.prinja2015-10-301-1/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|/
* Clean up the cast callsAnthony Ramine2015-10-211-4/+3
|
* Introduce trait CastableAnthony Ramine2015-10-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Generate all Derived implementations in codegenAnthony Ramine2015-10-141-9/+1
|
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-4/+5
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-4/+4
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Remove needless returnsManish Goregaokar2015-09-041-1/+1
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-15/+15
|
* Remove helper traitsAnthony Ramine2015-08-271-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make EventTypeId reflect DOM inheritance hierarchywilmoz2015-08-181-3/+3
|
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-0/+2
|
* Add spec linksBogdan Cuza2015-07-281-0/+13
|
* Remove some more unnecessary let bindingsDavid Zbarsky2015-07-141-6/+2
|
* Upgrade to SM 39Michael Wu2015-06-191-27/+29
|
* Change the dispatch in TextInput::handle_keydown_aux match on enum values ↵Avi Weinstock2015-05-061-174/+167
| | | | instead of strings.
* Heuristically create a Key value in KeyboardEvent::Constructor based on the ↵Avi Weinstock2015-05-061-1/+180
| | | | string provided.
* Made the clipboard-related functionality in TextInput more testable. Added ↵Avi Weinstock2015-05-061-379/+415
| | | | test_clipboard_paste to the "test-unit" suite.
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-1/+1
|
* 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
|