aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/eventdispatcher.rs
Commit message (Collapse)AuthorAgeFilesLines
* Inline dom::eventdispatcher into dom::eventAnthony Ramine2017-01-221-197/+0
|
* Kill AutoDOMEventMarkerAnthony Ramine2017-01-221-33/+7
|
* script: Simplify EventDispatcher's default action.Emilio Cobos Álvarez2016-12-251-8/+4
|
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-1/+1
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-1/+1
|
* Use GlobalScope in dispatch_to_listenersAnthony Ramine2016-10-061-3/+2
|
* Return an enum instead of a boolean from dispatch_eventAdolfo Ochagavía2016-09-261-4/+10
| | | | Fixes #13196
* Correct an unsound optimization in event dispatch.Ms2ger2016-09-121-5/+9
|
* Fix step 10 of eventdispatcher::dispatch_event (fixes #11609)Anthony Ramine2016-08-241-9/+3
| | | | | We consolidate steps 10-12 in a single function to expose less general-purpose mutating methods on Event.
* Use a stack guard and a macro for RootedVec instead of return_address.Eduard Burtescu2016-07-041-3/+2
|
* Refactor dispatch_event according to the spec (fixes #9178)Anthony Ramine2016-02-291-41/+84
| | | | | Two new functions invoke and inner_invoke are introduced and some invariants documented.
* Rename various bindings in event dispatchingAnthony Ramine2016-02-291-17/+18
|
* Return a Vec from EventTarget::get_listeners_forAnthony Ramine2016-02-291-28/+24
|
* Merge EventTarget::{get_listeners, get_listeners_for}Anthony Ramine2016-02-291-3/+3
|
* Fix the "get the parent" loop when dispatching event (fixes #6733)Anthony Ramine2016-02-271-0/+8
| | | | | | | | | The DOM specification says: A document's get the parent algorithm, given an event, returns null if event's type attribute value is "load" or document does not have a browsing context, and the document's associated Window object otherwise.
* Compile raw inline event handlers lazily. Resolves #8489.Josh Matthews2016-02-111-2/+2
|
* Add global default method for Reflectable traitChad Kimes2016-01-111-2/+3
|
* Clean up the conversion routinesAnthony Ramine2015-11-111-2/+2
| | | | | | | | Functions returning `Root<T>` are prefixed by "root_" and the ones returning `*const T` by "native_". Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones taking `&T` by "_from_reflector".
* merge from masterrohan.prinja2015-11-031-1/+1
|\
| * Use an Atom for Event.typeDavid Zbarsky2015-11-011-1/+1
| |
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|/
* Clean up the cast callsAnthony Ramine2015-10-211-9/+4
|
* Introduce trait CastableAnthony Ramine2015-10-211-4/+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
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-1/+1
|
* 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 a pointless clone() call.Ms2ger2015-09-161-1/+1
|
* Remove an obsolete TODO comment.Ms2ger2015-09-161-1/+0
|
* Use an early return in dispatch_to_listeners.Ms2ger2015-09-161-14/+15
|
* Emit markers for all events, not just UI events.Ms2ger2015-09-161-8/+50
|
* Return immediately from dispatch_to_listeners if propagation is stopped.Ms2ger2015-09-161-11/+14
|
* Use early returns in dispatch_to_listeners.Ms2ger2015-09-161-11/+15
|
* Use if-let in dispatch_to_listeners, and simplify break conditions.Ms2ger2015-09-161-32/+22
|
* Avoid calling any listeners for events whose stop propagation flag is set ↵Ms2ger2015-09-161-0/+8
| | | | prior to dispatching.
* Add more assertions to dispatch_event.Ms2ger2015-09-161-0/+2
|
* Factor out a dispatch_to_listeners function from dispatch_event.Ms2ger2015-09-161-23/+27
|
* Reorder the code in dispatch_event a bit.Ms2ger2015-09-161-3/+2
|
* Remove outdated FIXME comment.Ms2ger2015-09-161-2/+0
|
* Fix match_refs and let_returns in layout, address review changesManish Goregaokar2015-09-041-3/+2
|
* Elide most 'b lifetimesManish Goregaokar2015-09-041-2/+2
|
* Elide most 'a lifetimesManish Goregaokar2015-09-041-1/+1
|
* Remove helper traitsAnthony Ramine2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* sort all usesJohann Tuffe2015-08-201-1/+1
|
* Auto merge of #7241 - Wafflespeanut:event_handler, r=Ms2gerbors-servo2015-08-181-3/+3
|\ | | | | | | | | | | | | | | | | | | Matching over event listeners and handlers; r=Ms2ger ... for #7065 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7241) <!-- Reviewable:end -->
| * Matching over event listeners and handlers; r=Ms2gerRavi Shankar2015-08-181-3/+3
| | | | | | | | fixup! Matching over event listeners and handlers; r=Ms2ger
* | Replace uses of `for foo in bar.iter()`,João Oliveira2015-08-181-2/+2
|/ | | | | and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
* Replace uses of `for foo in bar.iter()` and `for foo in bar.iter_mut()`João Oliveira2015-08-151-2/+2
| | | | closes #7197
* Introduce RootedVec<JS<T>>::r()Anthony Ramine2015-07-231-10/+8
|
* Upgrade to SM 39Michael Wu2015-06-191-8/+7
|
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+1
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.