aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domimplementation.rs
Commit message (Collapse)AuthorAgeFilesLines
* enhance: Add support for `unsafe-eval` and `wasm-unsafe-eval` (#32893)Chocolate Pie2024-08-011-0/+1
| | | Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-5/+5
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+1
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Formatting.Josh Matthews2023-05-281-4/+12
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-3/+4
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-6/+1
|
* createElement can now take an ignored string for optionsPatrick Shaughnessy2019-12-231-2/+6
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-1/+0
| | | | A `crate_name::foo` path always works in 2018
* Reorder importsPyfisch2018-11-061-3/+5
|
* `cargo fix --edition`Simon Sapin2018-11-061-21/+21
|
* Update hyper to 0.12Bastien Orivel2018-11-011-12/+4
|
* Format script componentchansuke2018-09-191-51/+74
|
* Updated content_type of Document and XMLDocument from DOCString to MimeNupur Baghel2018-02-091-4/+5
|
* Remove out of date comments from domimplementationManoj2018-01-081-2/+2
|
* Use FetchCanceller for document loadsManish Goregaokar2017-11-221-1/+2
|
* 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-8/+8
| | | | | | | 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 JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Support `is` option when creating elementsConnor Brewster2017-06-231-2/+3
|
* Untry scriptSimon Sapin2017-06-181-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Add ImmutableOrigin to allow for serializing originsConnor Brewster2017-02-221-2/+2
|
* Allow windows to share browsing contexts.Alan Jeffrey2017-01-281-3/+3
|
* The constellation notifies the script thread about documents becoming ↵Alan Jeffrey2017-01-271-0/+3
| | | | inactive, active and fully active.
* Auto merge of #14647 - servo:current-global, r=jdmbors-servo2016-12-291-0/+2
|\ | | | | | | | | | | | | | | Support the 'current' global object. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14647) <!-- Reviewable:end -->
| * Pass the Document's origin to its constructor.Ms2ger2016-12-231-0/+2
| | | | | | | | CC #10963.
* | script: Simplify DOMImplementation::CreateHTMLDocument.Emilio Cobos Álvarez2016-12-251-14/+11
|/
* Update to string-cache 0.3Simon Sapin2016-11-031-4/+4
|
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-6/+6
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+1
|
* Reorder `use` statementsUK9922016-09-091-2/+2
|
* script: Obtain referrer policy from headerAravind Gollakota2016-07-151-0/+1
|
* Implement Document.referrerNazım Can Altınova2016-07-141-1/+2
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* [10743] Add content type to XmlDocument constructor based on namespacecjkenned2016-04-281-4/+11
| | | | | | | | | | | | | | | | | | | | [10743] Fix namespace in createDocument test [10743] Remove test ini file, match returns static strings instead of DOMString. [10743] Fix arguments to XMLDocument::new Update failing test [10743] Add content type to XmlDocument constructor based on namespace [10743] Fix namespace in createDocument test [10743] Remove test ini file, match returns static strings instead of DOMString. [10743] Fix arguments to XMLDocument::new Update failing test
* Make it possible for XMLDocuments to have a browsing context.Josh Matthews2016-02-201-0/+1
|
* Store a pointer to the browsing context in the Document.Ms2ger2016-02-111-0/+1
|
* Remove unnecessary conversion to/from DOMString for localName.Eli Friedman2015-12-021-4/+4
|
* Add XMLDocument objectGuillaume Gomez2015-11-271-9/+10
|
* Rustfmt some of script.Ms2ger2015-11-181-14/+34
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-6/+5
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-5/+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.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-1/+1
|
* more refactoringrohan.prinja2015-10-301-2/+2
|
* move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|
* Clean up the cast callsAnthony Ramine2015-10-211-17/+10
|
* Introduce trait CastableAnthony Ramine2015-10-211-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Do not root DOMImplementation::documentAnthony Ramine2015-10-191-10/+5
|