aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/create.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-11/+11
| | | | | | | 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
|
* Track custom element stateConnor Brewster2017-08-091-4/+18
|
* Enqueue upgradesConnor Brewster2017-08-091-4/+16
|
* Check namespace during ce def lookupConnor Brewster2017-08-091-1/+1
|
* Use HTMLElement interface for possible CEsConnor Brewster2017-08-091-1/+4
|
* Support custom element callback reactionsConnor Brewster2017-07-171-1/+4
|
* Allow element prefix to be setConnor Brewster2017-06-231-1/+1
| | | | | Implements step 6.1.10 of https://dom.spec.whatwg.org/#concept-create-element
* Add flag for sync/async CE creationConnor Brewster2017-06-231-20/+28
|
* Support `is` option when creating elementsConnor Brewster2017-06-231-4/+10
|
* Hook CE registry into element creationConnor Brewster2017-06-231-0/+35
|
* Implement HTMLConstructorConnor Brewster2017-06-151-4/+12
|
* Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-031-6/+2
|\
| * Upgrade to html5ever 0.16Simon Sapin2017-05-021-3/+2
| |
* | Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-031-4/+3
|/
* script: Add infrastructure to track subresource loads in <link> and <style> ↵Emilio Cobos Álvarez2016-12-161-1/+1
| | | | elements.
* Removed util.Alan Jeffrey2016-12-141-1/+1
|
* Update to string-cache 0.3Simon Sapin2016-11-031-135/+135
|
* add SVGElement, SVGGraphicsElement interfaces and SVGSVGElement elementAlexandrov Sergey2016-10-061-7/+46
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Implement HTMLDetailsElement. Fixes #9216Lanza2016-01-201-1/+2
|
* Remove unnecessary conversion to/from DOMString for localName.Eli Friedman2015-12-021-3/+3
|
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-1/+1
| | | | | | | | | | | 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.
* Rustfmt some of script.Ms2ger2015-11-181-2/+4
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-5/+6
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Move Stylesheet loading and ownership from the layout task into HTML elementsTill Schneidereit2015-11-071-1/+1
| | | | | | | | | | | | | | Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-4/+5
| | | | | | | | | | 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.
* Add HTMLPreElement type to xml and plaintext DOM nodesKeith Yeung2015-10-261-0/+2
|
* Clean up the cast callsAnthony Ramine2015-10-211-2/+2
|
* Introduce trait CastableAnthony Ramine2015-10-211-3/+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
* Add 'listing' alias for <pre> elementsCorey Farwell2015-10-101-1/+2
|
* HTMLTableSectionElement improvementsCorey Farwell2015-10-031-0/+4
| | | | | | 'thead' and 'tfoot' now create instances of HTMLTableSectionElement HTMLTableSectionElement.rows has been implemented
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-3/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Fix a few incorrect Element interfacesCorey Farwell2015-09-131-4/+14
|
* sort all usesJohann Tuffe2015-08-201-1/+1
|
* Upgrade to SM 39Michael Wu2015-06-191-5/+5
|
* Pass an Atom to Element::create.Ms2ger2015-04-271-4/+4
|
* Remove as_slice() calls from script.Ms2ger2015-04-261-3/+3
|
* Add basic HTMLDialogElement interfaceDave Hodder2015-04-041-0/+2
|
* 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.
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-3/+7
|
* Move to to_owned rather than into_string.Ms2ger2015-01-201-2/+4
| | | | into_string has been removed from Rust.
* auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallisterbors-servo2014-12-271-1/+0
|\ | | | | | | | | | | 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/"`
* | script: to_string() -> into_string()Manish Goregaokar2014-12-271-2/+2
|/
* script: Remove glob imports added in #4405Tetsuharu OHZEKI2014-12-191-7/+7
|
* Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.Ms2ger2014-12-171-1/+1
|
* Pass the prefix to Element::new in create_element.Ms2ger2014-11-051-1/+1
|
* Move build_element_from_tag out of the HTML parser.Ms2ger2014-10-301-0/+225
This function is not particular to the parser, so should live in the DOM.