aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/customevent.rs
Commit message (Collapse)AuthorAgeFilesLines
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-6/+6
| | | | | * strict imports formatting * Reformat all imports
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Formatting.Josh Matthews2023-05-281-1/+4
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-4/+13
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-5/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-1/+1
|
* Convert CGTraitInterface to use safe JSContext instead of raw JSContextmarmeladema2019-07-241-6/+5
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-11/+11
|
* Format script componentchansuke2018-09-191-29/+39
|
* Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393Marcin Mielniczuk2018-03-281-1/+2
|
* 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-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 dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* removing mutHeapJs referencesSendilKumar N2017-03-071-4/+4
| | | | changes as per comments
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Use RootedTraceableBox for dictionaries.Ms2ger2017-02-161-1/+2
|
* Use Heap for dictionary and union members.Ms2ger2017-02-161-1/+1
|
* script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-2/+4
| | | | rebase + marked the necessary new code as unsafe
* Update to string-cache 0.3Simon Sapin2016-11-031-1/+1
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+3
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-3/+4
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Implement From<DOMString> for AtomAnthony Ramine2016-02-241-2/+2
|
* Remove an unused argument to CustomEvent::init_custom_event.Ms2ger2016-01-071-3/+2
|
* Make Event's isTrusted attribute unforgeableJohn DeSilva2015-12-131-0/+6
|
* Remove unused imports.Ms2ger2015-12-121-1/+0
|
* Pass around event types as Atoms instead of StringsCorey Farwell2015-12-101-10/+20
| | | | | | `Event` internally stores the `type` as an `Atom`, and we're `String`s everywhere, which can cause unnecessary allocations to occur since they'll end up as `Atom`s anyways.
* Rustfmt some of script.Ms2ger2015-11-181-2/+4
|
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-1/+1
|
* rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
|
* more refactoringrohan.prinja2015-10-301-1/+1
|
* move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|
* Introduce trait CastableAnthony Ramine2015-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Auto merge of #8020 - nox:codegen-derived, r=Ms2gerbors-servo2015-10-151-7/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Generate all Derived implementations in codegen Follow-up of #7873. @Ms2ger r? :) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8020) <!-- Reviewable:end -->
| * Generate all Derived implementations in codegenAnthony Ramine2015-10-141-7/+1
| |
* | Support the updated spidermonkey bindingsMichael Wu2015-10-141-1/+2
|/
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-5/+5
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+3
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-3/+3
|
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-2/+0
| | | | closes #7357
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-0/+2
|
* Upgrade to SM 39Michael Wu2015-06-191-15/+19
|
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-1/+5
| | | | Part of https://github.com/servo/servo/issues/6041
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+1
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Add/update comments with links to specCorey Farwell2015-04-141-0/+3
| | | | | | | | | | Extracted out of #5649 * add more hyperlinks to associated specification for structs/methods * follow redirects and update links * replace broken links * removal of WHATWG multipage page name since the page name is not guaranteed to be stable
* 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.
* Fixes #4164 Make Constructor and new functions take GlobalRef by valueMatt McCoy2015-01-071-3/+3
|
* Replace Root::deref() calls by Root::r() calls where possible.Ms2ger2015-01-011-2/+2
| | | | This changes those calls that were already sound.