aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/macros.rs
Commit message (Collapse)AuthorAgeFilesLines
* Properly root the running animation list in a RootedVecAnthony Ramine2016-12-121-5/+6
|
* Introduce jsmanaged_arrayAnthony Ramine2016-12-061-9/+16
|
* Remove generics from unsafe_no_jsmanaged_fieldsAnthony Ramine2016-12-061-18/+0
|
* Mark JSTraceable and its method as unsafeAnthony Ramine2016-12-061-9/+13
|
* Remove redundant url clonesPu Xingyu2016-11-181-1/+1
| | | | | They are now redundant since now document.url() returns a struct rather than a reference.
* Update to string-cache 0.3Simon Sapin2016-11-031-19/+19
|
* Make make_enumerated_getter prettier again.Corey Farwell2016-10-121-1/+1
| | | | Fixes https://github.com/servo/servo/issues/4723.
* Emit TransitionEnd events in the layout thread and process it in the script ↵Keith Yeung2016-10-111-0/+1
| | | | thread
* adding macro to return string or url,Jake Goldsborough2016-09-271-0/+20
| | | | | | using that macro with the form action, making the form submit process use base url, adding tests.
* Implement HTMLLIElement#valuevrod2016-07-281-0/+16
|
* Use a stack guard and a macro for RootedVec instead of return_address.Eduard Burtescu2016-07-041-0/+15
|
* Stop re-exporting AttrValue.Ms2ger2016-06-071-1/+1
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-4/+5
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* dom: Add missing event handlersPiotr Stankiewicz2016-05-201-0/+128
| | | | | | | | | | Adding: * global event handlers, * window event handlers, * document and element handlers, * and support for BeforeUnloadEvent. Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
* Add event handlers for media-related events.Josh Matthews2016-05-031-0/+13
|
* Upgrade to rust-url 1.0 and hyper 0.9Simon Sapin2016-04-231-1/+1
|
* webgl: finish, flush, detachShader, generateMipmap, Uniform1iConnor Brewster2016-04-021-0/+8
|
* use return value of invoking event handlers to cancel the eventJoão Oliveira2016-02-261-2/+5
|
* Add onresize handler to GlobalEventHandlersJeff Harrison2016-01-291-0/+1
| | | | | Refs: https://github.com/servo/servo/issues/7996 Rebased: https://github.com/servo/servo/pull/8006
* Implement HTMLDetailsElement. Fixes #9216Lanza2016-01-201-0/+1
|
* Remove parsed attribute 'background' field on HTMLBodyElementCorey Farwell2016-01-021-0/+14
| | | | https://github.com/servo/servo/issues/7863
* Implement the onreset event handler.Josh Matthews2015-12-301-0/+1
|
* Implement non-zero dimension attribute parsingCorey Farwell2015-12-241-0/+13
| | | | | | | | | | | | | Fixes #8445 The only attributes I found that we have implemented that uses non-zero dimenion attributes: * `width` for `<td>` and `<th>` (table cells) * `width` for `<table>` I updated these implementations to use the new non-zero dimension attribute parsing and added associated regression tests.
* Makes setting negative values to maxLength throw an IndexSize exceptionSam Gibson2015-12-031-0/+20
|
* Resolves long-running merge conflictsSam Gibson2015-12-031-10/+7
|
* Makes int_getter macro, and uses -1 as default maxlength instead of maxintSam Gibson2015-12-031-0/+19
|
* Compute attribute name atoms at compile-time.Eli Friedman2015-11-271-74/+29
|
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-13/+13
| | | | | | | | | | | 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.
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-3/+2
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Differentiate between error and non-error event handlers per the spec.Josh Matthews2015-11-121-4/+7
|
* Auto merge of #8434 - frewsxcv:dimension-attrvalue, r=eefriedmanbors-servo2015-11-101-0/+15
|\ | | | | | | | | | | | | | | | | | | Add Dimension member to AttrValue Fixes #8417 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8434) <!-- Reviewable:end -->
| * Remove HTMLTableElement::width struct fieldCorey Farwell2015-11-091-1/+1
| |
| * Add Dimension member to AttrValueCorey Farwell2015-11-091-0/+15
| | | | | | | | Fixes #8417
* | Move storage of bgcolor for `<tr>` and `<tbody>`.Eli Friedman2015-11-091-0/+1
|/
* Move storage of bgcolor attribute on <body>.Eli Friedman2015-11-081-0/+15
|
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-2/+2
| | | | | | | | | | This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-1/+1
|
* move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-13/+13
|
* Introduce trait CastableAnthony Ramine2015-10-211-24/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Consolidate magic number representing max unsigned longCorey Farwell2015-10-101-2/+4
|
* Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01)Simon Sapin2015-09-021-0/+8
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-13/+13
|
* Remove AttributeHandlersAnthony Ramine2015-08-271-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13/+13
|
* Auto merge of #6451 - jgraham:onkey_attributes, r=Ms2gerbors-servo2015-08-061-0/+3
|\ | | | | | | | | | | | | | | | | | | Add onkey* global event handler attributes <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6451) <!-- Reviewable:end -->
| * fixup! Add onkey* global event handler attributesJames Graham2015-06-241-1/+1
| |
| * Add onkey* global event handler attributesJames Graham2015-06-231-0/+3
| |
* | Remove usage of the deprecated OwnedAsciiExtSimon Sapin2015-07-301-2/+3
| |
* | Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-1/+1
|/ | | | fixes #6524